Skip to content

Commit 8b9215d

Browse files
guybedfordMylesBorins
authored andcommitted
deps: update to [email protected]
PR-URL: nodejs#39402 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 48e5971 commit 8b9215d

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
@@ -1332,7 +1332,7 @@ success!
13321332
[`transformSource` hook]: #esm_transformsource_source_context_defaulttransformsource
13331333
[`string`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String
13341334
[`util.TextDecoder`]: util.md#util_class_util_textdecoder
1335-
[cjs-module-lexer]: https://github.com/guybedford/cjs-module-lexer/tree/1.2.1
1335+
[cjs-module-lexer]: https://github.com/guybedford/cjs-module-lexer/tree/1.2.2
13361336
[custom https loader]: #esm_https_loader
13371337
[special scheme]: https://url.spec.whatwg.org/#special-scheme
13381338
[the official standard format]: https://tc39.github.io/ecma262/#sec-modules

0 commit comments

Comments
 (0)