build: type-check with bun check
Merged
BO
5d ago+23+23+01234567890123456789-5-5-0123456789
`typecheck` now runs Bun's built-in `bun check` instead of `tsc --noEmit`, and `check` calls `bun run typecheck`. On this repository `bun check` ran in 0.08 s against 0.17 s for `tsc` 7.0.2 (median of 5 runs) and reported the same 831 errors with three extra strict flags added; the measurements and their limits are in bompus/chief-of-staff#458.
- A `check` script in `package.json` shadows the built-in, so `scripts/typecheck.ts` spawns `bun check -p /tsconfig.json` from the temporary directory. A script, rather than a shell one-liner, because CI also runs `bun run check` on Windows.
- `bun check` first shipped in Bun 1.4.3, so CI moves from Bun 1.4.2 to 1.4.3 in both jobs, and the README says contributors need 1.4.3 or later for `bun run check`. The runtime requirement (`engines.bun`, 1.4.2) is unchanged, and CONTRIBUTING now says the Glama build spec follows that, not CI's Bun.
- Verified on Linux: `bun run typecheck` exits 0, a deliberate type error makes it exit 1, and it works from any directory. Windows is verified by this pull request's CI run.
A reviewer subagent read the change and found no blockers; its findings (repo-root path, the CONTRIBUTING rule) are fixed. No other open or closed pull request covers this.
Summary by cubic
Switches typechecking from tsc --noEmit to Bun's built-in bun check, which runs in 0.08s instead of 0.17s and reports the same 831 errors.
typechecknow runsscripts/typecheck.ts, which spawnsbun checkfrom a temporary directory because the package.jsoncheckscript shadows the built-in.- CI moves to Bun 1.4.3, the first release with
bun check; contributors need 1.4.3+ to runbun run check. - The runtime requirement (
engines.bunat 1.4.2) is unchanged, and CONTRIBUTING now ties the Glama build spec to that instead of CI's Bun.
Summary by CodeRabbit
- Development
- Type checking now uses Bun’s built-in checker and requires Bun 1.4.3 or later.
- Chores
- Updated CI to use Bun 1.4.3.
- Clarified when to update the saved Glama build specification.