WhatBrokeToday
GTA 6FAQ
Bun

Bun `bun fmt` Formatting Bugs Cause Parsing Failures and Syntax Corruption

medium

Is it fixed? Not yet.

Ongoing since Nov 10, 20:01 UTC. First reported Nov 10, 20:01 UTC.

What happened

Multiple formatting bugs in `bun fmt` cause it to incorrectly insert trailing commas on setter parameters, break empty YAML flow collections, incorrectly wrap or escape markdown elements, and fail idempotency checks across code and documentation files.

What caused it?

`bun fmt` incorrectly inserts trailing commas after setter parameters and inside empty YAML flow collections, fails idempotency on specific object keys and markdown elements, modifies code span backticks, incorrectly handles escaped spaces in YAML strings under prose wrapping, and escapes markdown emphasis characters.

No verified workaround yet

None of the linked reports describe a mitigation. This page updates when one appears.

Timeline

  1. Investigating(current)
  2. Workaround available(upcoming)
  3. Resolved(upcoming)
  1. First report on GitHub issue

    `bun fmt` puts a trailing comma after a setter's parameter, which JavaScriptCore rejects

    Source

Evidence

13 reports · 13 GitHubShow
  1. [1]
    GitHub First report
    `bun fmt` puts a trailing comma after a setter's parameter, which JavaScriptCore rejects(opens GitHub issue in a new tab)

    What version of Bun is running? 1.4.4+38afee6c8 (also main 2596ac5d3; src/format is unchanged on main 89452d2ac1) What platform is your computer? Linux 7.0.0-1014-aws x86_64 x86_64 What steps can reproduce the bug? settings.js: class Settings { set timeout(milliseconds = Settings.defaultTimeoutInMillisecondsForAllRequests) {} } bun fmt settings.js && cat settings.js bun -e 'eval(await Bun.file("settings.js").text()); console.log("parsed")' What is the expected behavior? class Settings { set…

    by alpaylan 0upvotes 0comments

  2. [2]
    GitHub
    `bun fmt` is not idempotent on an object key that it prints differently from the source (`\u{61}`, `[.5]`, `[ 5 ]`, `['\'']`)(opens GitHub issue in a new tab)

    What version of Bun is running? 1.4.4+38afee6c8 (also main 2596ac5d3; src/format is unchanged on main 89452d2ac1) What platform is your computer? Linux 7.0.0-1014-aws x86_64 x86_64 What steps can reproduce the bug? key.js: const o = { \u{61}: "this string is too long to fit on one line, even when it is on a line by itself" }; bun fmt key.js && cat key.js bun fmt --check key.js What is the expected behavior? const o = { a: "this string is too long to fit on one line, even when it is on a line…

    by alpaylan 0upvotes 0comments93% match

  3. [3]
    GitHub
    `bun fmt` puts a comma inside an empty YAML flow mapping or sequence that it breaks, and the file no longer parses(opens GitHub issue in a new tab)

    What version of Bun is running? 1.4.4+38afee6c8 (also main 2596ac5d3; src/format is unchanged on main 89452d2ac1) What platform is your computer? Linux 7.0.0-1014-aws x86_64 x86_64 What steps can reproduce the bug? a.yaml: a: {} bun fmt --print-width 1 a.yaml && cat a.yaml bun -e 'console.log(Bun.YAML.parse(await Bun.file("a.yaml").text()))' What is the expected behavior? A file that still parses as { a: {} }, for example: a: { } YAML 1.2.2 §7.4 (flow collections) allows a , only after an…

    by alpaylan 0upvotes 0comments94% match

  4. [4]
    GitHub
    `bun fmt` adds a space to indented code in a Markdown list item when it renumbers `99.` to `100.`(opens GitHub issue in a new tab)

    What version of Bun is running? 1.4.4+38afee6c8 (also main 2596ac5d3; src/format is unchanged on main 89452d2ac1) What platform is your computer? Linux 7.0.0-1014-aws x86_64 x86_64 What steps can reproduce the bug? a.md (7 spaces after the second 99.): a x bun fmt a.md && cat -A a.md bun -e 'console.log(Bun.markdown.html(await Bun.file("a.md").text()))' What is the expected behavior? a$ x$ with the code still x. CommonMark 0.31.2 §5.2 (list items), rule 2: when an item starts with indented…

    by alpaylan 0upvotes 0comments94% match

  5. [5]
    GitHub
    `bun fmt` adds or drops an empty line between Markdown blocks, and the empty line moves where a block ends(opens GitHub issue in a new tab)

    What version of Bun is running? 1.4.4+38afee6c8 (also main 447ff870b, canary 1.4.4-canary.1+447ff870b; src/format and src/md are unchanged there) What platform is your computer? macOS 26.7 arm64 (Darwin 25.6.0); also Linux x86_64 What steps can reproduce the bug? blocks.js formats five inputs and renders each one before and after with Bun.markdown.html: for (const input of [ "- <div>\n\n - b\n", "- a\n<b>\nc\n", "[a]: /url\n9. c\n", "-\n\n a\n b\n", " a\n-\n- b\n", ]) { const fmt =…

    by alpaylan 0upvotes 0comments96% match

  6. [6]
    GitHub
    `bun fmt` adds an empty line to an empty fenced code block in Markdown, so the code is no longer empty(opens GitHub issue in a new tab)

    What version of Bun is running? 1.4.4+38afee6c8 (also main 447ff870b, canary 1.4.4-canary.1+447ff870b; src/format and src/md are unchanged there) What platform is your computer? macOS 26.7 arm64 (Darwin 25.6.0); also Linux x86_64 What steps can reproduce the bug? a.md (two lines of three backticks): bun -e 'console.log(JSON.stringify(Bun.markdown.html(await Bun.file("a.md").text())))' bun fmt a.md && cat -A a.md bun -e 'console.log(JSON.stringify(Bun.markdown.html(await…

    by alpaylan 0upvotes 0comments93% match

  7. [7]
    GitHub
    `bun fmt` shortens a Markdown code span from two backticks to one after a lone backtick, and the span then starts at that backtick(opens GitHub issue in a new tab)

    What version of Bun is running? 1.4.4+38afee6c8 (also main 447ff870b, canary 1.4.4-canary.1+447ff870b; src/format and src/md are unchanged there) What platform is your computer? macOS 26.7 arm64 (Darwin 25.6.0); also Linux x86_64 What steps can reproduce the bug? a.md (one line): A stray backtick and then code bun -e 'console.log(JSON.stringify(Bun.markdown.html(await Bun.file("a.md").text())))' bun fmt a.md && cat a.md bun -e 'console.log(JSON.stringify(Bun.markdown.html(await…

    by alpaylan 0upvotes 0comments95% match

  8. [8]
    GitHub
    `bun fmt` moves a comment inside a YAML mapping value to column 0 when the first key has a tag or an anchor(opens GitHub issue in a new tab)

    What version of Bun is running? 1.4.4+38afee6c8 (also main 447ff870b, canary 1.4.4-canary.1+447ff870b; src/format and src/md are unchanged there) What platform is your computer? macOS 26.7 arm64 (Darwin 25.6.0); also Linux x86_64 What steps can reproduce the bug? config.yaml: !!str a: 0 b: c: 1 x bun fmt config.yaml && cat config.yaml What is the expected behavior? The file is already formatted and stays as it is. Without the tag (a: 0 as the first line) bun fmt keeps # x indented under b.…

    by alpaylan 0upvotes 0comments96% match

  9. [9]
    GitHub
    `bun fmt` adds line breaks to a YAML `|+` block scalar when an indented comment follows it, on every run(opens GitHub issue in a new tab)

    What version of Bun is running? 1.4.4+38afee6c8 (also main 447ff870b, canary 1.4.4-canary.1+447ff870b; src/format and src/md are unchanged there) What platform is your computer? macOS 26.7 arm64 (Darwin 25.6.0); also Linux x86_64 What steps can reproduce the bug? t.yaml: a: b: |+ x c bun -e 'console.log(JSON.stringify(Bun.YAML.parse(await Bun.file("t.yaml").text())))' bun fmt t.yaml && cat -A t.yaml bun -e 'console.log(JSON.stringify(Bun.YAML.parse(await Bun.file("t.yaml").text())))' bun fmt…

    by alpaylan 0upvotes 0comments97% match

  10. [10]
    GitHub
    `bun fmt --prose-wrap always` breaks a YAML double-quoted string at an escaped space `\ `, which deletes the space(opens GitHub issue in a new tab)

    What version of Bun is running? 1.4.4+38afee6c8 (also main 447ff870b, canary 1.4.4-canary.1+447ff870b; src/format and src/md are unchanged there) What platform is your computer? macOS 26.7 arm64 (Darwin 25.6.0); also Linux x86_64 What steps can reproduce the bug? a.yaml (\ is an escaped space, so the value is ab cd): a: "ab\ cd" bun -e 'console.log(Bun.YAML.parse(await Bun.file("a.yaml").text()))' bun fmt --print-width 1 --prose-wrap always a.yaml && cat a.yaml bun -e…

    by alpaylan 0upvotes 0comments95% match

  11. [11]
    GitHub
    `bun fmt` splits a Markdown paragraph in two when emphasis holds a link followed by `[[]]`(opens GitHub issue in a new tab)

    What version of Bun is running? 1.4.4+38afee6c8 (also main 447ff870b, canary 1.4.4-canary.1+447ff870b; src/format and src/md are unchanged there) What platform is your computer? macOS 26.7 arm64 (Darwin 25.6.0); also Linux x86_64 What steps can reproduce the bug? a.md (one line): a[[]] bun -e 'console.log(Bun.markdown.html(await Bun.file("a.md").text()))' bun fmt a.md && cat -A a.md bun -e 'console.log(Bun.markdown.html(await Bun.file("a.md").text()))' What is the expected behavior? One…

    by alpaylan 0upvotes 1comments96% match

  12. [12]
    GitHub
    `bun fmt` escapes the `*` that opens emphasis in Markdown `_*a *b** c_`, and `**a *b** c*` changes on the second run(opens GitHub issue in a new tab)

    What version of Bun is running? 1.4.4+38afee6c8 (also main 447ff870b, canary 1.4.4-canary.1+447ff870b; src/format and src/md are unchanged there) What platform is your computer? macOS 26.7 arm64 (Darwin 25.6.0); also Linux x86_64 What steps can reproduce the bug? a.md and b.md (one line each): _*a *b** c_ a b c bun -e 'for (const f of ["a.md", "b.md"]) console.log(Bun.markdown.html(await Bun.file(f).text()))' bun fmt a.md b.md && cat a.md b.md bun -e 'for (const f of ["a.md", "b.md"])…

    by alpaylan 0upvotes 0comments95% match

  13. [13]
    GitHub
    bun fmt is not idempotent on a call chain with an expanded object argument(opens GitHub issue in a new tab)

    What version of Bun is running? 1.4.4+38afee6c8, from bun --revision. What platform is your computer? Darwin arm64. What steps can reproduce the bug? In a temporary directory without bunfig.toml, create repro.ts with this single line: abc.b().c({ firstProperty, secondProperty, thirdProperty, fourthProperty, fifthProperty, sixthProperty }); Run the native formatter and check: bun fmt --print-width=100 --single-quote repro.ts bun fmt --check --print-width=100 --single-quote repro.ts The format…

    by koenvg 0upvotes 0comments94% match

FAQ

What happened in the Bun outage?

Multiple formatting bugs in `bun fmt` cause it to incorrectly insert trailing commas on setter parameters, break empty YAML flow collections, incorrectly wrap or escape markdown elements, and fail idempotency checks across code and documentation files.

What is affected by the Bun outage?

Bun (versions: 1.4.4+38afee6c8).

When did the Bun outage start and end?

It started Nov 10, 20:01 UTC and is still ongoing (8 d 8 h so far). This page updates as it develops.

How do I get alerts for Bun?

Subscribe to the Bun RSS feed for every new Bun incident, or connect an AI assistant to WhatBrokeToday over MCP and ask whether Bun is down. Bun feed

Where does this information come from?

WhatBrokeToday collects public status pages, developer community reports and security advisories, groups the ones about the same problem, and links every report under Evidence on this page. This one has 13 reports from 1 independent source.