fix(build): add the root tsconfig.json typecheck has always pointed at - #10
Merged
Conversation
`npm run typecheck` is `tsc --noEmit -p tsconfig.json` and there is no root tsconfig.json in the repository — it was never committed, and it is not gitignored. The script has therefore failed with TS5058 for every person who has ever run it. CI never ran it, so nothing noticed. The gap it left is not cosmetic. core and cdp are type-checked as a side effect of emitting declarations during their build; mcp is bundled by esbuild alone, which strips types without reading them. Nothing has type-checked packages/mcp/src since it was written. The config covers all three packages and emits nothing. `pretypecheck` runs the build first, because mcp imports its siblings by package name and those resolve through the workspace links to their built declarations — without it, a fresh clone gets TS2307 instead of an answer. Wired into CI as its own job. It needs no Chrome, so it reports in well under a minute rather than after a browser download, and a broken script cannot go unnoticed for another release. test/*.mjs stays outside the config. Type-checking the tests is worth doing and is not this change: they reach for fields the public types do not carry (`census.targetType`), so it is a change with real edits in it, not a config line. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Supersedes #9, which GitHub closed automatically when its base branch — the
now-merged #8 — was deleted. Same commit, rebased onto
main.The bug
npm run typecheckistsc --noEmit -p tsconfig.json, and no roottsconfig.jsonhas ever been committed. It is not gitignored; it was simplynever added. The script has failed with TS5058 for everyone who has run it,
on every commit in the repo's history. CI never ran it, so nothing noticed.
The gap is not cosmetic. core and cdp are type-checked as a side effect of
emitting declarations during their build. mcp is bundled by esbuild alone,
which strips types without reading them —
packages/mcp/src/index.tshad neverbeen type-checked at all.
What changed
tsconfig.json: onenoEmitpass over all three packages'src.pretypecheck: npm run build, which is load-bearing — mcp imports itssiblings by package name and those resolve to their built declarations.
Without it a fresh clone gets three TS2307s instead of an answer.
typecheckCI job. It needs no Chrome, so it reports in under a minuterather than after a browser download, and the script cannot rot again.
node_modulesof its own resolves
@motionvector/*up to the main checkout, so mcp getschecked against whatever is built over there. It cost a bad push during this
work.
Verification, in a cold clone
npm ci && npm run typecheckfrom coldtsc, nothing builtpretypecheckexiststest/*.mjsstays outside the config deliberately. Type-checking the tests isworth doing and is not a config line — they reach for fields the public types
do not carry, e.g.
census.targetType. Separate change.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is enabled.