fix(runtime-core): select highest compatible shared version - #4962
fix(runtime-core): select highest compatible shared version#4962dmchoi77 wants to merge 3 commits into
Conversation
🦋 Changeset detectedLatest commit: 4cf7e3a The changes in this PR will be included in the next version bump. This PR includes changesets to release 48 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 |
|
Thanks for the reproduction. However, it directly constructs the internal ShareScopeMap and assumes that the highest compatible version is the required outcome.
Without such a scenario, the current reproduction establishes an order-dependent implementation detail, but does not yet establish that changing the existing selection policy is safe or necessary. |
|
@2heal1 Thanks for the detailed feedback. I agree that the original reproduction only exercised the internal
I verified the public reproduction by running The public reproduction is intentionally pinned to The The proposed behavior is scoped to Could you confirm whether this matches the intended negotiation policy? If |
Description
Fix non-singleton shared-version fallback when the overall highest registered version does not satisfy
requiredVersion.The resolver now filters candidates by
requiredVersionbefore selecting the highest semver version. The tree-shaking fallback applies the same rule after filtering for eligible tree-shaking candidates, making the selected version independent of share registration order.Adds regression coverage for two registration orders with and without tree shaking, and includes a patch changeset for
@module-federation/runtime-core.Related Issue
Closes #4961
Types of changes
Checklist