meriyah 7.4.0 → 7.4.1
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/CHANGELOG.md +10 -0
- package/dist/meriyah.cjs +40 -19
- package/dist/meriyah.min.mjs +1 -1
- package/dist/meriyah.mjs +40 -19
- package/dist/meriyah.umd.js +40 -19
- package/dist/meriyah.umd.min.js +1 -1
- package/dist/types/common.d.ts +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## [7.4.1](https://github.com/meriyah/meriyah/compare/v7.4.0...v7.4.1) (2026-10-25)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* parse default-exported arrows with async as a parameter ([#672](https://github.com/meriyah/meriyah/issues/672)) ([30e5789](https://github.com/meriyah/meriyah/commit/30e57899a281ef8fa6c1706fbc2478ceaa6ac4c1))
|
|
6
|
+
* **parser:** don't extend `yield` with member access, calls or binary operators ([#669](https://github.com/meriyah/meriyah/issues/669)) ([7bcc6ae](https://github.com/meriyah/meriyah/commit/7bcc6aea2b6f21a9bed70c45804dc9888e7956b3))
|
|
7
|
+
* **parser:** finish `export default async` expressions ([#670](https://github.com/meriyah/meriyah/issues/670)) ([41b306b](https://github.com/meriyah/meriyah/commit/41b306bfdf3dfb2d92272688369c99a0be816dd1))
|
|
8
|
+
* **parser:** reject `let` as an arrow parameter in strict mode code ([#671](https://github.com/meriyah/meriyah/issues/671)) ([bb5eac9](https://github.com/meriyah/meriyah/commit/bb5eac99027a73304ee61e24ac332c465474e4f8))
|
|
9
|
+
* **parser:** start binary and conditional spread arguments at their left operand ([#668](https://github.com/meriyah/meriyah/issues/668)) ([56afd77](https://github.com/meriyah/meriyah/commit/56afd77e926e990136418df06300a49d0f35b1b7))
|
|
10
|
+
|
|
1
11
|
# [7.4.0](https://github.com/meriyah/meriyah/compare/v7.3.3...v7.4.0) (2026-10-05)
|
|
2
12
|
|
|
3
13
|
### Bug Fixes
|
package/dist/meriyah.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var version$1 = "7.4.
|
|
3
|
+
var version$1 = "7.4.1";
|
|
4
4
|
var packageJson = {
|
|
5
5
|
version: version$1};
|
|
6
6
|
|
|
@@ -2315,6 +2315,9 @@ function classifyIdentifier(parser, context, t) {
|
|
|
2315
2315
|
parser.report(121);
|
|
2316
2316
|
parser.flags |= 512;
|
|
2317
2317
|
}
|
|
2318
|
+
if (context & 1 && (t & 255) === (241737 & 255)) {
|
|
2319
|
+
parser.report(99);
|
|
2320
|
+
}
|
|
2318
2321
|
if (!isValidIdentifier(context, t))
|
|
2319
2322
|
parser.report(0);
|
|
2320
2323
|
}
|
|
@@ -4361,24 +4364,29 @@ function parseExportDeclaration(parser, context, scope) {
|
|
|
4361
4364
|
const { tokenStart } = parser;
|
|
4362
4365
|
declaration = parseIdentifier(parser, context);
|
|
4363
4366
|
const { flags } = parser;
|
|
4364
|
-
if ((flags & 1) === 0) {
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4367
|
+
if ((flags & 1) === 0 && parser.getToken() === 86104) {
|
|
4368
|
+
declaration = parseFunctionDeclaration(parser, context, scope, undefined, 1, 1, 1, tokenStart, 4);
|
|
4369
|
+
break;
|
|
4370
|
+
}
|
|
4371
|
+
if (parser.getToken() === 10) {
|
|
4372
|
+
declaration = parseArrowFromIdentifier(parser, context & -9, undefined, 'async', declaration, 0, 1, 0, tokenStart);
|
|
4373
|
+
}
|
|
4374
|
+
else if ((flags & 1) === 0 && parser.getToken() === 67174411) {
|
|
4375
|
+
declaration = parseAsyncArrowOrCallExpression(parser, context, undefined, declaration, 1, 1, flags, tokenStart);
|
|
4376
|
+
declaration = parseMemberOrUpdateExpression(parser, context, undefined, declaration, 0, 0, tokenStart);
|
|
4377
|
+
declaration = parseAssignmentExpression(parser, context, undefined, 0, 0, tokenStart, declaration);
|
|
4378
|
+
}
|
|
4379
|
+
else if ((flags & 1) === 0 && parser.getToken() & 143360) {
|
|
4380
|
+
if (scope)
|
|
4381
|
+
scope = createArrowHeadParsingScope(parser, context, parser.tokenValue, parser.tokenStart, parser.currentLocation);
|
|
4382
|
+
declaration = parseIdentifier(parser, context);
|
|
4383
|
+
declaration = parseArrowFunctionExpression(parser, context, scope, undefined, [declaration], 1, tokenStart);
|
|
4381
4384
|
}
|
|
4385
|
+
else {
|
|
4386
|
+
declaration = parseMemberOrUpdateExpression(parser, context, undefined, declaration, 0, 0, tokenStart);
|
|
4387
|
+
declaration = parseAssignmentExpression(parser, context, undefined, 0, 0, tokenStart, declaration);
|
|
4388
|
+
}
|
|
4389
|
+
matchOrInsertSemicolon(parser, context | 32);
|
|
4382
4390
|
break;
|
|
4383
4391
|
}
|
|
4384
4392
|
default:
|
|
@@ -4604,6 +4612,10 @@ function parseConditionalExpression(parser, context, privateScope, test, start)
|
|
|
4604
4612
|
}, start);
|
|
4605
4613
|
}
|
|
4606
4614
|
function parseBinaryExpression(parser, context, privateScope, inGroup, start, minPrecedence, operator, left) {
|
|
4615
|
+
if ((parser.flags & 16384) === 16384) {
|
|
4616
|
+
parser.flags = (parser.flags | 16384) ^ 16384;
|
|
4617
|
+
return left;
|
|
4618
|
+
}
|
|
4607
4619
|
const bit = -((context & 131072) > 0) & 8673330;
|
|
4608
4620
|
let t;
|
|
4609
4621
|
let precedence;
|
|
@@ -4711,6 +4723,12 @@ function parseYieldExpressionOrIdentifier(parser, context, privateScope, inGroup
|
|
|
4711
4723
|
else if (parser.getToken() === 8391476) {
|
|
4712
4724
|
parser.report(30, KeywordDescTable[parser.getToken() & 255]);
|
|
4713
4725
|
}
|
|
4726
|
+
if (parser.getToken() & (67108864 | 8388608)) {
|
|
4727
|
+
if (argument === null && (parser.flags & 1) === 0) {
|
|
4728
|
+
parser.report(30, KeywordDescTable[parser.getToken() & 255]);
|
|
4729
|
+
}
|
|
4730
|
+
parser.flags |= 16384;
|
|
4731
|
+
}
|
|
4714
4732
|
parser.assignable = 2;
|
|
4715
4733
|
return parser.finishNode({
|
|
4716
4734
|
type: 'YieldExpression',
|
|
@@ -4873,6 +4891,10 @@ function parseMemberOrUpdateExpression(parser, context, privateScope, expr, inGr
|
|
|
4873
4891
|
expr = parseUpdateExpression(parser, context, expr, start);
|
|
4874
4892
|
}
|
|
4875
4893
|
else if ((parser.getToken() & 67108864) === 67108864) {
|
|
4894
|
+
if ((parser.flags & 16384) === 16384) {
|
|
4895
|
+
parser.flags = (parser.flags | 16384) ^ 16384;
|
|
4896
|
+
return expr;
|
|
4897
|
+
}
|
|
4876
4898
|
context = (context | 131072) ^ 131072;
|
|
4877
4899
|
switch (parser.getToken()) {
|
|
4878
4900
|
case 67108877: {
|
|
@@ -5814,7 +5836,6 @@ function parseSpreadOrRestElement(parser, context, scope, privateScope, closingT
|
|
|
5814
5836
|
else {
|
|
5815
5837
|
destructible |= 32;
|
|
5816
5838
|
argument = parseLeftHandSideExpression(parser, context, privateScope, 1, inGroup, 1);
|
|
5817
|
-
const { tokenStart } = parser;
|
|
5818
5839
|
const token = parser.getToken();
|
|
5819
5840
|
if (token === 1077936155) {
|
|
5820
5841
|
if (parser.assignable & 2)
|