Bun is a development tool combining JavaScript and TypeScript app execution, package installation, and testing. Released on October 22, v1.4.4 adds a built-in formatter and reduces type-checking times. Projects with compatible languages, plugins, and settings can handle code formatting and type checking within Bun.
Format checks with existing settings
The new formatter uses existing settings. bun fmt reads Prettier and oxfmt configurations. The company said 9,648 of 9,731 Prettier 3.9.9 tests, or 99.1%, were byte-for-byte identical.
Multi-project checks reduced duplicate work. In company benchmarks, bun check -b fell from 13.65 seconds to 0.87 seconds, a 15.7× speedup, in a generated monorepo with 4,000 independent projects of 5 files each. Conditions were skipLibCheck: true, a 16-core M4 Max, and the best of 6 runs. Sharing parsed declaration files, module resolution caches, and output file lists across projects reduced duplicate copies.
Package installation tolerates brief outages by increasing retry intervals after failures. In company benchmarks, when the registry returned 503 for 1 second, v1.4.3 failed in 7 ms, while v1.4.4 finished installation in 1.6 seconds.
Hoisted installs, which collect dependencies in parent directories, also became faster. Company benchmarks showed install times falling from 381 ms to 120 ms, about 3.2× faster. Conditions were Linux, a warm package cache, 1,000 packages of 30 files each, an empty install directory, and 8 cores.
Table: Format-check time and peak memory in the Prettier repository
Conditions: bun fmt --check versus Prettier 3.9.10 on 2,616 files in the Prettier repository using its own configuration. Company-reported medians on Linux with a warm file cache, pinned to 8 Intel Xeon Platinum 8488C cores.
Units: ms and s for format-check time, MB for peak memory
| Tool | Format-check time (ms/s) | Peak memory (MB) |
|---|---|---|
| bun fmt | 59.7 ms | 48 |
| Prettier 3.9.10 | 17.1 s | 459 |
Format-check times differed by a double-digit factor or more. This does not necessarily translate directly into CI time savings, so it is worth measuring how many seconds formatting takes in your own CI.
Type-checking gains vary by repository
Table: bun check execution times in Bun v1.4.4 and v1.4.3
Conditions: Company-reported best of 3 cold runs without caches on 8-thread Linux x64. Repositories were included only when both versions reported the same error count.
Unit: seconds
| Repository | Bun v1.4.3 | Bun v1.4.4 | Speedup |
|---|---|---|---|
| MUI docs | 10.28 | 1.31 | 7.8 |
| t3code server | 4.59 | 1.62 | 2.8 |
| Supabase studio | 2.84 | 1.27 | 2.2 |
| mikro-orm | 3.30 | 1.82 | 1.8 |
| VS Code | 4.09 | 2.82 | 1.4 |
The size of the gains varied across repositories, but the direction was consistent. The company said 69 of 76 separately benchmarked repositories became more than 10% faster.
How to upgrade
# New install
curl -fsSL https://bun.sh/install | bash
# Or npm, Homebrew
npm install -g bun
brew tap oven-sh/bun
brew install bun
# If already installed
bun upgradeBefore switching, review the type checker's TypeScript 7-based settings. Run format checks with bun fmt --check; it returns exit code 1 if files need fixing.
Check these breaking changes first.
Bun.Glob now interprets *(1).txt as 'zero or more 1s followed by .txt'. Use *[(]1).txt to keep the old behavior. The ws server's idle timeout and automatic pings are removed, and the default maxPayload rises from 16 MiB to 100 MiB. Install commands reject flags unsupported by any package manager as errors. This includes typos such as --frozen-lockfil.
DB transfers keep memory usage steady
For services connected to databases, Bun.SQL's per-query cost fell. The company reported 48% fewer client userspace instructions for point lookups in PostgreSQL on Linux x64.
Bulk copies use backpressure in COPY streams. Transfers adjust to the consumer's pace, so memory does not grow to match the entire table size. In company benchmarks, transferring 1,000 MiB at 255 MiB per second kept peak resident memory at 59 MiB.
Teams using ws on Node.js can import ws unchanged in Bun and check its behavior without replacing the package.
Table: Compatibility metrics for the built-in ws implementation
Conditions: Company-reported comparison of Bun v1.4.4's rewritten built-in implementation and its predecessor against npm ws 8.22.0.
Unit: number of passing scripts or scripts with identical output
| Metric | Bun v1.4.4 | Previous version |
|---|---|---|
| ws tests passed | 234 / 271 | 94 / 271 |
| Client scripts with identical output | 179 / 212 | 18 / 212 |
| Server scripts with identical output | 150 / 159 | 67 / 159 |
Bun's previous built-in ws implementation was rewritten as a port of ws 8.22.0, increasing the number of scripts with identical output. Frames and compression are still handled natively.
Company benchmarks found format checks differed by at least an order of magnitude, while type-checking gains across real repositories ranged from 1.4–7.8× depending on the tool and repository.
