Skip to content

Commit

Permalink
deps: update to [email protected]
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Mar 30, 2021
1 parent 30fe4ed commit 320e58f
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 11 deletions.
4 changes: 4 additions & 0 deletions deps/cjs-module-lexer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
1.1.1
- Better support for Babel reexport getter function forms (https://github.com/guybedford/cjs-module-lexer/issues/50)
- Support Babel interopRequireWildcard reexports patterns (https://github.com/guybedford/cjs-module-lexer/issues/52)

1.1.0
- Support for Babel reexport conflict filter (https://github.com/guybedford/cjs-module-lexer/issues/36, @nicolo-ribaudo)
- Support trailing commas in getter patterns (https://github.com/guybedford/cjs-module-lexer/issues/31)
Expand Down
2 changes: 1 addition & 1 deletion deps/cjs-module-lexer/dist/lexer.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions deps/cjs-module-lexer/dist/lexer.mjs

Large diffs are not rendered by default.

30 changes: 23 additions & 7 deletions deps/cjs-module-lexer/lexer.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,18 @@ function parseSource (cjsSource) {
lastTokenPos = pos;
continue;
case 95/*_*/:
if (source.startsWith('_export', pos + 1) && (keywordStart(pos) || source.charCodeAt(pos - 1) === 46/*.*/)) {
if (source.startsWith('interopRequireWildcard', pos + 1) && (keywordStart(pos) || source.charCodeAt(pos - 1) === 46/*.*/)) {
const startPos = pos;
pos += 23;
if (source.charCodeAt(pos) === 40/*(*/) {
pos++;
openTokenPosStack[openTokenDepth++] = lastTokenPos;
if (tryParseRequire(Import) && keywordStart(startPos)) {
tryBacktrackAddStarExportBinding(startPos - 1);
}
}
}
else if (source.startsWith('_export', pos + 1) && (keywordStart(pos) || source.charCodeAt(pos - 1) === 46/*.*/)) {
pos += 8;
if (source.startsWith('Star', pos))
pos += 4;
Expand Down Expand Up @@ -724,12 +735,17 @@ function tryParseObjectDefineOrKeys (keys) {
if (ch !== 103/*g*/ || !source.startsWith('et', pos + 1)) break;
pos += 3;
ch = commentWhitespace();
if (ch !== 58/*:*/) break;
pos++;
ch = commentWhitespace();
if (ch !== 102/*f*/ || !source.startsWith('unction', pos + 1)) break;
pos += 8;
ch = commentWhitespace();
if (ch === 58/*:*/) {
pos++;
ch = commentWhitespace();
if (ch !== 102/*f*/) break;
if (!source.startsWith('unction', pos + 1)) break;
pos += 8;
let lastPos = pos;
ch = commentWhitespace();
if (ch !== 40 && (lastPos === pos || !identifier())) break;
ch = commentWhitespace();
}
if (ch !== 40/*(*/) break;
pos++;
ch = commentWhitespace();
Expand Down
2 changes: 1 addition & 1 deletion deps/cjs-module-lexer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cjs-module-lexer",
"version": "1.1.0",
"version": "1.1.1",
"description": "Lexes CommonJS modules, returning their named exports metadata",
"main": "lexer.js",
"exports": {
Expand Down

0 comments on commit 320e58f

Please sign in to comment.