poe-code 14.0.73 → 14.0.74
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 +1855 -1153
- package/dist/index.js.map +4 -4
- package/dist/metafile.json +1 -1
- package/package.json +1 -1
- package/packages/safe-js/dist/chunks/{chunk-I2Z37MKZ.js → chunk-2J6W3YGB.js} +2 -2
- package/packages/safe-js/dist/chunks/{chunk-XKCTB5FR.js → chunk-YEZOXLY4.js} +3203 -2543
- package/packages/safe-js/dist/chunks/chunk-YEZOXLY4.js.map +7 -0
- package/packages/safe-js/dist/cli.js +2 -2
- package/packages/safe-js/dist/core.js +1 -1
- package/packages/safe-js/dist/graph-depth.js +3 -0
- package/packages/safe-js/dist/index.js +2 -2
- package/packages/safe-js/dist/interp/cancel.js +3 -0
- package/packages/safe-js/dist/interp/globals/misc.js +2 -1
- package/packages/safe-js/dist/interp/globals/object.js +3 -0
- package/packages/safe-js/dist/interp/globals/regex.js +88 -7
- package/packages/safe-js/dist/interp/interpreter.js +14 -7
- package/packages/safe-js/dist/interp/iteration.js +6 -1
- package/packages/safe-js/dist/interp/methods/regex.d.ts +7 -3
- package/packages/safe-js/dist/interp/methods/regex.js +127 -21
- package/packages/safe-js/dist/interp/methods/regexp-iterator.d.ts +8 -0
- package/packages/safe-js/dist/interp/methods/regexp-iterator.js +49 -0
- package/packages/safe-js/dist/interp/methods/string.d.ts +2 -0
- package/packages/safe-js/dist/interp/methods/string.js +412 -118
- package/packages/safe-js/dist/interp/object-model.d.ts +2 -0
- package/packages/safe-js/dist/interp/object-model.js +39 -9
- package/packages/safe-js/dist/interp/regexp-iterator.d.ts +14 -0
- package/packages/safe-js/dist/interp/regexp-iterator.js +18 -0
- package/packages/safe-js/dist/interp/string-coercion.js +11 -7
- package/packages/safe-js/dist/interp/values.d.ts +2 -1
- package/packages/safe-js/dist/interp/values.js +35 -0
- package/packages/safe-js/dist/snapshot/dump-format.js +26 -2
- package/packages/safe-js/dist/snapshot/replay-data.d.ts +9 -1
- package/packages/safe-js/dist/snapshot/replay-data.js +31 -0
- package/packages/safe-js/dist/snapshot/replay-inputs.js +17 -0
- package/packages/safe-js/dist/snapshot/restore.js +17 -1
- package/packages/safe-js/dist/snapshot/serialize.d.ts +10 -2
- package/packages/safe-js/dist/snapshot/serialize.js +26 -10
- package/packages/safe-js/dist/snapshot/validation.js +14 -2
- package/packages/safe-js/dist/chunks/chunk-XKCTB5FR.js.map +0 -7
- /package/packages/safe-js/dist/chunks/{chunk-I2Z37MKZ.js.map → chunk-2J6W3YGB.js.map} +0 -0
|
@@ -85,6 +85,10 @@ function validateDumpHeap(root, state) {
|
|
|
85
85
|
const entry = requireRecord(value, path);
|
|
86
86
|
validateErrorType(entry, path);
|
|
87
87
|
validateSymbolEntries(entry, path, state, heap);
|
|
88
|
+
if (entry.kind === "regexp-iterator") {
|
|
89
|
+
validateHeapValue(entry, path, state, heap);
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
88
92
|
if (entry.kind === "regex-object") {
|
|
89
93
|
validateTaggedValue(entry, path, state);
|
|
90
94
|
continue;
|
|
@@ -394,6 +398,7 @@ function validateTaggedValue(record, path, state) {
|
|
|
394
398
|
case "map":
|
|
395
399
|
case "set":
|
|
396
400
|
case "collection-iterator":
|
|
401
|
+
case "regexp-iterator":
|
|
397
402
|
return;
|
|
398
403
|
}
|
|
399
404
|
}
|
|
@@ -440,7 +445,7 @@ function validateGeneratorShape(record, path, state) {
|
|
|
440
445
|
function validateHeapValue(value, path, state, heap) {
|
|
441
446
|
const record = requireRecord(value, path);
|
|
442
447
|
validateErrorType(record, path);
|
|
443
|
-
if (!["symbol", "arguments", "array", "object", "map", "set", "float32array", "date", "boxed", "collection-iterator", "regex-object"].includes(String(record.kind)))
|
|
448
|
+
if (!["symbol", "arguments", "array", "object", "map", "set", "float32array", "date", "boxed", "collection-iterator", "regexp-iterator", "regex-object"].includes(String(record.kind)))
|
|
444
449
|
fail("unknownTag", `${path}.kind`, "unknown heap tag");
|
|
445
450
|
validateValue(record, path, 1, state);
|
|
446
451
|
if (record.kind === "symbol")
|
|
@@ -468,6 +473,13 @@ function validateHeapValue(value, path, state, heap) {
|
|
|
468
473
|
}
|
|
469
474
|
if (record.kind === "set")
|
|
470
475
|
requireArray(record.values, `${path}.values`, state);
|
|
476
|
+
if (record.kind === "regexp-iterator") {
|
|
477
|
+
if (typeof record.exhausted !== "boolean")
|
|
478
|
+
fail("invalidValue", `${path}.exhausted`, "invalid iterator exhaustion");
|
|
479
|
+
if (!Object.hasOwn(record, "matcher") || !Object.hasOwn(record, "input"))
|
|
480
|
+
fail("invalidValue", path, "missing RegExp iterator state");
|
|
481
|
+
requireRecord(record.entries, `${path}.entries`);
|
|
482
|
+
}
|
|
471
483
|
if (record.kind === "collection-iterator") {
|
|
472
484
|
if (record.collectionKind !== "map" && record.collectionKind !== "set")
|
|
473
485
|
fail("invalidValue", `${path}.collectionKind`, "invalid iterator brand");
|
|
@@ -484,7 +496,7 @@ function validateHeapValue(value, path, state, heap) {
|
|
|
484
496
|
function validateSymbolEntries(record, path, state, heap) {
|
|
485
497
|
if (record.symbolEntries === undefined)
|
|
486
498
|
return;
|
|
487
|
-
if (record.kind !== "object" && record.kind !== "array" && record.kind !== "date" && record.kind !== "boxed" && record.kind !== "regex-object")
|
|
499
|
+
if (record.kind !== "object" && record.kind !== "array" && record.kind !== "date" && record.kind !== "boxed" && record.kind !== "regex-object" && record.kind !== "regexp-iterator")
|
|
488
500
|
fail("invalidValue", `${path}.symbolEntries`, "symbol properties are unsupported for this heap kind");
|
|
489
501
|
const entries = requireArray(record.symbolEntries, `${path}.symbolEntries`, state);
|
|
490
502
|
const keys = new Set();
|