Skip to content

[code-infra] Run TypeScript 7 alongside the TS6 JS API - #5603

Draft
brijeshb42 wants to merge 3 commits into
mui:masterfrom
brijeshb42:ts7-side-by-side
Draft

[code-infra] Run TypeScript 7 alongside the TS6 JS API#5603
brijeshb42 wants to merge 3 commits into
mui:masterfrom
brijeshb42:ts7-side-by-side

Conversation

@brijeshb42

@brijeshb42 brijeshb42 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Adopts the side-by-side setup from the TS 7.0 announcement, matching mui/mui-public#1828.

Changes

  • TS 7 installed at the workspace root as "@typescript/native": "npm:typescript@7.0.2", replacing the discontinued @typescript/native-preview nightly.
  • typescriptnpm:@typescript/typescript6@6.0.2 alias wherever the JS API is resolved (typescript-eslint, docs-infra); also in packages/react/packages/utils devDependencies so their local install doesn't shadow the root native tsc.
  • tsgo -b typecheck scripts → the native tsc -b; code-infra build --tsgo now resolves the native compiler through the new tsc/tsc6 pair.
  • 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 mui/mui-public#1828)

  • @mui/internal-code-infra points at pkg.pr.new.
  • blockExoticSubdeps: false to admit its pkg.pr.new subdependencies.

Verification

pnpm typescript (native tsc -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.

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.
@brijeshb42 brijeshb42 added the scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd). label Aug 31, 2026
@pkg-pr-new

pkg-pr-new Bot commented Aug 31, 2026

Copy link
Copy Markdown

commit: 9e5f00e

@netlify

netlify Bot commented Aug 31, 2026

Copy link
Copy Markdown

Deploy Preview for base-ui ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 9e5f00e
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/6a95afc26a986300081038e1
😎 Deploy Preview https://deploy-preview-5603--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@code-infra-dashboard

code-infra-dashboard Bot commented Aug 31, 2026

Copy link
Copy Markdown

Bundle size

Bundle Parsed size Gzip size
@base-ui/react 0B(0.00%) 0B(0.00%)

Details of bundle changes

Performance

Total 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.

@brijeshb42 brijeshb42 changed the title [core] Run TypeScript 7 alongside the TS6 JS API [code-infra] Run TypeScript 7 alongside the TS6 JS API Aug 31, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant