-
-
Notifications
You must be signed in to change notification settings - Fork 400
Closed
Description
Describe the bug
The semver implementation in runtime-core does not support versions with a double pipe ||, which means OR.
You can see this style documented here: https://docs.npmjs.com/cli/v11/configuring-npm/package-json#dependencies
range1 || range2Passes if either range1 or range2 are satisfied.
To reproduce, modify the unit test: https://github.com/module-federation/core/blob/main/packages/runtime-core/__tests__/semver.spec.ts
Ideally add a new test. But just to see the issue with minimal changes, change const tilde = '~1.2.3'; to const tilde = '1.2.3 || 1.2.4'; and observe the failing test.
Reproduction
I don't have a repo, but I describe a tiny unit test in the description
Used Package Manager
yarn
System Info
Sorry the output here isn't exact, I had to type this in manually.
System:
OS: macOS 15.2
CPU: (10) arm64 Apple M1 Pro
Memory: 664.69 MB / 32.00 GB
Shell 5.9 - /bin/zsh
Binaries:
Node: 20.19.
Yarn: 3.2.1
npm: 10.8.2
Watchman 2025.03.10.00
Browsers:
Chrome: 136.0.7103.144Validations
- Read the docs.
- Read the common issues list.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Module federation issue and not a framework-specific issue.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels