Repository navigation
ci(node): verify published packages on Node 20 - #4888
Conversation
|
@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 Report6 package(s) changed, 36 unchanged. Bundle targets
Consumer scenarios
Total dist (raw): 36.22 MB (no change) Bundle sizes are generated with rslib (Rspack). Package-root metrics preserve the historical report. Tracked subpath exports such as |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 99449d3923
ℹ️ 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 packageDirs = readdirSync(PACKAGES_DIR, { withFileTypes: true }) | ||
| .filter((entry) => entry.isDirectory()) | ||
| .map((entry) => join(PACKAGES_DIR, entry.name)) | ||
| .filter((packageDir) => existsSync(join(packageDir, 'package.json'))) |
There was a problem hiding this comment.
Include nested workspace packages in the Node 20 tarballs
This only enumerates direct children of packages/ that have a package.json. Several publishable workspaces live under packages/bridge/* and packages/runtime-plugins/* (they are in pnpm-workspace.yaml and the changesets fixed group), and packages such as @module-federation/enhanced/@module-federation/rspack depend on them via workspace:*. In CI those tarballs are never uploaded, so npm install resolves those dependencies from the public registry instead of the just-built commit, or fails when the current fixed version has not been published, and Node 20 compatibility is not checked for changes in those workspaces.
Useful? React with 👍 / 👎.
Description
This is a follow-up to #4884, which moved repository development and CI to Node.js 24.
Node.js 20 reached End-of-Life on March 24, 2026 and no longer receives upstream updates, including security patches. See the official Node.js EOL page. The compatibility covered here is intended only for legacy consumers during their migration.
The published packages still need to work for existing Node.js 20 consumers, so this PR adds a separate compatibility check for the actual package tarballs produced on Node.js 24. A clean TypeScript consumer installs those tarballs on Node.js 20.19.5, verifies CommonJS and ESM loading, exercises the CLI entry points, checks the public types, and completes and runs both Webpack and Rspack builds.
The README now documents the support boundary: repository development uses Node.js 24, while Node-facing published packages retain legacy Node.js 20 compatibility. This does not change any published package API or runtime behavior.
Validation completed:
pnpm run ci:local --only=build-and-testNo changeset is included because this PR only changes CI coverage, test fixtures, and documentation.
Related Issue
Follow-up to #4884.
No separate issue.
Types of changes
Checklist