Repository navigation
build: bun check, bun fmt and .bun-version - #183
Conversation
CI and the release workflow install the Bun version in .bun-version (1.4.4) instead of latest, and engines.bun asks for at least that. The typecheck script and the release gate run Bun's built-in type checker; --no-script is needed because a bare `bun check` runs this repo's own `check` script. `bun run lint` starts with `bun fmt --check` (printWidth 120 in bunfig.toml); Markdown and the generated docs/schemas are left out of formatting. bunfig.toml also sets singleQuote, the quote style the code already uses: with double quotes the reformat touched 12,086 lines instead of 5,444 and broke src/index.test.ts, which pins the text of the first import in src/index.ts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017XpcaYXCAa5ZJLEQmirqGe
Output of `bun fmt` with the config from the previous commit; no other edits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017XpcaYXCAa5ZJLEQmirqGe
|
Change map · Contributors could merge code without a formatting gate, and CI and release used a moving Bun version. Now CI checks formatting, and both pipelines use the pinned Bun version and built-in type checker. flowchart LR
C["Contributor"]:::context --> B
C --> A
subgraph before["Before"]
B["Changes pass without a formatting check"]:::removed
end
subgraph after["With this change"]
A["Formatting issues are caught in CI"]:::changed
end
classDef changed fill:#fef3c7,stroke:#d97706
classDef added fill:#dcfce7,stroke:#16a34a
classDef removed fill:#fee2e2,stroke:#dc2626,stroke-dasharray:5 3
classDef affected fill:#ede9fe,stroke:#7c3aed
classDef context fill:#f1f5f9,stroke:#64748b
🟧 changed · 🟩 added · 🟥 removed · 🟪 affected outside the diff · ⬜ context |
|
Simplification: not needed Verdict: Approve |
[Medium impact] The PR appears safe to merge; no actionable new issue was found. SummaryPins Bun to
No actionable new issues were found. No previous review threads were supplied. Tests were not run during this review. Reviews (2) · Last reviewed commit: "style: bun fmt at width 160" · Reviewed by Greptile |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017XpcaYXCAa5ZJLEQmirqGe
Output of `bun fmt` with the new width; no other edits. A second `bun fmt` changes nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017XpcaYXCAa5ZJLEQmirqGe
|
Reviewed Simplification: not needed Verdict: Approve |
Pins Bun 1.4.4 and switches the type check and formatting to Bun's own tools, the same setup as drakulavich/claude-memory#95 and #96.
Four commits, so config and churn can be read apart:
build: bun check, bun fmt and .bun-version(10 files)..bun-versionholds1.4.4;ci.ymlandrelease.ymlread it throughbun-version-fileinstead oflatest, andengines.bunis>=1.4.4.typecheckisbun check --no-script(wastsc --noEmit), and the release gate runs the same instead ofbunx tsc --noEmit.lintstarts withbun fmt --check, andfmtis a new script.bunfig.tomlsetsprintWidth(120 here, 160 after the third commit) andsingleQuote = true;.prettierignoreskips*.mdand the generateddocs/schemas/. biome's formatter was already off, sobiome.jsonis unchanged. README, CONTRIBUTING andopenspec/config.yamlname the new minimum and commands, and CHANGELOG has a bullet under Changed.style: bun fmt(100 files, +3860 −1584): only the formatter's output.build: bun fmt print width 160:printWidthgoes from 120 to 160 inbunfig.toml.style: bun fmt at width 160(58 files, +307 −1147): only the formatter's output. A secondbun fmtchanges 0 files, so the output is stable at 160. biome, Knip, the type check and the 730 tests still pass, with no new diagnostics.Two things differ from claude-memory:
--no-script: this repo has acheckscript, and a barebun checkruns that script (typecheck, lint and tests) instead of the type checker.bun check --helpsays so.singleQuote = true: the code is single-quoted. With Bun's default double quotes the reformat touched 12,086 lines instead of 5,444, andsrc/index.test.tsfailed because it pins the text of the first import insrc/index.ts.typescriptstays in devDependencies, though no script or workflow runstscnow.Checks run locally:
bun run typecheck(no type errors in 106 files, same astsc --noEmitbefore),bun run lintpasses,bun test730 pass. Format gate: appendingconst ugly = [1,2 ,3]tosrc/lib/pad.tsmadebun run lintfail with "1 file needs formatting"; the file was restored from a copy.🤖 Generated with Claude Code
https://claude.ai/code/session_017XpcaYXCAa5ZJLEQmirqGe