poe-code 11.0.15 → 11.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +14 -4
- package/dist/index.js.map +2 -2
- package/dist/metafile.json +1 -1
- package/package.json +1 -1
- package/packages/safejs/dist/chunks/{chunk-CMWFNRW4.js → chunk-KNMVUWS7.js} +13 -3
- package/packages/safejs/dist/chunks/{chunk-CMWFNRW4.js.map → chunk-KNMVUWS7.js.map} +2 -2
- package/packages/safejs/dist/chunks/{chunk-RMMJ2USI.js → chunk-X4JCDSRU.js} +2 -2
- package/packages/safejs/dist/cli.js +2 -2
- package/packages/safejs/dist/core.js +1 -1
- package/packages/safejs/dist/index.js +2 -2
- package/packages/safejs/dist/interp/methods/array.js +12 -2
- /package/packages/safejs/dist/chunks/{chunk-RMMJ2USI.js.map → chunk-X4JCDSRU.js.map} +0 -0
package/package.json
CHANGED
|
@@ -23959,6 +23959,7 @@ function getTemplateRawParts(template) {
|
|
|
23959
23959
|
}
|
|
23960
23960
|
|
|
23961
23961
|
// packages/safejs/src/interp/methods/array.ts
|
|
23962
|
+
var activeArrayCallbacks = /* @__PURE__ */ new WeakMap();
|
|
23962
23963
|
var arrayMethodNames = /* @__PURE__ */ new Set([
|
|
23963
23964
|
"map",
|
|
23964
23965
|
"filter",
|
|
@@ -24029,11 +24030,20 @@ async function callArrayMethod(value, methodName, args, options, stack = []) {
|
|
|
24029
24030
|
assertCollectionMutable(value);
|
|
24030
24031
|
}
|
|
24031
24032
|
if (isCallbackArrayMethod(methodName)) {
|
|
24032
|
-
|
|
24033
|
+
let callbackState = activeArrayCallbacks.get(value);
|
|
24034
|
+
if (callbackState === void 0) {
|
|
24035
|
+
callbackState = { depth: 0, leave: enterCollectionCallback(value) };
|
|
24036
|
+
activeArrayCallbacks.set(value, callbackState);
|
|
24037
|
+
}
|
|
24038
|
+
callbackState.depth += 1;
|
|
24033
24039
|
try {
|
|
24034
24040
|
return await callArrayMethodUnlocked(value, methodName, args, options, stack);
|
|
24035
24041
|
} finally {
|
|
24036
|
-
|
|
24042
|
+
callbackState.depth -= 1;
|
|
24043
|
+
if (callbackState.depth === 0) {
|
|
24044
|
+
activeArrayCallbacks.delete(value);
|
|
24045
|
+
callbackState.leave();
|
|
24046
|
+
}
|
|
24037
24047
|
}
|
|
24038
24048
|
}
|
|
24039
24049
|
return callArrayMethodUnlocked(value, methodName, args, options, stack);
|
|
@@ -29052,4 +29062,4 @@ export {
|
|
|
29052
29062
|
FileSnapshotBackend,
|
|
29053
29063
|
run
|
|
29054
29064
|
};
|
|
29055
|
-
//# sourceMappingURL=chunk-
|
|
29065
|
+
//# sourceMappingURL=chunk-KNMVUWS7.js.map
|