Skip to content

Bun 1.4.4 adds bun fmt, a Prettier-compatible formatter

Bun 1.4.4, released October 22, 2026, adds bun fmt, a Prettier-compatible formatter Bun says checks Prettier's own repo 286x faster than Prettier.

By Tech AI Wire Team

4 min read

XLinkedIn
The Bun blog post Bun v1.4.4 by Jarred Sumner, dated October 22, 2026, with install and upgrade commands.

By the numbers

bun fmt --check on Prettier's repo, per Bun
59.7 ms
Prettier 3.9.10 on the same repo
17.1 s
faster bun check on MUI docs than Bun 1.4.3
7.8x

Bun 1.4.4, released October 22, 2026, adds bun fmt, a code formatter built into the Bun runtime that reads your existing Prettier config. On Prettier's own repository, Bun says bun fmt --check takes 59.7 milliseconds where Prettier takes 17.1 seconds. The release also speeds up bun check and migrates Yarn Berry lockfiles.

Bun is a JavaScript runtime that also bundles a package manager, test runner and type checker. A formatter rewrites code into one consistent style, so teams stop arguing about spaces and line breaks.

What bun fmt does

bun fmt is a port of Prettier, a widely used JavaScript formatter, according to the Bun v1.4.4 release notes by Jarred Sumner. It reads the config files a project already has:

  • .prettierrc*, prettier.config.* and the prettier key in package.json
  • .editorconfig and .prettierignore
  • configs for oxfmt, another formatter
  • a [fmt] section in bunfig.toml

It formats JavaScript, TypeScript, JSX, CSS, SCSS, HTML, Vue, Svelte, JSON, YAML, TOML, Markdown, MDX and GraphQL, among others. Tailwind class sorting, package.json key sorting and Svelte support are built in, so those Prettier plugins are not needed. Import sorting is also built in but off by default.

Languages that still need a Prettier plugin, such as Astro, fall back to the project's installed Prettier. An unsupported plugin makes bun fmt print an error, skip the affected files and exit with code 2. The existing bun format command still runs a project's own format script.

Bun's benchmark numbers

These figures are Bun's own and have not been independently checked.

Testbun fmtComparison
Prettier's repo, 2,616 files59.7 ms, 48 MBPrettier 3.9.10: 17.1 s, 459 MB (286x)
vitest, date-fns, monkeytype, h3234x to 425x faster than Prettier 3.9.9
vite, with its own config65.2 msoxfmt 0.74.0: 406.7 ms (6.2x)
fumadocs, with its own config44.6 msoxfmt 0.74.0: 1,395 ms (31x)

The post's summary line says bun fmt is 3x to 6x faster than oxfmt, though its own fumadocs row shows 31x. On output, Bun reports that 9,648 of 9,731 Prettier formatting tests match, or 99.1%. Compared with Prettier plus its common plugins, 97.9% of JavaScript and TypeScript output was identical.

AICoder, reporting when the formatter landed in Bun's main branch on October 12, cited a different test. Checking the format of VS Code's source used 2.9 seconds of CPU time with Bun, against 295 seconds with Prettier 3.9.9.

Faster bun check and bun install

The release also builds on the type checker that arrived in Bun 1.4.3 adds bun check, a faster TypeScript type checker. On MUI's docs, bun check now takes 1.31 seconds instead of 10.28, and peak memory falls from 11.2 GB to 1.3 GB. One project got slower: Bun's own src/js went from 0.11 to 0.20 seconds.

bun install now migrates Yarn 2 and later ("Yarn Berry") lockfiles to bun.lock and keeps the pinned versions. Bun 1.4.3 only handled Yarn v1. Failed downloads now retry up to five times with growing delays. "In Bun v1.4.3, all five retries happened within 5 ms, so a brief registry outage would fail the install," Sumner writes.

The release fixes 271 issues and includes security fixes for TLS, WebSocket, the database clients and the package manager, though the post gives no details. It also claims Bun.SQL uses up to 48% less client CPU per query.

Breaking changes to check

The post lists several behavior changes inline:

  • Glob patterns such as {1..3} and !(g)/a.ts now act as patterns instead of literal text.
  • bun publish refuses prerelease versions without --tag, and --provenance now raises an error.
  • Bun.hash() throws on null and undefined instead of hashing them.
  • TLS servers ask for client certificates only when requestCert: true is set.
  • Coverage "% Lines" in bun test can drop after upgrading, so check any coverageThreshold.

What this means for developers

Bun now puts a Prettier-compatible formatter inside a tool many teams already run, which removes one dependency from a JavaScript project.

  • Test it in CI before you switch. Run bun fmt --check on a branch and diff the result against Prettier. With 97.9% identical output, expect a small number of changed files.
  • Check your plugins. An unsupported Prettier plugin makes bun fmt exit with code 2, which will fail a CI job.
  • Upgrade for the security fixes. Run bun upgrade. Bun lists fixes for TLS and WebSocket, which matter most for servers running on Bun.
  • Review the breaking changes first. Glob behavior, bun publish rules and TLS client certificates all changed. Run your test suite on 1.4.4 before rolling it out.

Sources

  1. Bun v1.4.4 - Bun Blog
  2. Bun adds built-in bun lint and bun fmt: reads ESLint/Prettier configs, 1,021 rules, 2.9s vs Prettier's 295s CPU on vscode format check - AICoder

Related articles

The weekly digest

One email every Friday with the week's top stories from all six desks: AI, dev tools, coding, the tech industry, startups and what's next. Free, no spam.

Unsubscribe anytime with one click.