chore(centaur-client): give the package a typecheck script so pnpm check covers it#553
Merged
Conversation
…eck covers it centaur-client was the only workspace package without a typecheck script. pnpm -r typecheck skips a package that lacks the script rather than failing, so pnpm check -- the pre-PR bar in CLAUDE.md -- never typechecked this package at all. Its types were only ever checked by build (bare tsc, whose include covers *.test.ts), which runs solely in CI's Surface static job. That is how #545 shipped a red build: vitest does not typecheck, so a test-file type error was invisible to every gate a human runs locally. --noEmit because build already owns dist (outDir + declaration); a typecheck should not race it for build artifacts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
centaur-clientwas the only workspace package with notypecheckscript.pnpm -r typecheckskips a package that lacks the script rather than failing, sopnpm check— the pre-PR bar CLAUDE.md tells you to run — has never typechecked this package at all. Its types were only ever checked bybuild(baretsc -p tsconfig.json, whoseincludecoverssrc/**/*.tsand therefore*.test.ts), which runs only in CI's Surface static job.That is exactly how #545 shipped a red build: vitest doesn't typecheck, so a type error in a test file was invisible to every gate a human runs locally and only surfaced in CI.
Verification
Re-introduced that exact error on this branch and ran the gate that previously missed it:
pnpm -r typecheckprintscentaur-client typecheck: Failed+ the TS2741, exits 2pnpm --filter @atrium/centaur-client typecheckleaves nodist/;buildstill emits it (--noEmitbecausebuildownsoutDir+declaration— a typecheck shouldn't race it for artifacts)pnpm lintcleanNote
buildandtypechecknow both compile the same project, so the work is duplicated in CI. That's deliberate:buildexists to producedistfor publishing,typecheckexists to be part ofpnpm check. Collapsing them would mean eitherpnpm checkwrites build artifacts or Surface static stops producing them.