[core] Use @typescript/typescript6 for the docs tooling - #49025
Merged
Conversation
Deploy previewBundle size
Check out the code infra dashboard for more information about this PR. |
TypeScript 7 removed the JS compiler API from the `typescript` package root: `lib/` now ships only `tsc.js`, `version.cjs` and `getExePath`, and the root export points at `lib/version.cjs`. The replacement API sits behind the unstable `typescript/unstable/*` subpaths and is not source compatible. `api-docs-builder`, `docs-utils` and `scripts/typescript-to-proptypes` all build on `ts.Program`/`ts.TypeChecker`, so the nightly `test_types_next` job — which installs typescript@next across the workspace — fails with 128 errors before it ever checks the public typings. It has been red every night for the last 30 days. Scope the tooling packages to 6.x so the canary keeps exercising what it is meant to exercise. They already declare `^6.0.3`/`^5.9.3 || ^6.0.0`, so this only stops the workspace-wide override from reaching them. Porting them to the new API stays a separate piece of work.
Replaces the workspace-wide pnpm override with a direct dependency, so the constraint lives in the three packages that actually have it rather than applying to the whole repo whether or not `set-version-overrides` ran. TypeScript 7.0 is stable but deliberately ships no importable compiler API: the package root exports only `version` and the replacement is still behind `typescript/unstable/*`. Everything consuming `ts.Program`/`ts.TypeChecker` is in the same position, and Microsoft publishes `@typescript/typescript6` for it. Depending on it by name means the `typescript` override cannot reach these packages, and it stops the pin from silently holding them back when the repo moves its own `typescript` to 7.x. `typescript` itself is no longer imported anywhere in these packages, so it goes from their dependencies; `tsgo` comes from `@typescript/native-preview` and is unaffected. TypeScript 7.1 plans to stabilise the API (microsoft/TypeScript#63703), which is when this can be swapped back.
Janpot
force-pushed
the
code-infra/ts7-compiler-api
branch
from
August 24, 2026 14:21
c51ea3b to
3b9e325
Compare
1 task
Janpot
marked this pull request as ready for review
August 24, 2026 17:41
Member
Author
|
Flaky screenshot fixed by #49028 |
brijeshb42
approved these changes
Aug 25, 2026
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.
TypeScript 7.0 is stable (
typescript@latestis 7.0.2) but deliberately ships no importable compiler API — the package root exports onlyversion, and the replacement is still behindtypescript/unstable/*.api-docs-builder,docs-utilsandtypescript-to-proptypesall build onts.Program/ts.TypeChecker, so the nightlytest_types_nextjob fails with 128 errors before it reaches the public typings. It has been red every night for 30 days. There is nothing to migrate to yet: typescript-eslint, ts-morph and the Vue/Svelte/Angular tooling are all in the same position, and Microsoft publishes@typescript/typescript6for exactly this.So these three depend on
@typescript/typescript6by name — the constraint sits in the packages that have it rather than in a workspace-wide override, thetypescript@nextoverride can't reach them, and nothing silently holds them back when the repo moves its owntypescriptto 7.x.typescriptis no longer imported in them and drops from their dependencies (tsgocomes from@typescript/native-preview). TypeScript 7.1 plans to stabilise the API (microsoft/TypeScript#63703, stable planned 2026-11-10), which is when this gets swapped back.Verified with typescript@7.1.0-dev installed over the workspace: all three job steps pass. On a normal install
typescript:ciis green, the 67 typescript-to-proptypes tests pass, andpnpm proptypes+pnpm docs:api:buildregenerate byte-identical output.