Bun v1.4.2 Fixes Elysia Build Breakage and AsyncLocalStorage Memory Leak from v1.4.1
What shipped
Bun v1.4.2, published September 5, 2026 — 21 hours after v1.4.1 — as a regression-fix release for the JavaScript runtime.
What changed
- Fixed:
bun buildvariable collision. A v1.4.1 regression renamed a nestedvarto the same name as aletin the same block, so builds importing Elysia failed withSyntaxError: Cannot declare a var variable that shadows a let/const/class variable. The same bug could name aletafter a function parameter or catch binding — code that runs but computes wrong values. - Fixed: AsyncLocalStorage memory leak. A timer, immediate, or promise created inside
store.exit()or a nestedstore.run()kept the outer store's per-request context alive for as long as it existed. - Fixed: worker_threads
'online'event order. Workers no longer skip the event@discordjs/wswaits on before its first message; ordering now matches Node.js. - Bun.Image now decodes CMYK and YCCK JPEGs (converted to RGB), and the JavaScriptCore upgrade pulls in ~350 upstream WebKit commits, including TypedArray and Intl correctness fixes.
Why a builder cares
If an Elysia deploy started failing or a long-running Bun server's RSS started climbing since September 4, this is the fix — bun upgrade. The window was only 21 hours, but anyone tracking latest got a release that broke builds and leaked memory. Pin and read notes before fast-follow upgrades.