Conversation
🦋 Changeset detectedLatest commit: 28cac38 The changes in this PR will be included in the next version bump. This PR includes changesets to release 47 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
🚀 Preview Environment Ready!
Details:
|
@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/observability-plugin
@module-federation/playground
@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 Report19 package(s) changed, 23 unchanged. Package dist + ESM entry
Bundle targets
Consumer scenarios
Total dist (raw): 36.21 MB (+521.5 kB (+1.4%)) Bundle sizes are generated with rslib (Rspack). Package-root metrics preserve the historical report. Tracked subpath exports such as Bundle errors
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c866d8199e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const stdout = execFileSync( | ||
| process.execPath, | ||
| [ | ||
| typeScriptPackageInfo.tscBinPath, | ||
| '--showConfig', | ||
| '--project', | ||
| resolvedTsConfigPath, | ||
| ], |
There was a problem hiding this comment.
Run TypeScript 7's tsc binary directly
When the resolved package is TypeScript 7, tscBinPath points at the new Go-native tsc executable, but this code invokes it as node <bin/tsc>. In any project that actually has typescript@7 installed, retrieveRemoteConfig will fail before generating types because Node tries to parse the native binary instead of executing tsc (the TypeScript 7 announcement documents running it as npx tsc, not via node). The same process.execPath wrapping is repeated for --listFilesOnly and compilation, so TS7 support remains broken until the binary is executed directly or through the package-manager shim.
Useful? React with 👍 / 👎.
|
Hello @2heal1, right now these MF sub-packages have TypeScript v6/7 peer dependency issues. Can you please include TypeScript v6/7 peer deps specifications for them too here in this PR? Thanks! |
@AlaDouagi Thanks for pointing this out. These two packages aren’t maintained by me, so they’re outside the scope of this PR. This PR only updates the packages I maintain for TypeScript 7 compatibility. It would be best to open an issue or PR in the corresponding repositories if TypeScript 7 peer dependency support is needed there. |
|
@Nsttt Would you mind helping upgrade the Metro packages to support TypeScript 7 in a separate PR? I intentionally left the Metro changes out of this PR because enabling the TypeScript 7 upgrade caused the Metro CI to fail: Thanks! |
Yeah, will do |
Description
This PR adds TypeScript 7 support to federated type generation while preserving compatibility with TypeScript 4.9, 5, and 6.
TypeScript 7 no longer exposes the package root used by the existing
dts-pluginimplementation. As a result, directly importing or requiringtypescriptfails withERR_PACKAGE_PATH_NOT_EXPORTED.Instead of only widening the TypeScript peer dependency range, this PR introduces a version-aware compilation path.
DTS plugin changes
dts.cwd.tscexecutable.tscCLI:--showConfigto read the effective TypeScript configuration.--listFilesOnlyto collect exposed entries and their source dependencies.--projectto generate declaration files.tsc.compilerInstancecommands such asvue-tsc.CompilerOptionstypes.rootDir, output paths, project references, and symlinked source paths.node/node10module resolution tobundlerwhen generating a TypeScript 7-compatible configuration.Repository compatibility updates
^7.0.0while retaining support for TypeScript 4.9, 5, and 6.tsconfigpath and module-resolution settings that are no longer accepted by TypeScript 7.Tests
tsconfig;vue-tsc.Metro scope
The explicit TypeScript 7 upgrade for Metro-related packages is intentionally not included in this PR.
When the Metro TypeScript upgrade was enabled, the Metro iOS CI path failed during CocoaPods project generation. The Metro-specific TypeScript migration will therefore need a separate follow-up after the Metro/Rock/React Native integration issue is understood.
Related Issue
Closes #4854
Types of changes
Checklist