Bun v1.0.24
Bun v1.0.24 introduces Bun Shell, an experimental embedded shell language and interpreter for running cross-platform shell scripts from JavaScript and TypeScript via the $ template tag, with interop for fetch responses, files and line-by-line output. The release also fixes 9 bugs, mostly Node.js compatibility issues. Sockets no longer close on timeout. perf_hooks.eventLoopUtilization is now defined so Hapi works. process.exit had been rejecting integer exit codes that JavaScriptCore stores as doubles, which broke Prisma CLI. Other fixes cover bun install bin linking with dangling symlinks, path.parse edge cases and a recursive console.log hang.
Related posts
- The Bun Shell
Bun mediumAdept
Bun Shell is an experimental embedded shell language and interpreter in Bun (v1.0.24+) that runs cross-platform shell scripts from JavaScript and TypeScript via the `$` tagged template. It targets the platform differences that push npm projects toward polyfill packages like rimraf, cross-env and which, as well as the roughly 7ms cost of spawning bash or sh for each command. Template variables are escaped to prevent injection, and scripts can redirect and pipe to and from Buffers, Responses and files, with builtins like cd, echo and rm. It will power package.json scripts in Bun for Windows.
- Bun v1.0.32
Bun mediumAdept
Bun v1.0.32 fixes 13 bugs, several of them regressions from the I/O rewrite in v1.0.31 done in preparation for Windows support. bun install could hang in GitHub Actions because the active lifecycle-script counter was never decremented. --frozen-lockfile and --production still installed packages, and Bun Shell hung on && and || because a file descriptor was left open. Node.js compatibility improves: the ws package can send and receive ping/pong, FileHandle read/write return correct results, util.promisify works on the timer functions, Subprocess.kill(undefined) coerces to SIGTERM, and a new --shell flag selects the bun or system shell for package.json scripts.
- Bun v1.0.30
Bun mediumAdept
Bun v1.0.30 fixes 27 bugs, including an 8x performance regression in Bun.serve() when a direct ReadableStream writes exactly one chunk in a single event-loop tick, introduced in v1.0.4. It adds a --conditions flag to bun build and the runtime for resolving package.json "exports" conditions such as react-server, plus expect.assertions() and expect.hasAssertions() in bun:test. Several crash causes are explained: a request-body Promise rejected after it was no longer pending, an incorrect JavaScriptCore tailcall intrinsic in require that broke Next.js, a TextEncoder.encode side-effects JIT bug, and uninitialized timer memory on Linux ARM64. Node.js compatibility fixes to node:stream event timing resolve hangs in prisma generate and node-fetch.
- Bun v1.0.31
Bun mediumAdept
Bun v1.0.31 adds `bun --print` (Node-compatible eval with top-level await, TypeScript and JSX), running code from stdin via `bun run -`, `bun add --trust` plus `bun pm untrusted`/`trust` for managing blocked postinstall scripts, and `fetch()`/`node:http` support for Unix and Linux abstract domain sockets. A 100% CPU bug in `Bun.spawn()` on pre-5.10 Linux kernels came from the SIGCHLD fallback never reading its eventfd, which also masked a broken signal handler; a CPU-time regression test now guards it. A build mistake that statically linked all of ICU on macOS, inflating the binary from 47.7 MB to 80.4 MB, is fixed. Streaming file I/O and process spawning were reimplemented to avoid blocking the main thread without a threadpool, alongside Node.js compatibility and bunx/install fixes.
- Bun v1.0.12
Bun mediumAdept
Bun v1.0.12 fixes 24 bugs and adds `bun -e` for evaluating inline scripts (with TypeScript, JSX and top-level await), `--env-file` for choosing which .env files to load, `server.url`, `import.meta.env`, and `expect.unreachable()` in bun:test. Macros can now import builtin modules like node:fs and node:child_process at bundle time, and `mock.module` now handles default exports and re-exports. Two fixes include root-cause explanations: a bun:sqlite `.get()` hang came from a wrong JavaScriptCore JSType tag that misled the DFG JIT, and a `require()` crash came from source code being garbage collected before an exception was thrown. As a result, Bun's debug builds now run JavaScriptCore with assertions enabled.