Bun v0.7.2
Bun v0.7.2 adds node:worker_threads, node:diagnostics_channel and a global BroadcastChannel, lets structuredClone/postMessage clone Error objects, and adds `bun .` to run a project's main file. At runtime Bun stops honoring the "browser" and "module" package.json exports conditions, now resolving only bun, worker, node and default (plus import/require), which fixes breakage in Astro, axios and tslib-dependent packages. Two memory leaks are fixed: a ~16-byte leak in native strong references affecting fetch, Bun.spawn, napi and streams, and a double header clone in response.clone(). Large TypedArray creation gets up to 40x faster, and moving builtins from ESM to CommonJS cuts "crypto" import start time by about 30%.
Related posts
- Bun v0.7.0
Bun mediumAdept
Bun v0.7.0 focuses on Node.js compatibility: it can now run `vite dev` (experimentally, via `bun --bun` to override the node shebang), supports Web `Worker` threads with `postMessage` and `structuredClone()`, and implements `AsyncLocalStorage` from `node:async_hooks` as a step toward Next.js support. Other additions include a `--smol` flag that shrinks and slows growth of the JavaScriptCore heap for memory-constrained environments, `bun test --bail`, `Bun.readableStreamToFormData()`, `serialize`/`deserialize` in `bun:jsc`, WebSocket ping/pong with `nodebuffer` as the default binaryType, and many `node:tls` TLSSocket methods. Fixes include a Response memory leak that cut peak memory in a benchmark from 292 MB to 49 MB, base64url hash output matching Node.js, and module resolution ordering for dual CJS/ESM packages like graphql.
- Bun v1.1.13
Bun mediumAdept
Bun v1.1.13 fixes 97 bugs and adds `eval: true` for `node:worker_threads`, `URL.createObjectURL` for spawning TypeScript workers from Blobs, custom failure messages in `expect`, and five new `bun:test` matchers. Several fixes come with explanations of their cause. Concurrent `fetch` failures came from TCP FIN handling, now fixed by setting `SO_LINGER` to 0 to avoid TIME_WAIT socket exhaustion. A `Last-Modified` manifest-cache shortcut in `bun install` broke HTTP keep-alive and has been disabled. Stack-trace offsets were traced to how line and column numbers were read from JavaScriptCore. `crypto.pbkdf2` now uses BoringSSL instead of a JS polyfill, running about 30-40x faster than before and roughly 3x faster than Node.js. Other fixes cover semver parsing, npm manifest string deduplication and WebSocket server crashes.
- Bun v0.3.0
Bun mediumAdept
Bun v0.3.0 focuses on stability and Node.js/Web API compatibility, cutting memory use 3-5x under load by scheduling garbage collection in coordination with the event loop and speeding up TextEncoder.encodeInto() 3x via simdutf. New Node.js APIs include node:child_process, process stdio streams, Error.captureStackTrace and fs streams, alongside automatic npm package installs on import when no node_modules exists. Other additions are a native Next.js-style FileSystemRouter, console as an AsyncIterable for reading stdin, threadsafe bun:ffi callbacks, new bun:test matchers with a faster toEqual(), and a long list of fetch, spawn and crash fixes.
- Bun v1.2.16
Bun mediumAdept
Bun v1.2.16 fixes 73 issues and adds 119 passing Node.js tests. Headline changes are serving files directly through Bun.serve routes, an install.linkWorkspacePackages bunfig option that installs workspace dependencies from the registry (useful in CI), bun outdated support for catalog dependencies, and Bun.hash.rapidhash. Node.js compatibility improves through a node:net rework, vm.SyntheticModule, an llhttp-backed HTTPParser binding and AbortController handling in timers/promises. The release also fixes memory leaks in N-API handle scopes and unread Bun.spawn stdio, plus assorted TLS, HTTP/2, CSS parser and Windows bugs.
- Bun v1.2.13
Bun mediumAdept
Bun v1.2.13 fixes 17 bugs and improves Node.js compatibility, adding worker_threads environmentData, a process 'worker' event, and stability fixes for workers and --hot mode. Embedded native addons from bun build --compile now have their temp files deleted immediately after loading, and a new --no-addons flag disables process.dlopen and the "node-addons" export condition. Other changes include a WebKit upgrade that unrolls numeric hot loops, BOM-aware .npmrc parsing, HMR WebSocket protocol normalization for older Chrome, Redis getBuffer(), Bun.SQL type fixes, and reduced memory use when spawning child processes with IPC.