chore: bump typescript to v6#101
Merged
Merged
Conversation
TypeScript 6 removed automatic inclusion of every @types/* package in node_modules — ambient type deps must now be declared explicitly. The addition of types: ["node", "jest"] covers what src/Check.ts and the test suite actually use; without it the build fails with "Cannot find name 'Buffer'/'process'" in both antlr4's .d.ts and our own code. Downstream consumers are unaffected: building src against TS 6 produces a dist/ tree bit-for-bit identical to the TS 5.9.3 output (verified via diff -r). typescript-eslint 8.59's peer-dep range already covers TS 6. - typescript 5.9.3 -> 6.0.3 - tsconfig.json: add types: ["node", "jest"]
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
Supersedes Dependabot PR #95. Two tightly-coupled changes:
typescript5.9.3 → 6.0.3tsconfig.json: add"types": ["node", "jest"]TypeScript 6 removed the automatic inclusion of every
@types/*package innode_modules— ambient type deps now need to be declared explicitly. That explains why #95 failed CI withCannot find name 'Buffer' / 'process'. Thetypesarray covers whatsrc/Check.tsand the test files actually use.typescript-eslint@8.59.0's peer-dep range is>=4.8.4 <6.1.0, so it already supports TS 6 — no tseslint bump needed.Consumer impact
None. Verified by building
src/under both TS 5.9.3 and TS 6.0.3 and runningdiff -rover the twodist/trees: zero differences in either.jsor.d.tsoutput. Downstream projects on any TS version continue to see identical types.Test plan
npm installclean (0 vulns, no peer-dep warnings)npm run lint— clean exitnpm run build— BUILD SUCCESS under TS 6npm test— 76/76 tests passdiff -r dist-ts5 dist-ts6— no differences