We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9b478e commit 31c1883Copy full SHA for 31c1883
lib/internal/modules/esm/translators.js
@@ -74,12 +74,12 @@ function getSource(url) {
74
let cjsParse;
75
/**
76
* Initializes the CommonJS module lexer parser using the JavaScript version.
77
- * TODO(joyeecheung): Use `require('internal/deps/cjs-module-lexer/dist/lexer').initSync()`
78
- * when cjs-module-lexer 1.4.0 is rolled in.
79
*/
80
function initCJSParseSync() {
81
if (cjsParse === undefined) {
82
- cjsParse = require('internal/deps/cjs-module-lexer/lexer').parse;
+ const { parse, initSync } = require('internal/deps/cjs-module-lexer/dist/lexer');
+ initSync();
+ cjsParse = parse;
83
}
84
85
0 commit comments