Bun 1.2 Released: Enhanced Node.js Compatibility, Amazon S3 API, and PostgreSQL Client

Sophia Steele

Sophia Steele

January 25, 2025 · 3 min read
Bun 1.2 Released: Enhanced Node.js Compatibility, Amazon S3 API, and PostgreSQL Client

Bun, the all-in-one JavaScript and TypeScript runtime and toolkit, has announced its latest update, version 1.2, which promises to revolutionize the way developers build, run, and test full-stack applications. The new release boasts dramatic improvements in Node.js compatibility, making it an attractive option for developers seeking a seamless and efficient development experience.

One of the most significant changes in Bun 1.2 is the way the developers test and improve compatibility with Node.js. According to Oven product manager Ashcon Partovi, the team now runs the Node.js test suite for every change made to Bun, resulting in the fixing of thousands of bugs. This rigorous testing approach has led to 11 Node.js modules passing more than 90% of their tests with Bun, a significant milestone in the pursuit of seamless compatibility.

Bun 1.2 also introduces a range of exciting features, including a built-in Amazon S3 object storage API, a built-in PostgreSQL client, and experimental support for compiling and running C code from JavaScript. This allows developers to leverage C system libraries without the need for a build step, opening up new possibilities for application development.

Additionally, Bun 1.2 brings support for node:http2, enabling the creation of HTTP/2 servers and gRPC servers. Developers can also use node:cluster to spawn multiple instances of Bun and bind and connect to UDP sockets using node:dgram. The entire node:zlib module has been rewritten from JavaScript to native code, further enhancing performance.

In terms of performance, Bun 1.2 has made significant strides. The Express framework can now serve HTTP requests up to three times faster in Bun 1.2 than in Node.js, according to Partovi. Furthermore, bun install is 30% faster in Bun 1.2 compared to its predecessor, Bun 1.1.

Other notable features in Bun 1.2 include support for reading NPM's config file, .npmrc, which enables configuration of an NPM registry and scoped packages. NPM packages can now be published using bun publish, a drop-in replacement for npm publish. A new CSS parser and HTML imports are also part of the update.

Looking ahead, the Bun team has announced plans to expand support for SQL databases through Bun.sql, a built-in SQL client with PostgreSQL support. MySQL support is anticipated in the near future, further solidifying Bun's position as a versatile and powerful development toolkit.

In conclusion, Bun 1.2 represents a significant leap forward in the development of full-stack JavaScript and TypeScript applications. With its enhanced Node.js compatibility, expanded feature set, and improved performance, Bun is poised to become an essential tool in the developer's arsenal. As the technology landscape continues to evolve, it will be exciting to see how Bun adapts and innovates to meet the changing needs of developers.

Similiar Posts

Copyright © 2024 Starfolk. All rights reserved.