Bun 1.4.2
Rapid Patch Roundup
Bun 1.4.2 lands as a tightly-scoped patch release that cleans up the rough edges left by 1.4.1. Three contributors pitched in, including core maintainer Jarred Sumner. If you were tripping over Elysia builds or leaking memory with AsyncLocalStorage, this one is for you.
Bug Bashes
- bun build variable collision - A 1.4.1 regression renamed a nested var to the same name as a let in one block, breaking Elysia imports with a shadowing SyntaxError. Fixed, with a regression test.
- AsyncLocalStorage leak - Timers and promises created inside store.exit() kept outer store values alive indefinitely, silently raising memory use. Now released properly.
- worker_threads online event - Node-compatible ordering fixes a hang in @discordjs/ws that waited on a worker's first message.
- Bun.Image CMYK JPEGs - Four-component CMYK and YCCK JPEGs now decode and convert to RGB instead of failing with decode failed.
Engine Upgrades
Bun pulls in roughly 350 upstream WebKit commits. That brings Intl and TypedArray correctness fixes, a Proxy crash fix, and cheaper Date objects. Intl.PluralRules now handles bigint selectors without throwing a TypeError.
Bits and Fixes
- Fixed a rare JIT crash after prototype GC in long-running processes.
- Fixed musl (Alpine) crashes on Array.prototype.splice, shift, and shrinking array.length during GC marking.
- .json() now surfaces the real JSON.parse SyntaxError message instead of a generic failure.
- bun install and bun add no longer panic with range end index out of range on hash mismatches.
- FileSink on Linux avoids double-closing descriptors when epoll registration fails.
Upgrade with bun upgrade. A small patch, but a steady one.