@poe-platform/safe-js 0.1.475 → 0.1.477
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-PAFO5N4X.js → chunk-7VEKZ6RN.js} +15 -15
- package/dist/safe-js/chunks/{chunk-PAFO5N4X.js.map → chunk-7VEKZ6RN.js.map} +2 -2
- package/dist/safe-js/chunks/{chunk-QFUTSNFH.js → chunk-ECBUQZKJ.js} +2 -2
- 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/package.json +2 -2
- /package/dist/safe-js/chunks/{chunk-QFUTSNFH.js.map → chunk-ECBUQZKJ.js.map} +0 -0
|
@@ -3291,7 +3291,20 @@ var Parser = class {
|
|
|
3291
3291
|
this.declareBinding(identifier, catchParam.type === "Identifier" ? "catch" : "lexical");
|
|
3292
3292
|
}
|
|
3293
3293
|
}
|
|
3294
|
-
|
|
3294
|
+
let directiveTokenIndex = this.index;
|
|
3295
|
+
const body = this.parseBlockStatementBody(start);
|
|
3296
|
+
if (params?.some((param) => param.type !== "Identifier")) {
|
|
3297
|
+
for (const statement of body.body) {
|
|
3298
|
+
const token = this.tokens[directiveTokenIndex];
|
|
3299
|
+
if (statement.type !== "ExpressionStatement" || statement.expression.type !== "StringLiteral" || token?.type !== "string" || statement.span.start.offset !== token.start.offset || statement.span.end.offset !== token.end.offset) break;
|
|
3300
|
+
if (statement.expression.raw === '"use strict"' || statement.expression.raw === "'use strict'")
|
|
3301
|
+
throw new Error(
|
|
3302
|
+
"A function with non-simple parameters cannot contain a use strict directive."
|
|
3303
|
+
);
|
|
3304
|
+
directiveTokenIndex += this.tokens[directiveTokenIndex + 1]?.value === ";" ? 2 : 1;
|
|
3305
|
+
}
|
|
3306
|
+
}
|
|
3307
|
+
return body;
|
|
3295
3308
|
}, params !== void 0);
|
|
3296
3309
|
}
|
|
3297
3310
|
parseBlockStatementBody(start) {
|
|
@@ -3978,20 +3991,7 @@ var Parser = class {
|
|
|
3978
3991
|
throw new Error("A getter cannot have parameters.");
|
|
3979
3992
|
if (accessor === "set" && (params.length !== 1 || params[0]?.type === "RestElement"))
|
|
3980
3993
|
throw new Error("A setter must have exactly one non-rest parameter.");
|
|
3981
|
-
const bodyTokenIndex = this.index;
|
|
3982
3994
|
const body = this.withFunctionContext(generator ? async ? "async-generator" : "generator" : async ? "async" : "normal", () => this.parseBlockStatement(params));
|
|
3983
|
-
if (accessor === "set" && params[0]?.type !== "Identifier") {
|
|
3984
|
-
let directiveTokenIndex = bodyTokenIndex + 1;
|
|
3985
|
-
for (const statement of body.body) {
|
|
3986
|
-
const token = this.tokens[directiveTokenIndex];
|
|
3987
|
-
if (statement.type !== "ExpressionStatement" || statement.expression.type !== "StringLiteral" || token?.type !== "string" || statement.span.start.offset !== token.start.offset || statement.span.end.offset !== token.end.offset) break;
|
|
3988
|
-
if (statement.expression.raw === '"use strict"' || statement.expression.raw === "'use strict'")
|
|
3989
|
-
throw new Error(
|
|
3990
|
-
"A setter with a non-simple parameter cannot contain a use strict directive."
|
|
3991
|
-
);
|
|
3992
|
-
directiveTokenIndex += this.tokens[directiveTokenIndex + 1]?.value === ";" ? 2 : 1;
|
|
3993
|
-
}
|
|
3994
|
-
}
|
|
3995
3995
|
return { params, body };
|
|
3996
3996
|
});
|
|
3997
3997
|
}
|
|
@@ -57191,4 +57191,4 @@ authorization of the copyright holder.
|
|
|
57191
57191
|
SPDX-License-Identifier: Unicode-3.0
|
|
57192
57192
|
|
|
57193
57193
|
*/
|
|
57194
|
-
//# sourceMappingURL=chunk-
|
|
57194
|
+
//# sourceMappingURL=chunk-7VEKZ6RN.js.map
|