Compare commits
No commits in common. "366ffe1ac9c3a61cc98212f8bb7d9e59b02a16f4" and "1f5eb3657e6699067003be2e8ff146aef0115355" have entirely different histories.
366ffe1ac9
...
1f5eb3657e
|
@ -69,8 +69,7 @@ function bundleNativeModulesPlugin() {
|
|||
// Not edited
|
||||
return edits.push([node.start, node.end]);
|
||||
}
|
||||
for (const matchString of ["require('loady')(__str_aName, __any)"]) {
|
||||
const findLoady = (0, ast_matcher_1.default)(matchString);
|
||||
const findLoady = (0, ast_matcher_1.default)("require('loady')(__str_aName, __any)");
|
||||
const loadyMatches = findLoady(ast);
|
||||
if (loadyMatches?.length) {
|
||||
for (const match of loadyMatches) {
|
||||
|
@ -82,12 +81,7 @@ function bundleNativeModulesPlugin() {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for (const matchString of [
|
||||
"require('node-gyp-build')(__any)",
|
||||
"loadNAPI(__any)",
|
||||
]) {
|
||||
const findNodeBuildGyp = (0, ast_matcher_1.default)(matchString);
|
||||
const findNodeBuildGyp = (0, ast_matcher_1.default)("require('node-gyp-build')(__any)");
|
||||
const nodeBuildGypMatches = findNodeBuildGyp(ast);
|
||||
if (nodeBuildGypMatches?.length) {
|
||||
for (const match of nodeBuildGypMatches) {
|
||||
|
@ -105,7 +99,6 @@ function bundleNativeModulesPlugin() {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (edits.length === 0) {
|
||||
return null;
|
||||
}
|
||||
|
|
12
src/index.ts
12
src/index.ts
|
@ -80,8 +80,7 @@ export default function bundleNativeModulesPlugin() {
|
|||
return edits.push([node.start, node.end]);
|
||||
}
|
||||
|
||||
for (const matchString of ["require('loady')(__str_aName, __any)"]) {
|
||||
const findLoady = astMatcher(matchString);
|
||||
const findLoady = astMatcher("require('loady')(__str_aName, __any)");
|
||||
const loadyMatches = findLoady(ast);
|
||||
|
||||
if (loadyMatches?.length) {
|
||||
|
@ -98,13 +97,8 @@ export default function bundleNativeModulesPlugin() {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (const matchString of [
|
||||
"require('node-gyp-build')(__any)",
|
||||
"loadNAPI(__any)",
|
||||
]) {
|
||||
const findNodeBuildGyp = astMatcher(matchString);
|
||||
const findNodeBuildGyp = astMatcher("require('node-gyp-build')(__any)");
|
||||
const nodeBuildGypMatches = findNodeBuildGyp(ast);
|
||||
|
||||
if (nodeBuildGypMatches?.length) {
|
||||
|
@ -127,7 +121,7 @@ export default function bundleNativeModulesPlugin() {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (edits.length === 0) {
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue