Visitar URL original
chore: one more fixup for nova · ExodusOSS/test@5552be7 · GitHub
Skip to content

Commit 5552be7

Browse files
committed
chore: one more fixup for nova
Refs: trynova/nova#933
1 parent ab2e1a0 commit 5552be7

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

‎bundler/bundle.js‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ const loadPipeline = [
6666
res = res.replace('.substr(i * 2, 2)', '.substring(i * 2, i * 2 + 2)')
6767
}
6868
} else if (options.platform === 'nova') {
69+
const fixupMethod = (x) => {
70+
// See https://github.com/trynova/nova/issues/932
71+
res = res.replace(`function ${x}(`, `var ${x} = function(`) // Once per name
72+
}
73+
74+
fixupMethod('_interopRequireWildcard')
6975
if (filepath.endsWith('/node_modules/get-intrinsic/index.js')) {
7076
// See https://github.com/trynova/nova/issues/933. Hacky, but should cover usage
7177
res = res.replace(
@@ -78,10 +84,7 @@ const loadPipeline = [
7884
filepath.endsWith('/node_modules/assert/build/internal/errors.js') ||
7985
filepath.endsWith('/node_modules/assert/build/internal/util/comparisons.js')
8086
) {
81-
// See https://github.com/trynova/nova/issues/932
82-
for (const x of ['_setPrototypeOf', '_wrapNativeSuper', '_typeof']) {
83-
res = res.replace(`function ${x}(`, `var ${x} = function(`) // Once per name
84-
}
87+
for (const x of ['_setPrototypeOf', '_wrapNativeSuper', '_typeof']) fixupMethod(x)
8588
}
8689
}
8790

0 commit comments

Comments
 (0)