[code-infra] Run TypeScript 7 alongside the TS6 JS API - #5603
Draft
brijeshb42 wants to merge 3 commits into
Draft
Conversation
Adopts the side-by-side setup from the TS 7.0 announcement, matching mui/mui-public#1828: TS 7 installed at the workspace root as "@typescript/native": "npm:typescript@7.0.2" (replaces the discontinued @typescript/native-preview nightly), `typescript` aliased to npm:@typescript/typescript6@6.0.2 wherever the JS API is resolved (typescript-eslint, docs-infra), and `tsgo -b` typecheck scripts switched to the native `tsc -b`. The docs app keeps the TS6 alias and sets experimental.useTypeScriptCli: false — docs-infra's type extraction requires the TS6 JS API, and the alias ships no `tsc` bin for the Next.js >= 16.3 CLI checker. Temporary until a code-infra canary ships the tsc/tsc6-aware build: @mui/internal-code-infra points at pkg.pr.new (mui-public#1828) and blockExoticSubdeps is off to admit its pkg.pr.new subdependencies. Known follow-up: the new code-infra eslint config enables the vitest-globals rules (mui-public#1798), currently ~5.5k errors here (5.4k auto-fixable); left for a dedicated migration.
commit: |
✅ Deploy Preview for base-ui ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Bundle size
PerformanceTotal duration: 1,089.46 ms +38.68 ms(+3.7%) | Renders: 76 (+0) | Paint: 1,765.74 ms +52.80 ms(+3.1%) No significant changes — details Check out the code infra dashboard for more information about this PR. |
api-extractor requires --typescript-compiler-folder to point at a package literally named "typescript"; the @typescript/typescript6 wrapper fails that check. Drop the flag and use api-extractor's bundled compiler, which produces an identical API report. Also run pnpm dedupe, which CI flagged as missing.
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.
Adopts the side-by-side setup from the TS 7.0 announcement, matching mui/mui-public#1828.
Changes
"@typescript/native": "npm:typescript@7.0.2", replacing the discontinued@typescript/native-previewnightly.typescript→npm:@typescript/typescript6@6.0.2alias wherever the JS API is resolved (typescript-eslint, docs-infra); also inpackages/react/packages/utilsdevDependencies so their local install doesn't shadow the root nativetsc.tsgo -btypecheck scripts → the nativetsc -b;code-infra build --tsgonow resolves the native compiler through the new tsc/tsc6 pair.experimental.useTypeScriptCli: false: docs-infra's type extraction requires the TS6 JS API, and the alias ships notscbin for the Next.js ≥ 16.3 CLI checker.Temporary (until a code-infra canary ships mui/mui-public#1828)
@mui/internal-code-infrapoints at pkg.pr.new.blockExoticSubdeps: falseto admit its pkg.pr.new subdependencies.Verification
pnpm typescript(nativetsc -b),build+release:build(native declaration emit), jsdom unit suite (7874 tests), full docs build — all pass locally.Known follow-up
The new code-infra eslint config enables the vitest-globals rules (mui/mui-public#1798): ~5.5k errors here, 5.4k auto-fixable. Left for a dedicated migration so it doesn't drown this diff.