Skip to content

build: bun check, bun fmt and .bun-version - #183

Merged
drakulavich merged 4 commits into
mainfrom
bun-tooling
Oct 27, 2026
Merged

drakulavich merged 4 commits into
mainfrom
bun-tooling

Conversation

@drakulavich

@drakulavich drakulavich commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

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-version holds 1.4.4; ci.yml and release.yml read it through bun-version-file instead of latest, and engines.bun is >=1.4.4. typecheck is bun check --no-script (was tsc --noEmit), and the release gate runs the same instead of bunx tsc --noEmit. lint starts with bun fmt --check, and fmt is a new script. bunfig.toml sets printWidth (120 here, 160 after the third commit) and singleQuote = true; .prettierignore skips *.md and the generated docs/schemas/. biome's formatter was already off, so biome.json is unchanged. README, CONTRIBUTING and openspec/config.yaml name 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: printWidth goes from 120 to 160 in bunfig.toml.
  • style: bun fmt at width 160 (58 files, +307 −1147): only the formatter's output. A second bun fmt changes 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 a check script, and a bare bun check runs that script (typecheck, lint and tests) instead of the type checker. bun check --help says so.
  • singleQuote = true: the code is single-quoted. With Bun's default double quotes the reformat touched 12,086 lines instead of 5,444, and src/index.test.ts failed because it pins the text of the first import in src/index.ts.

typescript stays in devDependencies, though no script or workflow runs tsc now.

Checks run locally: bun run typecheck (no type errors in 106 files, same as tsc --noEmit before), bun run lint passes, bun test 730 pass. Format gate: appending const ugly = [1,2 ,3] to src/lib/pad.ts made bun run lint fail with "1 file needs formatting"; the file was restored from a copy.

🤖 Generated with Claude Code

https://claude.ai/code/session_017XpcaYXCAa5ZJLEQmirqGe

drakulavich and others added 2 commits October 27, 2026 14:57
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
@drakulavich

Copy link
Copy Markdown
Owner Author

Change map · c80ef14

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
Loading

🟧 changed · 🟩 added · 🟥 removed · 🟪 affected outside the diff · ⬜ context

@drakulavich

Copy link
Copy Markdown
Owner Author

Simplification: not needed

Verdict: Approve

@greptile-apps

greptile-apps Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable new issue was found.

Summary

Pins Bun to 1.4.4, replaces the type-check command, and adds a formatting gate.

  • CI and release checks use Bun 1.4.4 and Bun’s built-in tools.
  • The source and tests follow Bun’s configured formatting style.

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

drakulavich and others added 2 commits October 27, 2026 16:27
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
@drakulavich

Copy link
Copy Markdown
Owner Author

Reviewed c80ef14..061d0f9. The TypeScript diff changes whitespace and line breaks only; I found no string, template, regex, ASI, assertion, suppression, or behavior edits. git diff --check is clean. I relied on the verification evidence in the brief and did not run tests.

Simplification: not needed

Verdict: Approve

@drakulavich
drakulavich merged commit 706cc87 into main Oct 27, 2026
2 checks passed
@drakulavich
drakulavich deleted the bun-tooling branch October 27, 2026 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant