| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 48e5971 commit 8b9215d
7 files changed
| Original file line number | Diff line number | Diff 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 | + | ||
| 1 | 4 | 1.2.1 | |
| 2 | 5 | - Support Unicode escapes in strings (https://github.com/guybedford/cjs-module-lexer/pull/55) | |
| 3 | 6 | - Filter export strings to valid surrogate pairs (https://github.com/guybedford/cjs-module-lexer/pull/56) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -113,7 +113,7 @@ EXPORT_STAR_LIB: `Object.keys(` IDENTIFIER$1 `).forEach(function (` IDENTIFIER$2 | |||
| 113 | 113 | (`if (` IDENTIFIER$2 `in` EXPORTS_IDENTIFIER `&&` EXPORTS_IDENTIFIER `[` IDENTIFIER$2 `] ===` IDENTIFIER$1 `[` IDENTIFIER$2 `]) return` `;`)? | |
| 114 | 114 | )? | |
| 115 | 115 | ) | | |
| 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 `)`))? `)` | ||
| 117 | 117 | ) | |
| 118 | 118 | ( | |
| 119 | 119 | EXPORTS_IDENTIFIER `[` IDENTIFIER$2 `] =` IDENTIFIER$1 `[` IDENTIFIER$2 `]` `;`? | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -651,8 +651,10 @@ function tryParseObjectDefineOrKeys (keys) { | |||
| 651 | 651 | if (ch !== 33/*!*/) break; | |
| 652 | 652 | pos += 1; | |
| 653 | 653 | 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()) { | ||
| 656 | 658 | ch = commentWhitespace(); | |
| 657 | 659 | if (ch !== 46/*.*/) break; | |
| 658 | 660 | pos++; | |
@@ -669,7 +671,7 @@ function tryParseObjectDefineOrKeys (keys) { | |||
| 669 | 671 | if (ch !== 41/*)*/) break; | |
| 670 | 672 | pos += 1; | |
| 671 | 673 | } | |
| 672 | - else if (!tryParseObjectHasOwnProperty(it_id)) break; | ||
| 674 | + else break; | ||
| 673 | 675 | ch = commentWhitespace(); | |
| 674 | 676 | } | |
| 675 | 677 | if (ch !== 41/*)*/) break; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,6 @@ | |||
| 1 | 1 | { | |
| 2 | 2 | "name": "cjs-module-lexer", | |
| 3 | - "version": "1.2.1", | ||
| 3 | + "version": "1.2.2", | ||
| 4 | 4 | "description": "Lexes CommonJS modules, returning their named exports metadata", | |
| 5 | 5 | "main": "lexer.js", | |
| 6 | 6 | "exports": { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1332,7 +1332,7 @@ success! | |||
| 1332 | 1332 | [`transformSource` hook]: #esm_transformsource_source_context_defaulttransformsource | |
| 1333 | 1333 | [`string`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String | |
| 1334 | 1334 | [`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 | ||
| 1336 | 1336 | [custom https loader]: #esm_https_loader | |
| 1337 | 1337 | [special scheme]: https://url.spec.whatwg.org/#special-scheme | |
| 1338 | 1338 | [the official standard format]: https://tc39.github.io/ecma262/#sec-modules | |
| Back | FazBrowse Home | New Git URL |
0 commit comments