You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TL;DR: I would expect expect(satisfy('8.0.11', "^7 || ^8")).toBe(true) to pass, but it fails.
I'm using module federation in rspack which apparently uses the semver utility from vite-plugin-federation. When my app was loading, I noticed this warning in the console:
[ Federation Runtime ]: Version 18.2.0 from mfeHost of shared singleton module react does not satisfy the requirement of mfeHost which needs ^17 || ^18)
The ^17 || ^18 came from one of the host's dependency's package.json which has react and react-dom listed as peer dependencies like this:
A React version of 18.2.0 matches ^17 || ^18 for npm resolution, but it appears that vite-plugin-federation's semver utility doesn't evaluate the || operator. Is this intentional? I understand that || isn't strictly a part of semver, but it is part of npm version resolution and therefore seems like a common situation that should be supported.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
TL;DR: I would expect
expect(satisfy('8.0.11', "^7 || ^8")).toBe(true)
to pass, but it fails.I'm using module federation in rspack which apparently uses the semver utility from vite-plugin-federation. When my app was loading, I noticed this warning in the console:
The
^17 || ^18
came from one of the host's dependency's package.json which has react and react-dom listed as peer dependencies like this:A React version of
18.2.0
matches^17 || ^18
for npm resolution, but it appears that vite-plugin-federation's semver utility doesn't evaluate the||
operator. Is this intentional? I understand that||
isn't strictly a part of semver, but it is part of npm version resolution and therefore seems like a common situation that should be supported.Thanks.
Beta Was this translation helpful? Give feedback.
All reactions