Bun is an incredibly fast JavaScript runtime, bundler, transpiler, and package manager โ all in one. In case you missed it, here are some of the recent changes to Bun.
This release fixes 4 bugs, adds vm.createScript. Fixes a crash in fs.readFile, a crash in Bun.file().text(), a crash in IPC, and a transpiler bug involving loose equals
Previous releases
v1.0.24
fixes 9 bugs and adds Bun Shell, a fast cross-platform shell with seamless JavaScript interop. Fixes a socket timeout bug, a potential crash when socket closes, a Node.js compatibility issue with Hapi, a process.exit bug, and bun install binlinking bug, bun inspect regression, and bun:test expect().toContain bugv1.0.23
fixes 40 bugs (addressing 194 ๐ reactions). import & embed sqlite databases in Bun, Resource Management ('using' TC39 stage3) support, bundler improvements when building for Node.js, bugfix for peer dependency resolution, semver bugfix, 4% faster TCP on linux, Node.js compatibility improvements and more"v1.0.22
fixes 29 bugs (addressing 118 ๐ reactions), fixesbun install
issues on Vercel, addsperformance.mark()
APIs, addschild_process
support for extra pipes, makesBuffer.concat
faster, addstoBeEmptyObject
andtoContainKeys
matchers, fixesconsole.table
width using emojis, and support forargv
andexecArgv
options inworker_threads
, and supports Brotli infetch
.
To install Bun:
curl -fsSL https://bun.sh/install | bash
npm install -g bun
brew tap oven-sh/bun
brew install bun
docker pull oven/bun
docker run --rm --init --ulimit memlock=-1:-1 oven/bun
To upgrade Bun:
bun upgrade
Fixed: crash in fs.readFile
In certain cases, Bun would crash when reading a file with fs.readFile
, fs.readFileSync
, or fs.promises.readFile
. This was caused by an unintiailized memory access introduced when Bun added support for standalone modules.
Fixed: crash in Bun.file().text()
A crash when reading a file with Bun.file().text()
that had a Byte Order Mark has been fixed. This crash was introduced in Bun v1.0.24.
Fixed: crash in IPC
A crash in IPC that would occur 4-5 seconds after the process started has been fixed. This crash was introduced when upgrading our version of uSockets to gain "long timeout" support. The crash was a null-pointer dereference when calling the timeout callback.
Fixed: transpiler loose equality comparison bug
The following input would be constant-folded incorrectly:
"" == 0;
"-0" == 0;
1234n == 5678n;
This has been fixed, thanks to @dylan-conway.
vm.createScript
The node:vm
function createScript
has been added. This calls new vm.Script
with the same arguments.
Windows is coming soon
10 days away.