Skip to content

Commit 8a00f66

Browse files
committed
fix(node-smol-builder): use socket package bootstrap not local stub
Fix bootstrap path to use packages/socket/dist/bootstrap.js instead of attempting to create a local stub. The socket package contains the thin wrapper bootstrap that downloads @socketsecurity/cli on first run. Architecture: - packages/socket builds dist/bootstrap.js (thin wrapper) - node-smol-builder embeds it into Node.js as internal/bootstrap/socketsecurity - node-sea-builder uses same bootstrap in SEA blob Previous error: Cannot find native builtin: "internal/bootstrap/socketsecurity" SIGABRT at startup Root cause: Bootstrap was not being copied because it was looking in the wrong location (node-smol-builder/bin/ instead of socket/dist/).
1 parent b596bd1 commit 8a00f66

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

packages/node-smol-builder/bin/bootstrap.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

packages/node-smol-builder/scripts/build.mjs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,12 +281,14 @@ async function copyBuildAdditions() {
281281
* (Optional - only runs if bootstrap file exists)
282282
*/
283283
async function copySocketSecurityBootstrap() {
284-
const bootstrapSource = join(ROOT_DIR, 'bin', 'bootstrap.js')
284+
// Use bootstrap from socket package (thin wrapper that downloads @socketsecurity/cli).
285+
const bootstrapSource = join(ROOT_DIR, '..', 'socket', 'dist', 'bootstrap.js')
285286

286-
// Skip if bootstrap file doesn't exist yet (future enhancement).
287+
// Skip if bootstrap file doesn't exist yet.
287288
if (!existsSync(bootstrapSource)) {
288289
logger.log('')
289-
logger.log(`${colors.blue('ℹ')} Skipping Socket security bootstrap (bin/bootstrap.js not found)`)
290+
logger.log(`${colors.blue('ℹ')} Skipping Socket security bootstrap (packages/socket/dist/bootstrap.js not found)`)
291+
logger.log(`${colors.blue('ℹ')} Run 'pnpm --filter socket run build' to create it`)
290292
logger.log('')
291293
return
292294
}

0 commit comments

Comments
 (0)