Bun 1.2 Adds Postgres Client
Written by Ian Elliot   
Thursday, 30 January 2025

Bun 1.2 has been released with improvements including progress towards Node.js compatibility, a built-in S3 object storage API and a built-in Postgres client.

Bun is a modern JavaScript runtime targeted at similar uses to Node or Deno. The developers describe it as a fast, all-in-one toolkit for running, building, testing, and debugging JavaScript and TypeScript, from a single file to a full-stack application.

bun

Alongside the new features, this release also has performance improvements.

The Node.js compatibility improvements are important as Bun is designed as a drop-in replacement for Node.js. The Bun team says a number of Node.js modules now pass over 90% of their tests with Bun. This release sees a change to how the team test and improve Bun's compatibility with Node.js. Until now, the priority was to fix Node.js bugs as they were reported. However, the developers found this discouraged them from doing the large refactors necessary for 100% Node.js compatibility. They are now moving to be able to run the entire Node.js test suite, and have ported thousands of files from the Node.js test suite to Bun. For every commit they make to Bun, they run the Node.js test suite to ensure compatibility, and say they'll have "more progress on Node.js compatibility very soon".

A second major improvement is built-in support for S3, which is used for object storage in the cloud. The new support can be used to read, write, and delete files from an S3 bucket using APIs that are compatible with Web standards like Blob.

The new version also adds a built-in SQL client with Postgres support. Bun has always had a built-in SQLite client, but the new client expands this to Postgres. The team says they'll also have a pull request to add MySQL support very soon. The client is written in native code with optimizations including automatic prepared statements, query pipelining, connection pooling and structure caching.

Other improvements have been made to Bun's package manager and to support C++ addons using V8 APIs.

Bun 1.2 is available now. 

bun

More Information

Bun Website

Bun On GitHub

Related Articles

Faster Bun Released

Bun Shell Released

Bun 1.0 Released With Experimental Windows Version

Bun Adds Hot Reloading

Bun JavaScript Runtime Adds Runtime Plugin API

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


ELIZA Makes a Comeback
19/01/2025

ELIZA was the world's first chatbot, more than 50 years before the term itself was coined. She was the brainchild of Joseph Weizenbaum who wrote the original program in the 1960s at MIT.  Th [ ... ]



OpenAI Releases New Dev Tools
02/01/2025

OpenAI has released a new more capable AI model along with new tools for customization and beta versions of Go and Java SDKs.


More News

espbook

 

Comments




or email your comment to: comments@i-programmer.info