Skip to content

build: bundle runtime dependencies and drop them from dependencies - #115

Merged
cabljac merged 1 commit into
noninteractive/09-gh-credentialsfrom
noninteractive/10-bundle-deps
Oct 17, 2026
Merged

cabljac merged 1 commit into
noninteractive/09-gh-credentialsfrom
noninteractive/10-bundle-deps

Conversation

@cabljac

@cabljac cabljac commented Oct 14, 2026 •

Copy link
Copy Markdown
Owner

bun build --target node already inlines @clack/prompts and execa, so dist/index.js imports only Node builtins. They were still dependencies, so npm install -g venfork, which every scheduled sync runs, installed packages the CLI never loads. Both move to devDependencies. bun.lock is aligned by hand, and bun install --frozen-lockfile still passes.

smoke:node, in verify and the release job, now fails when the bundle imports a non-builtin. It then packs the tarball, installs it offline with --omit=dev into an empty project, requires node_modules to hold only venfork, and runs --version and doctor --json on the fixture. Red-first: with the deps put back, the smoke failed with ENOTCACHED, and a foreign import also failed it. 2 new unit tests cover nonBuiltinImports.

bun run verify exits 0. No feature file applies. Count gate: unit 1163 to 1165, integration 410.

Not verified: e2e tiers, and the smoke under Node 22 locally (CI runs 22 and 24).

Part of the 0.13.0 non-interactive and portable stack.

@cabljac
cabljac added this pull request to stack #116 October 14, 2026 14:22
@cabljac
cabljac force-pushed the noninteractive/10-bundle-deps branch from 1c4a615 to 57bdf71 Compare October 14, 2026 23:16
@cabljac
cabljac force-pushed the noninteractive/10-bundle-deps branch from 57bdf71 to be54d3e Compare October 15, 2026 01:10
@cabljac
cabljac marked this pull request as ready for review October 16, 2026 08:55
bun build inlines @clack/prompts and execa, so dist/index.js imports only Node builtins. Both move to devDependencies and npm install -g venfork installs no other package, which shortens every scheduled sync's install step.

smoke:node now fails when the bundle imports a non-builtin, then packs the package, installs the tarball offline with --omit=dev into an empty project, checks that only venfork lands in node_modules, and runs its bin (--version, doctor --json) under Node.
@cabljac
cabljac force-pushed the noninteractive/10-bundle-deps branch from be54d3e to d82eb22 Compare October 17, 2026 17:07
@cabljac
cabljac merged commit 28f3dd0 into main Oct 17, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant