Skip to content

Commit 8d615a6

Browse files
chore: writes compiled mongosh to lib-boxednode instead of lib to avoid linking it twice when building node
1 parent 16215d0 commit 8d615a6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ async function compileJSFileAsBinaryImpl (options: CompilationOptions, logger: L
312312
}
313313

314314
logger.stepStarting('Inserting custom code into Node.js source');
315-
await fs.mkdir(path.join(nodeSourcePath, 'lib', namespace), { recursive: true });
315+
await fs.mkdir(path.join(nodeSourcePath, 'lib-boxednode', namespace), { recursive: true });
316316
let entryPointTrampolineSource = await fs.readFile(
317317
path.join(__dirname, '..', 'resources', 'entry-point-trampoline.js'), 'utf8');
318318
entryPointTrampolineSource = entryPointTrampolineSource.replace(
@@ -322,9 +322,9 @@ async function compileJSFileAsBinaryImpl (options: CompilationOptions, logger: L
322322
enableBindingsPatch
323323
}));
324324
await fs.writeFile(
325-
path.join(nodeSourcePath, 'lib', namespace, `${namespace}.js`),
325+
path.join(nodeSourcePath, 'lib-boxednode', namespace, `${namespace}.js`),
326326
entryPointTrampolineSource);
327-
extraJSSourceFiles.push(`./lib/${namespace}/${namespace}.js`);
327+
extraJSSourceFiles.push(`./lib-boxednode/${namespace}/${namespace}.js`);
328328
logger.stepCompleted();
329329

330330
logger.stepStarting('Storing executable metadata');

0 commit comments

Comments
 (0)