Repository navigation
test(repack): skip official MF plugin tests on Node < 20.18 - #1498
Merged
Merged
Conversation
@module-federation/enhanced 2.x loads undici 7, which needs Node >= 20.18.1 (global File), so DevelopmentPlugin.test.ts failed to load on Node 18 after the devDependency moved to 2.9.2. Load the official plugin lazily and skip only the two tests that need it on older Node; the Re.Pack plugin test still runs everywhere. Also drop packages/repack from the overrides comment, which no longer pins an older MF version.
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Since #1484, the Node 18 job in Test Main Matrix fails (run):
#1484 moved the
@module-federation/enhanceddevDependency from 0.8.9 to 2.9.2. In 2.9.2,@module-federation/dts-pluginloadsundici@7as soon as it is required. undici 7 needs Node >= 20.18.1 and the globalFile.DevelopmentPlugin.test.tsimported@module-federation/enhanced/rspackat the top level, so the whole suite failed to load on Node 18. Even a plainrequire('@module-federation/enhanced/rspack')fails on Node 18, which makes this a limit of MF 2.x itself. Re.Pack's runtime is unaffected, and the peer range stays>=0.6.10.Changes:
jest.requireActualinside the two tests that use it. Those two tests are skipped on Node < 20.18. They still build a real@module-federation/enhancedplugin on every Node version MF 2.x supports, and the logic they test doesn't depend on the Node version.ModuleFederationPluginV2test now runs on Node 18 as well. Before, it was lost with the rest of the suite.packages/repackis removed from thepnpm-workspace.yamloverrides comment, because it no longer pins an older MF version.Test plan
DevelopmentPlugin.test.tshas 1 passed and 2 skipped. The full@callstack/repacksuite has 39/39 suites passing (353 tests passed, 2 skipped).DevelopmentPlugintests pass.pnpm typecheckandbiome checkare clean, andpnpm install --frozen-lockfilereports no lockfile change.