Skip to content

ci(node): verify published packages on Node 20 - #4888

Merged
2heal1 merged 3 commits into
mainfrom
codex/node24-dev-node20-compat-ci
Jul 14, 2026
Merged

2heal1 merged 3 commits into
mainfrom
codex/node24-dev-node20-compat-ci

Conversation

@2heal1

@2heal1 2heal1 commented Jul 12, 2026 •

Copy link
Copy Markdown
Member

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-test
  • Package preparation on Node.js 24 followed by the clean-consumer check on Node.js 20.19.5
  • All GitHub Actions checks for the latest commit

No 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

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated the documentation.

@changeset-bot

changeset-bot Bot commented Jul 12, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: af6f138

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 Jul 12, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@module-federation/devtools

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

@module-federation/cli

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

create-module-federation

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

@module-federation/dts-plugin

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

@module-federation/enhanced

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

@module-federation/error-codes

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

@module-federation/esbuild

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

@module-federation/managers

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

@module-federation/manifest

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

@module-federation/metro

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

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

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

@module-federation/metro-plugin-rnef

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

@module-federation/metro-plugin-rock

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

@module-federation/modern-js

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

@module-federation/modern-js-v3

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

@module-federation/native-federation-tests

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

@module-federation/native-federation-typescript

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

@module-federation/nextjs-mf

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

@module-federation/node

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

@module-federation/observability-plugin

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

@module-federation/playground

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

@module-federation/retry-plugin

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

@module-federation/rsbuild-plugin

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

@module-federation/rspack

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

@module-federation/rspress-plugin

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

@module-federation/runtime

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

@module-federation/runtime-core

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

@module-federation/runtime-tools

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

@module-federation/sdk

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

@module-federation/storybook-addon

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

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

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

@module-federation/treeshake-frontend

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

@module-federation/treeshake-server

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

@module-federation/typescript

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

@module-federation/utilities

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

@module-federation/webpack-bundler-runtime

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

@module-federation/bridge-react

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

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

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

@module-federation/bridge-shared

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

@module-federation/bridge-vue3

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

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

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

commit: af6f138

@github-actions

github-actions Bot commented Jul 12, 2026 •

Copy link
Copy Markdown
Contributor

Bundle Size Report

6 package(s) changed, 36 unchanged.

Bundle targets

Package Web bundle (gzip) Delta Node bundle (gzip) Delta
@module-federation/cli 2.3 kB -1 B (-0.0%) 2.4 kB -31 B (-1.3%)
@module-federation/core 1.0 kB +1 B (+0.1%) 1.0 kB -33 B (-3.0%)
@module-federation/devtools 30.3 kB -1 B (-0.0%) 30.3 kB -23 B (-0.1%)
@module-federation/enhanced 2.7 kB -1 B (-0.0%) 2.8 kB -43 B (-1.5%)
@module-federation/metro-plugin-rnc-cli 416 B +3 B (+0.7%) 435 B -26 B (-5.6%)
@module-federation/node 9.2 kB +2 B (+0.0%) 9.2 kB -29 B (-0.3%)

Consumer scenarios

Scenario Web output (gzip) Delta Node output (gzip) Delta Gap (node-web) Delta
Enhanced remoteEntry 21.4 kB -18 B (-0.1%) 23.0 kB -19 B (-0.1%) +1.6 kB -1 B

Total dist (raw): 36.22 MB (no change)
Total ESM gzip: 122.9 kB (no change)
Total web bundle (gzip): 252.9 kB (+3 B (+0.0%))
Total node bundle (gzip): 255.6 kB (-185 B (-0.1%))
Tracked ./bundler entry gzip: 556 B (no change)
Tracked ./bundler web bundle (gzip): 4.7 kB (no change)
Tracked ./bundler node bundle (gzip): 4.7 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +19 to +22
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')))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@2heal1 2heal1 changed the title chore: ci: verify packages on Node 20 ci(node): verify published packages on Node 20 Jul 13, 2026
@2heal1
2heal1 merged commit 9331dd8 into main Jul 14, 2026
24 checks passed
@2heal1
2heal1 deleted the codex/node24-dev-node20-compat-ci branch July 14, 2026 06:26
@2heal1 2heal1 mentioned this pull request Jul 15, 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.

2 participants