Skip to content

chore: upgrade typescript to 6.0.3#4737

Open
eduard-jacko wants to merge 2 commits into
module-federation:mainfrom
eduard-jacko:feat/typescript-6-upgrade
Open

chore: upgrade typescript to 6.0.3#4737
eduard-jacko wants to merge 2 commits into
module-federation:mainfrom
eduard-jacko:feat/typescript-6-upgrade

Conversation

@eduard-jacko
Copy link
Copy Markdown

Summary

Upgrades TypeScript from 5.9.3 to 6.0.3 (latest stable) across the entire monorepo.

  • Updates root devDependency and adds pnpm override for consistent resolution
  • Adds || ^6.0.0 to peer dependencies (keeps backwards compat with TS 4.9+ and 5.x)
  • Migrates moduleResolution: "node""node10" in all tsconfigs (same behavior, silences TS 6 deprecation)
  • Adds ignoreDeprecations: "6.0" for baseUrl and moduleResolution deprecations
  • Adds explicit strict: false to base tsconfig (preserves TS 5.x default since TS 6 defaults strict to true)
  • Fixes 2 source files in chrome-devtools affected by stricter type checking

Key decisions

  • Backwards compatible: peer deps remain "^4.9.0 || ^5.0.0 || ^6.0.0" so existing TS 5 users are unaffected
  • moduleResolution: "node10": semantically identical to "node", just the new non-deprecated name
  • ignoreDeprecations: "6.0": suppresses warnings for baseUrl and moduleResolution until a future migration to "bundler" resolution

Verification

  • pnpm run build:packages — 41/41 pass
  • pnpm run test:packages — 76/77 pass (1 unrelated Playwright/Chromium env issue)
  • pnpm run lint — 35/35 pass
  • ✅ Multi-version type compatibility tested: built .d.ts files validated against TS 5.4.5, 5.9.3, and 6.0.3

Test plan

  • CI build passes
  • CI tests pass
  • Verify no type regressions in consuming projects

- Update root devDependency from 5.9.3 to 6.0.3
- Add pnpm override to ensure consistent TS version across all packages
- Update peer dependencies to include ^6.0.0 (maintaining ^4.9.0 || ^5.0.0 compat)
- Update sub-package devDependencies to ^6.0.3
- Migrate moduleResolution from "node" to "node10" across all tsconfigs
- Add ignoreDeprecations: "6.0" for baseUrl and moduleResolution deprecations
- Add strict: false to base tsconfig (preserves TS 5.x default behavior)
- Fix chrome-devtools type assertion and unused @ts-expect-error
- Update native-federation-typescript test expectations for ignoreDeprecations
@netlify
Copy link
Copy Markdown

netlify Bot commented May 18, 2026

Deploy Preview for module-federation-docs ready!

Name Link
🔨 Latest commit d0b8b4b
🔍 Latest deploy log https://app.netlify.com/projects/module-federation-docs/deploys/6a0c2ffb582bf30008301b8a
😎 Deploy Preview https://deploy-preview-4737--module-federation-docs.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.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 18, 2026

⚠️ No Changeset found

Latest commit: d0b8b4b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 19, 2026

Open in StackBlitz

@module-federation/devtools

pnpm add https://pkg.pr.new/@module-federation/devtools@34309dc

@module-federation/cli

pnpm add https://pkg.pr.new/@module-federation/cli@34309dc

create-module-federation

pnpm add https://pkg.pr.new/create-module-federation@34309dc

@module-federation/dts-plugin

pnpm add https://pkg.pr.new/@module-federation/dts-plugin@34309dc

@module-federation/enhanced

pnpm add https://pkg.pr.new/@module-federation/enhanced@34309dc

@module-federation/error-codes

pnpm add https://pkg.pr.new/@module-federation/error-codes@34309dc

@module-federation/esbuild

pnpm add https://pkg.pr.new/@module-federation/esbuild@34309dc

@module-federation/managers

pnpm add https://pkg.pr.new/@module-federation/managers@34309dc

@module-federation/manifest

pnpm add https://pkg.pr.new/@module-federation/manifest@34309dc

@module-federation/metro

pnpm add https://pkg.pr.new/@module-federation/metro@34309dc

@module-federation/metro-plugin-rnc-cli

pnpm add https://pkg.pr.new/@module-federation/metro-plugin-rnc-cli@34309dc

@module-federation/metro-plugin-rnef

pnpm add https://pkg.pr.new/@module-federation/metro-plugin-rnef@34309dc

@module-federation/metro-plugin-rock

pnpm add https://pkg.pr.new/@module-federation/metro-plugin-rock@34309dc

@module-federation/modern-js

pnpm add https://pkg.pr.new/@module-federation/modern-js@34309dc

@module-federation/modern-js-v3

pnpm add https://pkg.pr.new/@module-federation/modern-js-v3@34309dc

@module-federation/native-federation-tests

pnpm add https://pkg.pr.new/@module-federation/native-federation-tests@34309dc

@module-federation/native-federation-typescript

pnpm add https://pkg.pr.new/@module-federation/native-federation-typescript@34309dc

@module-federation/nextjs-mf

pnpm add https://pkg.pr.new/@module-federation/nextjs-mf@34309dc

@module-federation/node

pnpm add https://pkg.pr.new/@module-federation/node@34309dc

@module-federation/retry-plugin

pnpm add https://pkg.pr.new/@module-federation/retry-plugin@34309dc

@module-federation/rsbuild-plugin

pnpm add https://pkg.pr.new/@module-federation/rsbuild-plugin@34309dc

@module-federation/rspack

pnpm add https://pkg.pr.new/@module-federation/rspack@34309dc

@module-federation/rspress-plugin

pnpm add https://pkg.pr.new/@module-federation/rspress-plugin@34309dc

@module-federation/runtime

pnpm add https://pkg.pr.new/@module-federation/runtime@34309dc

@module-federation/runtime-core

pnpm add https://pkg.pr.new/@module-federation/runtime-core@34309dc

@module-federation/runtime-tools

pnpm add https://pkg.pr.new/@module-federation/runtime-tools@34309dc

@module-federation/sdk

pnpm add https://pkg.pr.new/@module-federation/sdk@34309dc

@module-federation/storybook-addon

pnpm add https://pkg.pr.new/@module-federation/storybook-addon@34309dc

@module-federation/third-party-dts-extractor

pnpm add https://pkg.pr.new/@module-federation/third-party-dts-extractor@34309dc

@module-federation/treeshake-frontend

pnpm add https://pkg.pr.new/@module-federation/treeshake-frontend@34309dc

@module-federation/treeshake-server

pnpm add https://pkg.pr.new/@module-federation/treeshake-server@34309dc

@module-federation/typescript

pnpm add https://pkg.pr.new/@module-federation/typescript@34309dc

@module-federation/utilities

pnpm add https://pkg.pr.new/@module-federation/utilities@34309dc

@module-federation/webpack-bundler-runtime

pnpm add https://pkg.pr.new/@module-federation/webpack-bundler-runtime@34309dc

@module-federation/bridge-react

pnpm add https://pkg.pr.new/@module-federation/bridge-react@34309dc

@module-federation/bridge-react-webpack-plugin

pnpm add https://pkg.pr.new/@module-federation/bridge-react-webpack-plugin@34309dc

@module-federation/bridge-shared

pnpm add https://pkg.pr.new/@module-federation/bridge-shared@34309dc

@module-federation/bridge-vue3

pnpm add https://pkg.pr.new/@module-federation/bridge-vue3@34309dc

@module-federation/inject-external-runtime-core-plugin

pnpm add https://pkg.pr.new/@module-federation/inject-external-runtime-core-plugin@34309dc

commit: 34309dc

@github-actions
Copy link
Copy Markdown
Contributor

Bundle Size Report

14 package(s) changed, 26 unchanged.

Package dist + ESM entry

Package Total dist (raw) Delta ESM gzip Delta
@module-federation/bridge-vue3 146.7 kB -2144 B (-1.4%) 22.6 kB no change
@module-federation/cli 26.3 kB no change 786 B no change
@module-federation/core 39.1 kB no change 173 B no change
@module-federation/devtools 484.5 kB -666 B (-0.1%) 3.9 kB no change
@module-federation/dts-plugin 307.0 kB +144 B (+0.0%) 4.6 kB no change
@module-federation/enhanced 807.3 kB no change 672 B no change
@module-federation/inject-external-runtime-core-plugin 5.2 kB -26 B (-0.5%) 519 B no change
@module-federation/managers 69.8 kB no change 334 B no change
@module-federation/manifest 136.1 kB no change 182 B no change
@module-federation/metro-plugin-rnc-cli 0 B no change 314 B no change
@module-federation/native-federation-typescript 91.5 kB +10 B (+0.0%) 629 B no change
@module-federation/node 193.4 kB no change 217 B no change
@module-federation/storybook-addon 77.7 kB no change 100 B no change
@module-federation/utilities 110.6 kB no change 328 B no change

Bundle targets

Package Web bundle (gzip) Delta Node bundle (gzip) Delta
@module-federation/bridge-vue3 17.2 kB no change 16.9 kB no change
@module-federation/cli 2.3 kB -35 B (-1.5%) 2.3 kB -35 B (-1.5%)
@module-federation/core 1.1 kB -34 B (-3.0%) 1.0 kB -32 B (-3.0%)
@module-federation/devtools 22.3 kB -34 B (-0.1%) 22.3 kB -34 B (-0.1%)
@module-federation/dts-plugin 14.3 kB no change 14.3 kB no change
@module-federation/enhanced 2.6 kB -47 B (-1.7%) 2.6 kB -47 B (-1.7%)
@module-federation/inject-external-runtime-core-plugin 396 B no change 396 B no change
@module-federation/managers 2.4 kB -29 B (-1.2%) 2.4 kB -29 B (-1.2%)
@module-federation/manifest 6.1 kB -43 B (-0.7%) 6.1 kB -43 B (-0.7%)
@module-federation/metro-plugin-rnc-cli 411 B -27 B (-6.2%) 411 B -27 B (-6.2%)
@module-federation/native-federation-typescript 2.0 kB no change 2.0 kB no change
@module-federation/node 9.2 kB -30 B (-0.3%) 9.2 kB -30 B (-0.3%)
@module-federation/storybook-addon 1.9 kB -26 B (-1.3%) 1.7 kB -25 B (-1.4%)
@module-federation/utilities 2.6 kB -34 B (-1.3%) 2.6 kB -34 B (-1.3%)

Consumer scenarios

Scenario Web output (gzip) Delta Node output (gzip) Delta Gap (node-web) Delta
Enhanced remoteEntry 19.8 kB -26 B (-0.1%) 20.8 kB -10 B (-0.0%) +1.0 kB +16 B

Total dist (raw): 6.24 MB (-2682 B (-0.0%))
Total ESM gzip: 74.1 kB (no change)
Total web bundle (gzip): 180.8 kB (-339 B (-0.2%))
Total node bundle (gzip): 181.2 kB (-336 B (-0.2%))
Tracked ./bundler entry gzip: 556 B (no change)
Tracked ./bundler web bundle (gzip): 4.8 kB (no change)
Tracked ./bundler node bundle (gzip): 4.8 kB (no change)

Bundle sizes are generated with rslib (Rspack). Package-root metrics preserve the historical report. Tracked subpath exports such as ./bundler are measured separately so ENV_TARGET-driven tree-shaking is visible. Bare imports are externalized to keep package-level sizes consistent, and assets are emitted as resources.

Comment thread package.json Outdated
"@eslint/eslintrc>ajv": "6.14.0",
"schema-utils@3.3.0>ajv": "6.14.0"
"schema-utils@3.3.0>ajv": "6.14.0",
"typescript": "$typescript"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to use overrides for typescript here?

This field has a fairly broad impact across the workspace, so it feels a bit risky. It also seems like the version updates in the relevant packages may already be enough.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call — I've removed the "typescript": "$typescript" override and replaced it with explicit "typescript": "6.0.3" devDependencies in the 15 packages that were resolving to TS 5.x through transitive peer deps (from @rslib/core, vue-tsc, etc.).

This is more targeted and won't affect how transitive dependencies resolve TypeScript internally.

@2heal1
Copy link
Copy Markdown
Member

2heal1 commented May 19, 2026

The PR has one comment that needs to be addressed, and it also needs to fix the CI issue.

Remove the heavy-handed `"typescript": "$typescript"` pnpm override
and instead add explicit `"typescript": "6.0.3"` devDependencies to
the 15 packages that resolve to TS 5.x through transitive peer deps.

Also fix dts-plugin test assertions for TS 6 (moduleResolution and
ignoreDeprecations values).
@eduard-jacko eduard-jacko requested a review from 2heal1 May 19, 2026 10:19
Copy link
Copy Markdown
Member

2heal1 commented May 28, 2026

Could you please rebase this branch on the latest main and resolve the current conflicts? We can continue review once the branch is up to date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants