Bun v1.4.5
This is a security release. It updates lsquic, c-ares, SQLite, llhttp and BoringSSL.
Bun v1.4.1 修复了 202 个问题,并引入了多项重要功能,例如 Bun.serve 中的 HTTP/2 支持、Bun.write() 将 Response 正文流式写入磁盘、自包含的工作区 node_modules,以及 bun install --offline/--prefer-offline。它还新增了 WebSocket 的 pause() 和 resume()、crypto.argon2、通过动态 import() 实现的 tree-shaking(摇树优化)、更智能的 CommonJS 到 ESM 默认导入转换,以及交叉编译时的 --compile --bytecode 支持。性能得到显著提升,包括更快的启动速度、最高快 9 倍的 Buffer 读写、快 2 倍的 AsyncLocalStorage,以及更小、启动更快的已编译可执行文件,此外还包含大量错误修复和 Node.js 兼容性增强。
Fixes 202 issues, addressing 236 👍. HTTP/2 in Bun.serve, Bun.write() streams Response bodies to disk, self-contained workspace node_modules, bun install --offline and --prefer-offline, WebSocket pause() and resume(), crypto.argon2, tree-shaking through dynamic import(), smarter CommonJS to ESM conversion for default imports, --compile --bytecode when cross-compiling, smaller and faster-starting compiled executables, up to 9x faster Buffer reads and writes, 2x faster AsyncLocalStorage, faster startup, and many bugfixes and Node.js compatibility improvements.
为了尊重作者,这里只展示开头几段。你可以去原文阅读,或者在 HorizonReader 里读:划线做笔记、让 AI 帮忙。
This is a security release. It updates lsquic, c-ares, SQLite, llhttp and BoringSSL.
AI 摘要Bun v1.4.4 fixes 271 issues and introduces bun fmt, a Prettier-compatible formatter that is 3x to 6x faster than oxfmt, along with significantly faster bun check and hoisted installs. The release also adds Yarn Berry lockfile migration, bun pm fetch, bun publish --recursive, and improvements to Bun.SQL, bun:sqlite, and WebSocket behavior. Additionally, it includes a JavaScriptCore upgrade with major performance gains, a redesigned dev server error overlay, and numerous Node.js compatibility fixes.
AI 摘要Bun v1.4.3 fixes 166 issues and introduces bun check, a built-in TypeScript type checker that is 3x to 6.4x faster than tsc, along with an experimental Bun.ModuleGraph, Bun.FetchSession, and 67–89% lower idle CPU usage. The release also brings performance improvements such as faster node:http responses, a JavaScriptCore upgrade speeding up JSON.parse, faster startup for compiled bytecode, and lower memory usage for bun build with many entry points. Additionally, it includes numerous bug fixes and Node.js compatibility improvements.
This release fixes two regressions impacting Elysia and AsyncLocalStorage, a hang in @discordjs/ws, CMYK JPEG decoding in Bun.Image, a rare JIT crash, and a GC crash on musl.
AI 摘要Bun 1.4 is a major release that rewrites the runtime in Rust and adds built-in headless browser automation through Bun.WebView, alongside new APIs such as Bun.Image, Bun.markdown, JSON5, JSONL, Terminal, and cron. It also achieves Node.js 26.3.0 compatibility with 1,517 newly passing tests, introduces parallel test and run support, Windows ARM64 support, and an opt-in global virtual store enabling installs up to 7× faster.