chore: upgrade typescript to 6.0.3#4737
Conversation
- 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
✅ Deploy Preview for module-federation-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@module-federation/devtools
@module-federation/cli
create-module-federation
@module-federation/dts-plugin
@module-federation/enhanced
@module-federation/error-codes
@module-federation/esbuild
@module-federation/managers
@module-federation/manifest
@module-federation/metro
@module-federation/metro-plugin-rnc-cli
@module-federation/metro-plugin-rnef
@module-federation/metro-plugin-rock
@module-federation/modern-js
@module-federation/modern-js-v3
@module-federation/native-federation-tests
@module-federation/native-federation-typescript
@module-federation/nextjs-mf
@module-federation/node
@module-federation/retry-plugin
@module-federation/rsbuild-plugin
@module-federation/rspack
@module-federation/rspress-plugin
@module-federation/runtime
@module-federation/runtime-core
@module-federation/runtime-tools
@module-federation/sdk
@module-federation/storybook-addon
@module-federation/third-party-dts-extractor
@module-federation/treeshake-frontend
@module-federation/treeshake-server
@module-federation/typescript
@module-federation/utilities
@module-federation/webpack-bundler-runtime
@module-federation/bridge-react
@module-federation/bridge-react-webpack-plugin
@module-federation/bridge-shared
@module-federation/bridge-vue3
@module-federation/inject-external-runtime-core-plugin
commit: |
Bundle Size Report14 package(s) changed, 26 unchanged. Package dist + ESM entry
Bundle targets
Consumer scenarios
Total dist (raw): 6.24 MB (-2682 B (-0.0%)) Bundle sizes are generated with rslib (Rspack). Package-root metrics preserve the historical report. Tracked subpath exports such as |
| "@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" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
|
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).
|
Could you please rebase this branch on the latest |
Summary
Upgrades TypeScript from 5.9.3 to 6.0.3 (latest stable) across the entire monorepo.
|| ^6.0.0to peer dependencies (keeps backwards compat with TS 4.9+ and 5.x)moduleResolution: "node"→"node10"in all tsconfigs (same behavior, silences TS 6 deprecation)ignoreDeprecations: "6.0"forbaseUrlandmoduleResolutiondeprecationsstrict: falseto base tsconfig (preserves TS 5.x default since TS 6 defaults strict to true)Key decisions
"^4.9.0 || ^5.0.0 || ^6.0.0"so existing TS 5 users are unaffectedmoduleResolution: "node10": semantically identical to"node", just the new non-deprecated nameignoreDeprecations: "6.0": suppresses warnings forbaseUrlandmoduleResolutionuntil a future migration to"bundler"resolutionVerification
pnpm run build:packages— 41/41 passpnpm run test:packages— 76/77 pass (1 unrelated Playwright/Chromium env issue)pnpm run lint— 35/35 pass.d.tsfiles validated against TS 5.4.5, 5.9.3, and 6.0.3Test plan