Skip to content

Commit c019fa9

Browse files
guybedforddanielleadams
authored andcommitted
deps: update to [email protected]
PR-URL: nodejs/node#39402 Backport-PR-URL: nodejs/node#39422 Reviewed-By: Bradley Farias <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Zijian Liu <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Jan Krems <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent bfe89c0 commit c019fa9

File tree

7 files changed

+14
-9
lines changed

7 files changed

+14
-9
lines changed

deps/cjs-module-lexer/CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
1.2.2
2+
- Fix RollupJS reexports bug (https://github.com/guybedford/cjs-module-lexer/pull/59)
3+
14
1.2.1
25
- Support Unicode escapes in strings (https://github.com/guybedford/cjs-module-lexer/pull/55)
36
- Filter export strings to valid surrogate pairs (https://github.com/guybedford/cjs-module-lexer/pull/56)

deps/cjs-module-lexer/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ EXPORT_STAR_LIB: `Object.keys(` IDENTIFIER$1 `).forEach(function (` IDENTIFIER$2
113113
(`if (` IDENTIFIER$2 `in` EXPORTS_IDENTIFIER `&&` EXPORTS_IDENTIFIER `[` IDENTIFIER$2 `] ===` IDENTIFIER$1 `[` IDENTIFIER$2 `]) return` `;`)?
114114
)?
115115
) |
116-
`if (` IDENTIFIER$2 `!==` ( `'default'` | `"default"` ) (`&& !` (`Object` `.prototype`? `.hasOwnProperty.call(` IDENTIFIER$1 `, ` IDENTIFIER$2 `)` | IDENTIFIER$1 `.hasOwnProperty(` IDENTIFIER$2 `)`))? `)`
116+
`if (` IDENTIFIER$2 `!==` ( `'default'` | `"default"` ) (`&& !` (`Object` `.prototype`? `.hasOwnProperty.call(` IDENTIFIER `, ` IDENTIFIER$2 `)` | IDENTIFIER `.hasOwnProperty(` IDENTIFIER$2 `)`))? `)`
117117
)
118118
(
119119
EXPORTS_IDENTIFIER `[` IDENTIFIER$2 `] =` IDENTIFIER$1 `[` IDENTIFIER$2 `]` `;`? |

deps/cjs-module-lexer/dist/lexer.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deps/cjs-module-lexer/dist/lexer.mjs

+2-2
Large diffs are not rendered by default.

deps/cjs-module-lexer/lexer.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -651,8 +651,10 @@ function tryParseObjectDefineOrKeys (keys) {
651651
if (ch !== 33/*!*/) break;
652652
pos += 1;
653653
ch = commentWhitespace();
654-
if (source.startsWith(id, pos)) {
655-
pos += id.length;
654+
if (ch === 79/*O*/ && source.startsWith('bject', pos + 1) && source[pos + 6] === '.') {
655+
if (!tryParseObjectHasOwnProperty(it_id)) break;
656+
}
657+
else if (identifier()) {
656658
ch = commentWhitespace();
657659
if (ch !== 46/*.*/) break;
658660
pos++;
@@ -669,7 +671,7 @@ function tryParseObjectDefineOrKeys (keys) {
669671
if (ch !== 41/*)*/) break;
670672
pos += 1;
671673
}
672-
else if (!tryParseObjectHasOwnProperty(it_id)) break;
674+
else break;
673675
ch = commentWhitespace();
674676
}
675677
if (ch !== 41/*)*/) break;

deps/cjs-module-lexer/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cjs-module-lexer",
3-
"version": "1.2.1",
3+
"version": "1.2.2",
44
"description": "Lexes CommonJS modules, returning their named exports metadata",
55
"main": "lexer.js",
66
"exports": {

doc/api/esm.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1284,7 +1284,7 @@ success!
12841284
[`Uint8Array`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array
12851285
[dynamic instantiate hook]: #esm_code_dynamicinstantiate_code_hook
12861286
[`util.TextDecoder`]: util.md#util_class_util_textdecoder
1287-
[cjs-module-lexer]: https://github.com/guybedford/cjs-module-lexer/tree/1.2.1
1287+
[cjs-module-lexer]: https://github.com/guybedford/cjs-module-lexer/tree/1.2.2
12881288
[special scheme]: https://url.spec.whatwg.org/#special-scheme
12891289
[the official standard format]: https://tc39.github.io/ecma262/#sec-modules
12901290
[transpiler loader example]: #esm_transpiler_loader

0 commit comments

Comments
 (0)