-
Notifications
You must be signed in to change notification settings - Fork 499
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] the package isn't compatible with Rollup due to require cycle #381
Comments
Any news or working workaround ? |
Sounds like you need to file a bug on rollup then? |
Importing one by one fixed this for me: import maxSatisfying from "semver/ranges/max-satisfying";
import minSatisfying from "semver/ranges/min-satisfying";
import coerce from "semver/functions/coerce"; |
Facing the issue when trying to rollup a fastify server which depends on this package. If what @Idered mentioned is correct then I suppose the fix has to go to the packages that depends on semver, fastify in my case? Does anyone have more insight on what is going wrong? |
Ran into this issue today. Not a blocker for us but it would be nice to eliminate the cycle warning. Wondering if the solution proposed by @lukastaegert has been considered/attempted? (It doesn't appear that it has.) I suppose the main issue is creating a breaking change for third-party code that imports Range and Comparator. Unfortunately I'm not familiar enough with this library yet to know what that impact would likely be, and what the workarounds might be. |
A circular dependency between the Range and Comparator classes can cause issues for consumers who are trying to bundle extensions with vscode-languageclient as a dependency. See related GitHub issue from [npm/node-semver](https://github.com/npm/node-semver) - [[BUG] the package isn't compatible with Rollup due to require cycle microsoft#381](npm/node-semver#381)
A circular dependency between the Range and Comparator classes can cause issues for consumers who are trying to bundle extensions with vscode-languageclient as a dependency. See related GitHub issue from [npm/node-semver](https://github.com/npm/node-semver) - [[BUG] the package isn't compatible with Rollup due to require cycle #381](npm/node-semver#381)
thanks. |
What / Why
Rollup breaks this package when bundling it.
When
Since 2021-07-05 when
@rollup/plugin-commonjs
19.0.0 has been released.How
Current Behavior
semver.satisfies
always returnsfalse
after bundling with Rollup.Steps to Reproduce
input.js
. It works correctly.output.js
. Its output is incorrect.index.mjs
.Expected Behavior
Bundled and unbundled code should work the same way.
References
semver
package rollup/plugins#879semver
package rollup/plugins#879 (comment)The text was updated successfully, but these errors were encountered: