Bun bun-v0.0.81stable Released May 11, 2022
Impact Score: 5/10

bun v0.0.81

Source available โ€” automated, not human-reviewed

Component: bun ยท Channel: stable. Automated analysis, not a compatibility certification. How this works.

Analysis updated: 2026-11-01.

Compatibility not verified โ€” check source notes
๐Ÿ“„ .MD
โšก Executive Summary (TL;DR)

Bun bun-v0.0.81. Source highlight: Bun.js gets Node-API support

Who Does This Impact? (Role-Based Analysis)

๐Ÿ’ป Software Engineers & Devs

Check the source notes against the package and APIs you use before upgrading.

๐Ÿ“Š Product & Engineering Leads

Use the documented changes to assess relevance to your product; release frequency alone is not a quality measure.

โš™๏ธ DevOps & Security

Verify the target version, runtime requirements and rollback procedure in the official documentation.

๐Ÿ”ง Bug Fixes & Patches (2)

  • Fix incorrect error when `new.target` is referenced outside of a constructor d1ea51e9f2bfecd696224f4d715a8955a6300440
  • Fix incorrect error with negative numbers in the JSON parser 123267685f57968e3515841a8c2d6991c44dcfa8
๐Ÿ“„ View Raw Release Notes (Original Developer Log)
To upgrade: ```bash bun upgrade ``` ## Bun.js gets Node-API support Node-API is 1.75x - 3x faster in Bun compared to Node.js 18 (in call overhead) Getters & setters: ![image](https://user-images.githubusercontent.com/709451/167952626-4cd8cb95-b3ea-49ac-83a8-deb5eb87bfb1.png) Simple function calls: <img width="610" alt="image" src="https://user-images.githubusercontent.com/709451/167955811-655ee683-37db-40e5-871a-9601ea715cf0.png"> Just like in Node.js, to load a Node-API module, use `require('my-npm-package')` or use `process.dlopen`. [90% of the API is implemented](https://github.com/Jarred-Sumner/bun/issues/158), though it is certainly buggy right now. ## Polyfills & new APIs in Bun.js v0.0.81 The following functions have been added: - `import.meta.resolveSync` synchronously run the module resolver for the currently-referenced file - `import.meta.require` synchronously loads `.node` or `.json` modules and works with dynamic paths. This doesn't use ESM and doesn't run the transpiler, which is why regular js files are not supported. This is mostly an implementation detail for how `require` works for Node-API modules, but it could also be used outside of that if you want - ` Bun.gzipSync`, `Bun.gunzipSync`, `Bun.inflateSync`, and `Bun.deflateSync` which expose native bindings to `zlib-cloudflare`. On macOS aarch64, [`gzipSync` is ~3x faster](https://twitter.com/jarredsumner/status/1522761257035571200) than in Node. This isn't wired up to the `"zlib"` polyfill in bun yet Additionally: - [`__dirname`](https://nodejs.org/docs/latest/api/globals.html#__dirname) is now supported for all targets (including browsers) - [`__filename`](https://nodejs.org/docs/latest/api/globals.html#__filename) is now supported for all targets (including browsers) - `Buffer.byteLength` is now implemented Several packages using Node-API also use `detect-libc`. Bun polyfills `detect-libc` because bun doesn't support `child_process` yet and this improves performance a little. ## Bug fixes - Fix incorrect error when `new.target` is referenced outside of a constructor d1ea51e9f2bfecd696224f4d715a8955a6300440 - Fix incorrect error with negative numbers in the JSON parser 123267685f57968e3515841a8c2d6991c44dcfa8