build(deps): declare typescript as explicit devDependency - #52
Merged
Conversation
The build script runs `tsc`, but TypeScript was only present transitively (pulled in by typescript-eslint). Declaring it directly makes the build's compiler an owned dependency instead of an accident of the dependency tree that could vanish if the linter changes. Pinned to exact 5.9.3 (no caret) on purpose: TypeScript does not follow strict semver, so a minor bump can introduce stricter checks that break the build without warning. Verified: tsc exits 0 and all 246 tests pass.
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.
Summary
typescriptas an explicitdevDependency(exact5.9.3).Why
The
buildscript runstsc, but TypeScript was not declared inpackage.json— it only arrived transitively viatypescript-eslint(peer
>=4.8.4 <6.1.0). The build's own compiler hung on an accident ofthe dependency tree: if the linter were upgraded, swapped, or removed,
the build would silently lose
tsc.Why exact pin (no caret)
TypeScript does not follow strict semver — a minor bump (e.g. 5.9 → 5.10)
can introduce stricter type checks that break the build with no API
change. Pinning the compiler exactly is the recommended practice and
keeps CI deterministic, even though the rest of the repo uses carets.
This intentionally stays on 5.9.3 (the version already installed). A
move to TypeScript 6 is a separate decision, best paired with the linter
strategy (Biome vs typescript-eslint).
Test plan
bun run build— tsc exits 0bun test— 246 pass / 0 failbun pm lsconfirms typescript@5.9.3 is now a direct dependency