Repository navigation
chore: upgrade to TypeScript 7 - #1119
Merged
Merged
Conversation
- Bump typescript to ^7.0.2 (native Go compiler) - Add "types": ["node"] to tsconfig.base.json to resolve node:* builtins under moduleResolution: Bundler - typecheck ~10.6s -> ~3.4s wall; clean build ~16s -> ~7s wall
…striction
TypeScript 7's package.json no longer exports ./bin/tsc via the exports field, so require.resolve('typescript/bin/tsc') fails. Replace with an upward search for node_modules/typescript/bin/tsc, which still works for borrowed worktree dependencies.
Replace the manual node_modules walk with createRequire + resolve('typescript/package.json') and join to bin/tsc, which is shorter and follows Node's module resolution semantics. Add a fake package.json to the borrowed-dependency test fixture so the new resolver can still find the mocked tsc.
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
Upgrade TypeScript from 5.9.3 to 7.0.2 (native Go compiler). Closes #1113.
TypeScript 7 changed two defaults that required small adjustments in our setup:
typescompiler option now defaults to[]instead of auto-including@typespackages. We add"types": ["node"]totsconfig.base.jsonsonode:*builtins resolve undermoduleResolution: "Bundler".typescriptpackage no longer exports./bin/tscin itsexportsfield. One test that shells out totscis updated to resolvetypescript/package.jsonand derive the binary path from there.No product code changes.
Verification
npm run typecheckpasses: ~10.6s (TS5) → ~3.4s (TS7)npm run buildpasses: ~16s (TS5) → ~7s (TS7)npm run test --workspaces --if-presentpasses: 2571 testsnpm run lintpassesNote: full root
npm test(which includes real-model E2E contracts) was not run because it requires provider API keys.Breaking change / Migration
None for users. This is an internal toolchain upgrade. The change to
typesintsconfig.base.jsonnarrows ambient types to Node only for packages that do not overridetypes; this matches the behavior we already relied on in practice.