@magnetarjs/core
Advanced tools
Comparing version 0.7.6 to 0.7.7
@@ -32,3 +32,3 @@ "use strict"; | ||
// src/Magnetar.ts | ||
var import_getorset_anything = require("getorset-anything"); | ||
var import_getorset_anything2 = require("getorset-anything"); | ||
@@ -40,2 +40,3 @@ // src/Collection.ts | ||
// src/moduleActions/handleActionPerStore.ts | ||
var import_getorset_anything = require("getorset-anything"); | ||
var import_is_what4 = require("is-what"); | ||
@@ -284,3 +285,7 @@ | ||
return foundFetchPromise; | ||
const writeLock = _docId ? writeLockMap.get(`${collectionPath}/${_docId}`) : writeLockMap.get(collectionPath); | ||
const writeLockId = _docId ? `${collectionPath}/${_docId}` : collectionPath; | ||
const writeLock = (0, import_getorset_anything.mapGetOrSet)(writeLockMap, writeLockId, () => { | ||
return { promise: null, resolve: () => { | ||
}, countdown: null }; | ||
}); | ||
if (actionName !== "fetch") { | ||
@@ -303,2 +308,3 @@ if (writeLock.promise === null) { | ||
clearTimeout(writeLock.countdown); | ||
writeLock.countdown = null; | ||
} | ||
@@ -414,3 +420,3 @@ } | ||
} | ||
if (actionName !== "fetch") { | ||
if (actionName !== "fetch" && !writeLock.countdown) { | ||
writeLock.countdown = setTimeout(writeLock.resolve, 5e3); | ||
@@ -771,7 +777,3 @@ } | ||
const pathFilterIdentifier = getPathFilterIdentifier(modulePath, moduleConfig); | ||
if (!writeLockMap.has(modulePath)) { | ||
writeLockMap.set(modulePath, { promise: null, resolve: () => { | ||
}, countdown: null }); | ||
} | ||
const fetchPromises = (0, import_getorset_anything.mapGetOrSet)(fetchPromiseMap, pathFilterIdentifier, () => /* @__PURE__ */ new Map()); | ||
const fetchPromises = (0, import_getorset_anything2.mapGetOrSet)(fetchPromiseMap, pathFilterIdentifier, () => /* @__PURE__ */ new Map()); | ||
function cacheStream(closeStreamFn, streamingPromise) { | ||
@@ -778,0 +780,0 @@ closeStreamFnMap.set(pathFilterIdentifier, closeStreamFn); |
{ | ||
"name": "@magnetarjs/core", | ||
"version": "0.7.6", | ||
"version": "0.7.7", | ||
"sideEffects": false, | ||
@@ -23,4 +23,4 @@ "description": "Magnetar core library.", | ||
"dependencies": { | ||
"@magnetarjs/types": "0.7.6", | ||
"@magnetarjs/utils": "0.7.6", | ||
"@magnetarjs/types": "0.7.7", | ||
"@magnetarjs/utils": "0.7.7", | ||
"getorset-anything": "^0.0.2", | ||
@@ -32,3 +32,3 @@ "is-what": "^3.14.1", | ||
"devDependencies": { | ||
"@magnetarjs/test-utils": "0.7.6" | ||
"@magnetarjs/test-utils": "0.7.7" | ||
}, | ||
@@ -35,0 +35,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
65383
1645
+ Added@magnetarjs/types@0.7.7(transitive)
+ Added@magnetarjs/utils@0.7.7(transitive)
- Removed@magnetarjs/types@0.7.6(transitive)
- Removed@magnetarjs/utils@0.7.6(transitive)
Updated@magnetarjs/types@0.7.7
Updated@magnetarjs/utils@0.7.7