Bun
JavaScript runtime, bundler, test runner, and package manager.
Goals
Replace the Node/tsc/jest/npm stack with a single tool that runs TypeScript directly, runs tests, and compiles a self-contained binary for deployment as a scheduled task — without a build pipeline.
Effectiveness
Excellent. Runs TypeScript without configuration, compiles to a standalone binary that requires no runtime at the target machine, and provides a Jest-compatible test runner. Three tools replaced by one, with no compromises on the features we actually use.
What made it effective
bun build --compile --outfile dist/inertia-millproduces a single self-contained binary.ensure-deps.shrebuilds it automatically when the source is newer. Scheduled tasks run the binary — no Bun, Node, or npm required at runtime.- Native TypeScript support with
.tsextension imports means zero tsc configuration. Files just work. bun:testis Jest-compatible enough that all existing test patterns transferred unchanged.
Bonus utility
bunx runs CLI tools from npm without installation — useful for one-off wrangler invocations during deployment without adding it as a dependency.
Friction / pain points / surprises
spawnSync comes from Node's child_process, not Bun's native API. Bun exposes Node compatibility APIs — import { spawnSync } from "child_process" works — but it's not obvious whether you should prefer Bun's Bun.spawnSync or Node's. We use the Node import; it works fine but the duality is a minor cognitive overhead.
4MB maxBuffer limit on spawnSync. Large axe outputs could approach this. Hasn't been hit, but it's an invisible ceiling that will produce a cryptic error when it's hit.