Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c019fa9

Browse filesBrowse files
guybedforddanielleadams
authored andcommitted
deps: update to cjs-module-lexer@1.2.2
PR-URL: #39402 Backport-PR-URL: #39422 Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent bfe89c0 commit c019fa9
Copy full SHA for c019fa9

File tree

Expand file treeCollapse file tree

7 files changed

+14
-9
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

7 files changed

+14
-9
lines changed
Open diff view settings
Collapse file

‎deps/cjs-module-lexer/CHANGELOG.md‎

Copy file name to clipboardExpand all lines: deps/cjs-module-lexer/CHANGELOG.md
+3Lines changed: 3 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
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)
Collapse file

‎deps/cjs-module-lexer/README.md‎

Copy file name to clipboardExpand all lines: deps/cjs-module-lexer/README.md
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
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 `]` `;`? |
Collapse file

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

Copy file name to clipboardExpand all lines: deps/cjs-module-lexer/dist/lexer.js
+1-1Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file

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

Copy file name to clipboardExpand all lines: deps/cjs-module-lexer/dist/lexer.mjs
+2-2Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.
Collapse file

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

Copy file name to clipboardExpand all lines: deps/cjs-module-lexer/lexer.js
+5-3Lines changed: 5 additions & 3 deletions
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;
Collapse file

‎deps/cjs-module-lexer/package.json‎

Copy file name to clipboardExpand all lines: deps/cjs-module-lexer/package.json
+1-1Lines changed: 1 addition & 1 deletion
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": {
Collapse file

‎doc/api/esm.md‎

Copy file name to clipboardExpand all lines: doc/api/esm.md
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.