Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Bun 13 min read Release mediumAdept

Bun v1.2.18

Bun v1.2.18 fixes 52 issues and adds ReadableStream .text()/.json()/.bytes()/.blob(), ReadableStream stdin for Bun.spawn, permessage-deflate compression for the WebSocket client, and Math.sumPrecise. Large fetch() and S3 uploads now apply backpressure, pausing stream reads while the socket is busy so memory stays flat, and S3 writer.flush() resolves after each part uploads. Native addon performance improves: napi_create_buffer skips zero-initialization for about 30% faster large allocations, and sliced strings are no longer cloned. Node.js compatibility work includes reporting as Node v24.3.0, fs.glob matching directories by default, and http2 remoteSettings and net error-handling fixes.

Related posts

  • Bun v1.1.27

    Bun mediumAdept

    Bun v1.1.27 fixes 130 bugs and rewrites node:zlib in native code, roughly doubling streaming deflate/gzip throughput over v1.1.26 and beating Node 22 on streams, though sync compression still trails Node. It adds `bun pm pack` as an npm pack replacement and extends Bun.serve() with static routes, streaming request/response clone(), ReadableStream cancel on abort, per-request timeouts, and a faster buffered-body path (65k vs 29k req/s). Fixes explain several root causes: signal propagation in `bun run`, a strong Promise reference leaking memory in Request, and missing V8-style handle scopes in N-API, which let JavaScriptCore's stack-scanning GC free heap-allocated values early.

  • Bun v1.1.23

    Bun mediumAdept

    Bun v1.1.23 fixes 27 bugs and adds TextEncoderStream/TextDecoderStream, the TextDecoder stream option, Float16Array, and truncation of large arrays in console.log after 100 elements. console.log(string) is 50% faster: a single-string fast path that still needed extra writes for the newline and ANSI reset was dropped in favor of buffered writes. Bun now throws proper errors instead of crashing or truncating when Blob/Request/Response bodies or fs.readFile exceed JavaScriptCore's 2^32-1 length limit. Other fixes cover duplicate sends caused by mishandled backpressure in the ws module, Bun-to-Node IPC on Windows, JIT crashes in node:vm contexts, bundler hoisting of tagged template literals, and >4GB responses from Bun.serve.

  • Bun v1.1.21

    Bun mediumAdept

    Bun v1.1.21 fixes 72 bugs and speeds up gzip/deflate decompression in fetch() by 30% on Linux x64 by switching to libdeflate, which also speeds up the WebSocket server. A new --fetch-preconnect flag and fetch.preconnect() API open the DNS/TCP/TLS connection before user code runs, cutting a first request from about 52ms to 8ms in the shown example. Linker, compiler and LTO changes shrink the Linux binary by 4 MB to 92 MB and trim 1ms from startup. The bundler adds --packages=external and content-aware code-splitting hashes, alongside many Node.js compatibility and crash fixes.

  • 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 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.

The quest for software engineering knowledge.

Look:
Layout: