Skip to content

chore: upgrade typescript to 6.0.3#4737

Merged
2heal1 merged 5 commits into
module-federation:mainfrom
eduard-jacko:feat/typescript-6-upgrade
Jul 7, 2026
Merged

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

Conversation

@eduard-jacko

Copy link
Copy Markdown
Contributor

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

@netlify

netlify Bot commented May 18, 2026

Copy link
Copy Markdown

Deploy Preview for module-federation-docs ready!

Name Link
🔨 Latest commit 57053eb
🔍 Latest deploy log https://app.netlify.com/projects/module-federation-docs/deploys/6a4c9ba207853200081a1d1e
😎 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

changeset-bot Bot commented May 18, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 57053eb

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

pkg-pr-new Bot commented May 19, 2026

Copy link
Copy Markdown

Open in StackBlitz

@module-federation/devtools

pnpm add https://pkg.pr.new/@module-federation/devtools@57053eb

@module-federation/cli

pnpm add https://pkg.pr.new/@module-federation/cli@57053eb

create-module-federation

pnpm add https://pkg.pr.new/create-module-federation@57053eb

@module-federation/dts-plugin

pnpm add https://pkg.pr.new/@module-federation/dts-plugin@57053eb

@module-federation/enhanced

pnpm add https://pkg.pr.new/@module-federation/enhanced@57053eb

@module-federation/error-codes

pnpm add https://pkg.pr.new/@module-federation/error-codes@57053eb

@module-federation/esbuild

pnpm add https://pkg.pr.new/@module-federation/esbuild@57053eb

@module-federation/managers

pnpm add https://pkg.pr.new/@module-federation/managers@57053eb

@module-federation/manifest

pnpm add https://pkg.pr.new/@module-federation/manifest@57053eb

@module-federation/metro

pnpm add https://pkg.pr.new/@module-federation/metro@57053eb

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

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

@module-federation/metro-plugin-rnef

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

@module-federation/metro-plugin-rock

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

@module-federation/modern-js

pnpm add https://pkg.pr.new/@module-federation/modern-js@57053eb

@module-federation/modern-js-v3

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

@module-federation/native-federation-tests

pnpm add https://pkg.pr.new/@module-federation/native-federation-tests@57053eb

@module-federation/native-federation-typescript

pnpm add https://pkg.pr.new/@module-federation/native-federation-typescript@57053eb

@module-federation/nextjs-mf

pnpm add https://pkg.pr.new/@module-federation/nextjs-mf@57053eb

@module-federation/node

pnpm add https://pkg.pr.new/@module-federation/node@57053eb

@module-federation/observability-plugin

pnpm add https://pkg.pr.new/@module-federation/observability-plugin@57053eb

@module-federation/playground

pnpm add https://pkg.pr.new/@module-federation/playground@57053eb

@module-federation/retry-plugin

pnpm add https://pkg.pr.new/@module-federation/retry-plugin@57053eb

@module-federation/rsbuild-plugin

pnpm add https://pkg.pr.new/@module-federation/rsbuild-plugin@57053eb

@module-federation/rspack

pnpm add https://pkg.pr.new/@module-federation/rspack@57053eb

@module-federation/rspress-plugin

pnpm add https://pkg.pr.new/@module-federation/rspress-plugin@57053eb

@module-federation/runtime

pnpm add https://pkg.pr.new/@module-federation/runtime@57053eb

@module-federation/runtime-core

pnpm add https://pkg.pr.new/@module-federation/runtime-core@57053eb

@module-federation/runtime-tools

pnpm add https://pkg.pr.new/@module-federation/runtime-tools@57053eb

@module-federation/sdk

pnpm add https://pkg.pr.new/@module-federation/sdk@57053eb

@module-federation/storybook-addon

pnpm add https://pkg.pr.new/@module-federation/storybook-addon@57053eb

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

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

@module-federation/treeshake-frontend

pnpm add https://pkg.pr.new/@module-federation/treeshake-frontend@57053eb

@module-federation/treeshake-server

pnpm add https://pkg.pr.new/@module-federation/treeshake-server@57053eb

@module-federation/typescript

pnpm add https://pkg.pr.new/@module-federation/typescript@57053eb

@module-federation/utilities

pnpm add https://pkg.pr.new/@module-federation/utilities@57053eb

@module-federation/webpack-bundler-runtime

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

@module-federation/bridge-react

pnpm add https://pkg.pr.new/@module-federation/bridge-react@57053eb

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

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

@module-federation/bridge-shared

pnpm add https://pkg.pr.new/@module-federation/bridge-shared@57053eb

@module-federation/bridge-vue3

pnpm add https://pkg.pr.new/@module-federation/bridge-vue3@57053eb

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

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

commit: 57053eb

@github-actions

github-actions Bot commented May 19, 2026

Copy link
Copy Markdown
Contributor

Bundle Size Report

17 package(s) changed, 25 unchanged.

Package dist + ESM entry

Package Total dist (raw) Delta ESM gzip Delta
@module-federation/bridge-shared 1.1 kB +33 B (+3.2%) 137 B no change
@module-federation/bridge-vue3 173.6 kB -2126 B (-1.2%) 25.7 kB +6 B (+0.0%)
@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 667.4 kB -748 B (-0.1%) 4.0 kB no change
@module-federation/dts-plugin 313.6 kB +144 B (+0.0%) 4.7 kB no change
@module-federation/enhanced 810.0 kB no change 672 B no change
@module-federation/managers 70.0 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-tests 93.1 kB +27 B (+0.0%) 745 B no change
@module-federation/native-federation-typescript 91.6 kB +37 B (+0.0%) 629 B no change
@module-federation/node 193.4 kB no change 217 B no change
@module-federation/playground 28.92 MB +87.6 kB (+0.3%) 51.8 kB no change
@module-federation/runtime 20.0 kB -13 B (-0.1%) 715 B no change
@module-federation/storybook-addon 79.2 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-shared 124 B no change 124 B no change
@module-federation/bridge-vue3 19.0 kB no change 19.2 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 30.4 kB -29 B (-0.1%) 30.4 kB -29 B (-0.1%)
@module-federation/dts-plugin 14.4 kB no change 14.4 kB no change
@module-federation/enhanced 2.6 kB -46 B (-1.7%) 2.6 kB -46 B (-1.7%)
@module-federation/managers 2.4 kB -29 B (-1.2%) 2.4 kB -29 B (-1.2%)
@module-federation/manifest 6.1 kB -42 B (-0.7%) 6.1 kB -42 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-tests 1.5 kB no change 1.5 kB no change
@module-federation/native-federation-typescript 2.0 kB no change 2.0 kB no change
@module-federation/node 9.2 kB -29 B (-0.3%) 9.2 kB -29 B (-0.3%)
@module-federation/playground 48.0 kB no change 48.0 kB no change
@module-federation/runtime 687 B no change 687 B no change
@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 21.4 kB -19 B (-0.1%) 23.0 kB -24 B (-0.1%) +1.6 kB -5 B

Total dist (raw): 35.78 MB (+85.0 kB (+0.2%))
Total ESM gzip: 131.1 kB (+6 B (+0.0%))
Total web bundle (gzip): 255.4 kB (-331 B (-0.1%))
Total node bundle (gzip): 257.6 kB (-328 B (-0.1%))
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
@2heal1

2heal1 commented May 19, 2026

Copy link
Copy Markdown
Member

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

@eduard-jacko
eduard-jacko requested a review from 2heal1 May 19, 2026 10:19

2heal1 commented May 28, 2026

Copy link
Copy Markdown
Member

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.

@eduard-jacko
eduard-jacko force-pushed the feat/typescript-6-upgrade branch 2 times, most recently from 493a82f to 9a7a2c2 Compare June 17, 2026 10:59
@crutch12

Copy link
Copy Markdown
Contributor

Hope for you, guys 👀

@eduard-jacko
eduard-jacko force-pushed the feat/typescript-6-upgrade branch from 9a7a2c2 to 1e8f30b Compare June 22, 2026 12:42
@eduard-jacko

eduard-jacko commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

@2heal1 please let me know if there is anything else need to be done.

@joshuaellis

Copy link
Copy Markdown

This has hit us over at sanity.

CC @gioboa anything you can do to nudge this along?

@2heal1
2heal1 force-pushed the feat/typescript-6-upgrade branch 2 times, most recently from 089be01 to 5ce8400 Compare July 6, 2026 08:43
eduard-jacko and others added 5 commits July 7, 2026 14:10
- 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
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).
- bridge-shared: import CSSProperties as type
- bridge-shared: types path -> ./dist/src/index.d.ts
- bridge-react-webpack-plugin: types: ["node"] for node:* imports
- vue3-bridge: @ts-ignore __APP_VERSION__ Vue 3 typing
- chrome-devtools: cast __FEDERATION__ assignment (TS2322)
- dts-plugin test: node10 + ignoreDeprecations fixture
@2heal1
2heal1 force-pushed the feat/typescript-6-upgrade branch from 5ce8400 to 57053eb Compare July 7, 2026 06:24
@2heal1
2heal1 merged commit 95eb52b into module-federation:main Jul 7, 2026
23 checks passed
"main": "./dist/index.umd.js",
"module": "./dist/index.es.js",
"types": "./dist/index.d.ts",
"types": "./dist/src/index.d.ts",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That doesn't look right tbh

hashRoute?: boolean;
}) {
return defineAsyncComponent({
// @ts-ignore

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This ts-ignore will remain in codebase? Or this should be addressed in future?

Comment thread packages/cli/package.json
"devDependencies": {
"@types/node": "^20.19.5"
"@types/node": "^20.19.5",
"typescript": "6.0.3"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why version is explicitly locked?

@2heal1 2heal1 mentioned this pull request Jul 8, 2026
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.

5 participants