What’s New in Bun 1.2? 5 Major Updates That Redefine the JavaScript Toolchain

Version 1.2 of the Bun runtime introduces five significant enhancements—including improved Node.js compatibility, HTML import that replaces the entire frontend toolchain, native S3 object handling, a fast Promise‑based Postgres driver, and a text‑based lock file—positioning Bun as a comprehensive, cloud‑first JavaScript ecosystem.

21CTO
21CTO
21CTO
What’s New in Bun 1.2? 5 Major Updates That Redefine the JavaScript Toolchain

Bun 1.2 arrives with a series of bold updates that aim to make it a "one‑tool‑to‑rule‑them‑all" JavaScript runtime.

While most open‑source projects see minor changes between minor versions, Bun’s team released a 11,679‑word blog post detailing the new features, reflecting their rapid development pace.

#1 Node.js Compatibility: Bun is striving to become a direct Node.js replacement, now running the full Node test suite internally. This massive effort has uncovered many bugs and added support for additional Node APIs such as cluster, dgram, and http2 servers.

#2 HTML Import: A single import statement can now replace the entire frontend toolchain. Bun scans HTML, automatically compresses and bundles JavaScript and CSS, allowing tools like React and Tailwind to work seamlessly, effectively entering the bundler market.

#3 Built‑in S3 Object Support: Developers can read, write, and delete files in S3 buckets using a Web‑standard‑compatible API (e.g., Blob). Bun provides a new Bun.s3 client for the default S3 API.

#4 Postgres Support: Bun introduces a native, Promise‑based PostgreSQL driver ( Bun.sql) written in native code. It reads rows up to 50% faster than the most popular Node Postgres client and aligns with Bun’s "cloud‑first runtime" vision.

#5 Text‑Based Lock File: The npm‑compatible package manager now uses a new text‑based lock file named bun.lock. This makes diffs in pull requests clearer and reduces merge conflicts. Additionally, bun install is reported to be over 30% faster than in version 1.1.

In conclusion, many projects have attempted an all‑in‑one JavaScript toolchain and failed, but Bun’s rapid delivery suggests it may finally achieve that goal.

BunJavaScript runtimeNode.js compatibilityS3HTML importPostgres
21CTO
Written by

21CTO

21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.