mirror of https://gitee.com/openkylin/nodejs.git
cannot rebuilt dist/lexer.js, just use pure-js lexer
Last-Update: 2020-11-24 Forwarded: not-needed Gbp-Pq: Name cjs-module-lexer.patch
This commit is contained in:
parent
757c1c8fc4
commit
7587a7d37e
|
@ -59,14 +59,7 @@ const asyncESM = require('internal/process/esm_loader');
|
||||||
|
|
||||||
let cjsParse;
|
let cjsParse;
|
||||||
async function initCJSParse() {
|
async function initCJSParse() {
|
||||||
if (typeof WebAssembly === 'undefined') {
|
cjsParse = require('internal/deps/cjs-module-lexer/lexer').parse;
|
||||||
cjsParse = require('internal/deps/cjs-module-lexer/lexer').parse;
|
|
||||||
} else {
|
|
||||||
const { parse, init } =
|
|
||||||
require('internal/deps/cjs-module-lexer/dist/lexer');
|
|
||||||
await init();
|
|
||||||
cjsParse = parse;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const translators = new SafeMap();
|
const translators = new SafeMap();
|
||||||
|
|
1
node.gyp
1
node.gyp
|
@ -250,7 +250,6 @@
|
||||||
'deps/acorn-plugins/acorn-private-methods/index.js',
|
'deps/acorn-plugins/acorn-private-methods/index.js',
|
||||||
'deps/acorn-plugins/acorn-static-class-features/index.js',
|
'deps/acorn-plugins/acorn-static-class-features/index.js',
|
||||||
'deps/cjs-module-lexer/lexer.js',
|
'deps/cjs-module-lexer/lexer.js',
|
||||||
'deps/cjs-module-lexer/dist/lexer.js',
|
|
||||||
],
|
],
|
||||||
'node_mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)node_mksnapshot<(EXECUTABLE_SUFFIX)',
|
'node_mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)node_mksnapshot<(EXECUTABLE_SUFFIX)',
|
||||||
'mkcodecache_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mkcodecache<(EXECUTABLE_SUFFIX)',
|
'mkcodecache_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mkcodecache<(EXECUTABLE_SUFFIX)',
|
||||||
|
|
Loading…
Reference in New Issue