Bun v1.2.1
Bun v1.2.1 fixes 32 bugs and adds S3 storage class support, X25519 key generation in crypto.generateKeyPair, Node's --zero-fill-buffers flag, indented inline snapshots in bun test, and a bunfig option to disable minification for HTML imports. The most technical change fixes GC memory accounting: WebKit reports a ref-counted string's cost as its byte length divided by its reference count, so Bun's Zig bindings, which briefly held an extra reference, under-reported string memory (a 64 KB file read reported as 32 KB). A new single-step createUTF8ForJS pattern avoids that extra reference. Other fixes cover fs.Stats and bigint fstat parity with Node, EINTR retries in fs reads and writes, a child_process spawn race, Worker reliability, and memory leaks in Bun.serve() and Bun.pathToFileURL caused by refcount mistakes.
Related posts
- Bun v1.1.7
Bun mediumAdept
Bun v1.1.7 fixes 28 bugs and adds glob patterns in package.json workspaces (via Bun.Glob), asymmetric matcher support in expect.extend's this.equals, and a working bunx --version. Several fixes come with root causes: a SIMD invalid memory access in Zig's std.mem.indexOfScalarPos crashing Windows startup, a misassumed 8-byte alignment of FILE_DIRECTORY_INFORMATION, threadlocal destructors running during std::quick_exit with live Workers, an uninitialized C++ integer corrupting stacktrace line numbers, and a memory leak from unread Bun.serve() request bodies since v1.0.30. Smaller changes include WebSocket close code 1015 on TLS failures, a ServerWebSocket shrink from 32 to 24 bytes, and adding clang-analyzer to CI.
- Bun v1.2.2
Bun mediumAdept
Bun v1.2.2 fixes 38 bugs and cuts idle JavaScript memory usage by 10–30% (28% for Next.js, 11% for Elysia). The fix integrates JavaScriptCore's garbage collector timers into Bun's event loop, and on Linux GC thread suspension moves from SIGUSR1 to SIGPWR so it no longer conflicts with applications that use SIGUSR1. The release also fixes a vite build regression caused by an event-loop bug in async file writes, and improves reliability of Bun.SQL prepared statements, S3 multipart uploads and the CSS parser. Node.js compatibility additions include fs.glob, NODE_PATH resolution, and fixes for fs.Dir, createRequire on virtual paths, pnpm, and DuckDB native modules.
- Bun v0.6.9
Bun mediumAdept
Bun v0.6.9 focuses on memory reductions: zero-copy string Response bodies in Bun.serve() and Response (60 MB vs Deno's 425 MB and Node's 1414 MB after 1000 responses of a 12 MB string), 50% less memory for cold bun install, and fixed leaks when importing modules. It also fixes non-ASCII filename imports, mockResolvedValue and missing function properties on mocks in bun test, a GC-related crash in the CommonJS require() loader, and a ~192-byte-per-call leak in node:crypto hashing.
- Bun v1.1.17
Bun mediumAdept
Bun v1.1.17 fixes four bugs and makes two small macOS performance improvements. A `bun repl` crash came from Bun mutating an immutable string, which only worked by accident until Zig 0.13 moved such strings into `.rodata`. `fs.readdirSync` is 5% faster in small directories because Bun now checks the XNU `getdirentries64` EOF flag instead of making an extra syscall. Also fixed: the `ws` send callback never firing, and crashes on corrupted `bun.lockb` files, now guarded by bounds and overflow checks. Waking the macOS event loop no longer allocates memory per message, using code borrowed from libxev.
- Bun v1.1.16
Bun mediumAdept
Bun v1.1.16 fixes 41 bugs and adds lcov output for `bun test --coverage`, configurable in bunfig.toml. It also adds SSH-authenticated installs from private git repositories such as GitLab and Bitbucket, and a `--sourcemap=linked` option for `bun build`. Switching base64 decoding to simdutf makes `Buffer.from(string, "base64")` 6x–30x faster on large inputs. Other fixes cover N-API modules that reassign `module.exports`, `bun:sqlite` returning a wrong `changes` count from prepared statements, WebSocket error messages and crashes, and transpiler handling of non-ASCII and zero-width characters. Internally, Bun moved to Zig 0.13, which brings a WTF-16 path fix on Windows and a cross-platform `zig-check` build target.