Bun v1.0.12
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.
Related posts
- Bun v1.0.8
Bun mediumAdept
Bun v1.0.8 fixes 138 bugs, fixes a require() memory leak (introduced when built-in modules moved from ESM to CommonJS) that cuts memory up to 30%, and adds runtime module mocking to bun test via mock.module, which updates existing ESM and CJS imports in place. bun install no longer duplicates peer dependencies and now orders pre-release tags by semver precedence. Notable runtime fixes include a waitpid-thread fallback for Bun.spawn where pidfd_open is unavailable (gVisor, older kernels), a kqueue process-exit race on macOS, Node-aligned setTimeout(0) and setImmediate semantics, and fetch() silently accepting untrusted TLS certificates due to BoringSSL error handling.
- Bun v0.6.12
Bun mediumAdept
Bun v0.6.12 makes runtime errors more readable by patching JavaScriptCore to format Error.prototype.stack like V8, hiding internal builtin frames, and automatically sourcemapping stacks back to original (pre-transpile) source. It also improves CommonJS/ESM interop by inserting the __esModule annotation on require of ES modules and stops using package.json's "module" field at runtime to match Node.js resolution. Other changes include SQLite FTS5 full-text search, a new Bun.file(path).exists() method, node:http and node:stream fixes that unblock Google Maps and ytdl-core packages, a minifier rewrite of obj["a"] to obj.a, and several bundler bugfixes.
- Bun v1.3.10
Bun mediumAdept
Bun v1.3.10 replaces its npm-based REPL with a native Zig REPL that supports top-level await, imports, history and tab completion. It also adds full TC39 stage-3 standard decorators, self-contained HTML output via `--compile --target=browser`, native Windows ARM64, and a global `--retry` flag for `bun test`. Bundler changes include barrel-file import optimization (automatic for `sideEffects: false` packages) and leaner module wrappers that cut 11% of heap objects on a large React app. Runtime changes include mTLS keepalive pooling, a JavaScriptCore upgrade (168x faster deep rope slicing, a faster `endsWith`), and structuredClone fast paths up to 25x faster for dense primitive arrays.
- 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.3.9
Bun mediumAdept
Bun v1.3.9 adds `bun run --parallel` and `--sequential` for running package.json scripts with prefixed output across workspaces, along with Node-compatible HTTP/2 connection upgrades via `net.Server`, `Symbol.dispose` support for test mocks, `NO_PROXY` handling for explicit proxies, `--cpu-prof-interval`, and ESM bytecode in `--compile`. A JavaScriptCore upgrade brings SIMD-accelerated RegExp prefix search on ARM64 and x86_64, JIT compilation of fixed-count parenthesized subpatterns (~3.9x faster), DFG/FTL intrinsics for `startsWith`, `Set/Map#size` (2.2-2.7x) and `trim`, and rope-returning `String#replace`. Fixes include SIGILL crashes on ARMv8.0 CPUs caused by mimalloc LSE atomics, a chunked-encoding request smuggling bug, and keep-alive hangs for proxy-style requests.