Bun v1.1.40
Bun v1.1.40 fixes 14 bugs and adds an `install.saveTextLockfile` option in bunfig.toml so the text-based `bun.lock` format can be the default ahead of Bun v1.2. It fixes a v1.1.39 regression where `process.on` could crash in Workers, single-file executables or macros, and corrects N-API BigInt handling (trailing zeros in `napi_create_bigint_words` and the unset `lossless` flag) that affected DuckDB. Git/GitHub dependency installs are more reliable, because their dependencies aren't known until download. A WebKit upgrade fixes DFG JIT edge cases and a lock that could unlock too early.
Related posts
- Bun v1.1.39
Bun mediumAdept
Bun v1.1.39 introduces bun.lock, a human-readable text lockfile that improves git diffs and works with tools like Dependabot and Renovate, and makes cached bun install 30% faster. It adds streaming fetch() request bodies (chunked transfer encoding, or Content-Length when the size is known) and a zero-copy native onBeforeParse plugin API for Bun.build(), written in Rust via napi.rs, that runs in Bun's threadpool. Other changes include inline snapshot tests in bun:test, heap snapshots that count native memory, a 15% peak-RSS reduction for churned WebSocket server connections, full Node test-suite parity for string_decoder, punycode and querystring, and a WebKit upgrade bringing Error.isError and a 44% faster String.prototype.at.
- Bun's new text-based lockfile
Bun mediumAdept
Bun v1.1.39 introduces bun.lock, a JSONC text lockfile enabled via `bun install --save-text-lockfile`, replacing the hard-to-review binary bun.lockb and planned as the default in Bun v1.2. Existing bun.lockb or package-lock.json files are migrated with resolutions preserved, and GitHub diffs, VS Code highlighting and tools like Dependabot can now read the lockfile. Cached no-op installs with the text lockfile are 30% faster than v1.1.38's binary path, because the speed comes from structure-of-arrays layouts with indices instead of pointers, an 8-byte small string optimization in Zig, and careful use of syscalls like clonefile and memfd_create, not from the binary format.
- Bun v1.1.34
Bun mediumAdept
Bun v1.1.34 fixes 64 bugs and adds Bun.randomUUIDv7() for sortable, database-friendly IDs, more aggressive garbage collection while idle in the event loop to cut memory in long-running processes, and Node-API type tagging (napi_type_tag_object/napi_check_object_type_tag) that unblocks tree-sitter. Secrets in bunfig.toml and .npmrc error logs are now redacted, and bun build --compile inlines process.versions.bun so native addons can be bundled statically. Fixes include ReadableStream spec issues pulled from WebKit, HTTP/1.1 header compliance via uWebSockets, an Amazon Linux 2 regression caused by a newer-glibc powf dependency (now guarded by a glibc 2.27 symbol test), and several bun install and Node.js compatibility bugs.
- Bun v1.0.7
Bun mediumAdept
Bun v1.0.7 fixes 59 bugs and adds support for optional peer dependencies in `bun install`, so packages marked optional in `peerDependenciesMeta` are no longer installed unless the root project lists them. Notable fixes include sorting registry versions before semver matching (some registries don't return them in order), a non-deterministic `bun.lockb` on Linux, a napi memory leak caused by a refcount starting at 1, `child_process` IPC reliability, and a Docker "port in use" error fixed by falling back from IPv6 to IPv4 binding. The build system is also moving from a large Makefile to cmake and ninja ahead of regular Windows builds.
- 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.