@poe-platform/safe-js 0.1.242 → 0.1.243
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/safe-js/chunks/{chunk-FMIETDHG.js → chunk-AVVWPQWG.js} +2 -2
- package/dist/safe-js/chunks/{chunk-HL454CBB.js → chunk-NM7QH5TW.js} +11 -47
- package/dist/safe-js/chunks/chunk-NM7QH5TW.js.map +7 -0
- package/dist/safe-js/cli.js +2 -2
- package/dist/safe-js/core.js +1 -1
- package/dist/safe-js/index.js +2 -2
- package/dist/safe-js/parse/parser.d.ts +1 -0
- package/package.json +2 -2
- package/dist/safe-js/chunks/chunk-HL454CBB.js.map +0 -7
- /package/dist/safe-js/chunks/{chunk-FMIETDHG.js.map → chunk-AVVWPQWG.js.map} +0 -0
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
validateMigrationSemantics,
|
|
28
28
|
validateSnapshotData,
|
|
29
29
|
validateSnapshotMigration
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-NM7QH5TW.js";
|
|
31
31
|
|
|
32
32
|
// packages/safe-js/src/migrate.ts
|
|
33
33
|
import { createHash } from "node:crypto";
|
|
@@ -8249,4 +8249,4 @@ export {
|
|
|
8249
8249
|
parseMcpConfig,
|
|
8250
8250
|
makeMcpModule
|
|
8251
8251
|
};
|
|
8252
|
-
//# sourceMappingURL=chunk-
|
|
8252
|
+
//# sourceMappingURL=chunk-AVVWPQWG.js.map
|
|
@@ -3350,7 +3350,12 @@ var Parser = class {
|
|
|
3350
3350
|
if (token.type === "keyword" && token.value === "while") return this.parseWhileStatement(labels);
|
|
3351
3351
|
if (token.type === "keyword" && token.value === "do") return this.parseDoWhileStatement(labels);
|
|
3352
3352
|
if (token.type === "punctuator" && token.value === "{") return { ...this.parseBlockStatement(), labels };
|
|
3353
|
-
|
|
3353
|
+
if (["let", "const", "class", "function", "import", "export"].includes(token.value) || this.isAsyncFunctionDeclarationStart())
|
|
3354
|
+
throw new DisallowedSyntaxError("labeled declaration", firstLabelToken.start);
|
|
3355
|
+
const statement = this.parseStatement();
|
|
3356
|
+
if (statement.type === "ImportDeclaration" || statement.type === "ExportDefaultDeclaration" || statement.type === "ExportNamedDeclaration")
|
|
3357
|
+
throw new DisallowedSyntaxError("labeled declaration", firstLabelToken.start);
|
|
3358
|
+
return { ...statement, labels, span: createSpan2(firstLabelToken.start, statement.span.end) };
|
|
3354
3359
|
} finally {
|
|
3355
3360
|
for (const label of labels) this.activeLabels.delete(label);
|
|
3356
3361
|
}
|
|
@@ -15199,6 +15204,8 @@ async function evaluateNode(node, context) {
|
|
|
15199
15204
|
compilation,
|
|
15200
15205
|
context.compilation
|
|
15201
15206
|
);
|
|
15207
|
+
if (result.kind === "break" && result.label !== void 0 && "labels" in node && node.labels?.includes(result.label))
|
|
15208
|
+
return { kind: "normal", hasValue: false, value: void 0 };
|
|
15202
15209
|
return result;
|
|
15203
15210
|
} catch (error) {
|
|
15204
15211
|
if (error instanceof HostCallResumabilityError) {
|
|
@@ -16014,8 +16021,6 @@ async function evaluateBlockStatement(node, context) {
|
|
|
16014
16021
|
continue;
|
|
16015
16022
|
}
|
|
16016
16023
|
const result = await evaluateNode(statement, blockContext);
|
|
16017
|
-
if (result.kind === "break" && result.label !== void 0 && node.labels?.includes(result.label))
|
|
16018
|
-
return { kind: "normal", hasValue: false, value: void 0 };
|
|
16019
16024
|
if (result.kind !== "normal") {
|
|
16020
16025
|
return result;
|
|
16021
16026
|
}
|
|
@@ -26299,13 +26304,8 @@ var AS001Scanner = class {
|
|
|
26299
26304
|
braceContextStack,
|
|
26300
26305
|
nextSignificantChar
|
|
26301
26306
|
);
|
|
26302
|
-
|
|
26303
|
-
|
|
26304
|
-
"label",
|
|
26305
|
-
token.start,
|
|
26306
|
-
this.positionWithinSource(token.start.offset + token.value.length)
|
|
26307
|
-
);
|
|
26308
|
-
} else if (!isMemberProperty && !isPropertyKey && !isMemberName) {
|
|
26307
|
+
const isLabel = canStartStatement && nextSignificantChar === ":" && token.type === "identifier";
|
|
26308
|
+
if (!isLabel && !isMemberProperty && !isPropertyKey && !isMemberName) {
|
|
26309
26309
|
this.reportForbiddenIdentifier(token);
|
|
26310
26310
|
if (token.value === "class") {
|
|
26311
26311
|
pendingClassBody = true;
|
|
@@ -26555,29 +26555,6 @@ var AS001Scanner = class {
|
|
|
26555
26555
|
const nextIndex = this.skipTriviaFrom(this.index);
|
|
26556
26556
|
return nextIndex >= this.source.length ? void 0 : this.source[nextIndex];
|
|
26557
26557
|
}
|
|
26558
|
-
isSupportedLabelStart() {
|
|
26559
|
-
let index = this.skipTriviaFrom(this.index);
|
|
26560
|
-
if (this.source[index] !== ":") {
|
|
26561
|
-
return false;
|
|
26562
|
-
}
|
|
26563
|
-
index = this.skipTriviaFrom(index + 1);
|
|
26564
|
-
while (index < this.source.length) {
|
|
26565
|
-
if (this.source[index] === "{") return true;
|
|
26566
|
-
const identifier = readIdentifierAt(this.source, index);
|
|
26567
|
-
if (identifier === void 0) {
|
|
26568
|
-
return false;
|
|
26569
|
-
}
|
|
26570
|
-
if (identifier.value === "for" || identifier.value === "while" || identifier.value === "do") {
|
|
26571
|
-
return true;
|
|
26572
|
-
}
|
|
26573
|
-
const nextIndex = this.skipTriviaFrom(identifier.end);
|
|
26574
|
-
if (this.source[nextIndex] !== ":") {
|
|
26575
|
-
return false;
|
|
26576
|
-
}
|
|
26577
|
-
index = this.skipTriviaFrom(nextIndex + 1);
|
|
26578
|
-
}
|
|
26579
|
-
return false;
|
|
26580
|
-
}
|
|
26581
26558
|
skipTriviaFrom(start) {
|
|
26582
26559
|
let index = start;
|
|
26583
26560
|
while (index < this.source.length) {
|
|
@@ -26787,19 +26764,6 @@ function isIdentifierStart2(char) {
|
|
|
26787
26764
|
function isIdentifierPart2(char) {
|
|
26788
26765
|
return isIdentifierStart2(char) || isDecimalDigit4(char);
|
|
26789
26766
|
}
|
|
26790
|
-
function readIdentifierAt(source, start) {
|
|
26791
|
-
if (!isIdentifierStart2(source[start] ?? "")) {
|
|
26792
|
-
return void 0;
|
|
26793
|
-
}
|
|
26794
|
-
let end = start + 1;
|
|
26795
|
-
while (end < source.length && isIdentifierPart2(source[end] ?? "")) {
|
|
26796
|
-
end += 1;
|
|
26797
|
-
}
|
|
26798
|
-
return {
|
|
26799
|
-
value: source.slice(start, end),
|
|
26800
|
-
end
|
|
26801
|
-
};
|
|
26802
|
-
}
|
|
26803
26767
|
function isAsciiLetter3(char) {
|
|
26804
26768
|
return char >= "a" && char <= "z" || char >= "A" && char <= "Z";
|
|
26805
26769
|
}
|
|
@@ -39341,4 +39305,4 @@ export {
|
|
|
39341
39305
|
FileSnapshotBackend,
|
|
39342
39306
|
run
|
|
39343
39307
|
};
|
|
39344
|
-
//# sourceMappingURL=chunk-
|
|
39308
|
+
//# sourceMappingURL=chunk-NM7QH5TW.js.map
|