Bun v1.0.21
Bun v1.0.21 fixes 33 bugs and focuses on memory: blob.arrayBuffer() now uses copy-on-write virtual memory mappings for blobs of 8 MB or more (1 MB with --smol), so 100 copies of a 128 MB blob use 192 MB instead of 12.9 GB. bun:sqlite now reports SQLite's memory to the garbage collector, cutting usage 4x for 100,000 prepared statements, and throws SQLiteError with extended error codes and messages. The release also adds console.table(), Blob support in Bun.CryptoHasher and a toBeObject matcher. It fixes path-string memory leaks in Bun.file, Bun.write and node:fs errors, plus several TLS and WebSocket crashes.
Related posts
- Bun v1.0.26
Bun mediumAdept
Bun v1.0.26 fixes 30 bugs and adds multi-statement queries to bun:sqlite via db.run() and db.exec(), though not query or prepare. bun --watch now reliably closes file descriptors on reload, using close_range(2) on Linux and POSIX_SPAWN_CLOEXEC_DEFAULT on macOS, and resets signal handlers. Other fixes address Bun.FileSystemRouter failing past 64 routes (a JavaScriptCore inline-property assertion), V8 stack-trace API compatibility (undefined error.stack, negative CallSite line numbers, default Error.prepareStackTrace), toStrictEqual with deleted properties, and undrained microtask queues in websockets, spawn and IPC that caused memory growth. Windows support is targeted for February 15.
- 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 v1.2.1
Bun mediumAdept
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.
- Bun v1.0.20
Bun mediumAdept
Bun v1.0.20 cuts memory usage in node:fs async operations by avoiding redundant cross-thread string clones. Benchmarks show fs.readlink and fs.stat dropping from 107 MB to about 45–71 MB RSS, and a fs.writeFile leak with large non-ASCII strings falling from 1,696 MB to 91 MB. HTMLRewriter.transform now accepts strings and ArrayBuffers and has a destructor-timing leak fixed, and fs.readFile/writeFile gain hex and base64 encodings. A Linux setTimeout high-CPU regression is fixed, Bun.spawn gains a resourceUsage report, and debug builds use macOS malloc zones to track native allocations.
- Bun v1.0.19
Bun mediumAdept
Bun v1.0.19 fixes 26 bugs and replaces bun-types with @types/bun, which re-exports the real @types/node to avoid type conflicts. Timers get 4x higher throughput on Linux by swapping a timerfd-per-timer for a timer heap from libxev. Bun.spawnSync uses in-memory file descriptors instead of pipes for 50% faster large-output handling, and Bun.peek is 90x faster via a JavaScriptCore bytecode intrinsic. --frozen-lockfile now compares a hash of sorted package names and versions rather than filesystem input. The release also adds N-API fixes that let bcrypt and argon2 work, mock.module specifier resolution, and an embedded SQLite upgrade to 3.44.2.