Skip to content
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

There is a flaw in the VERSION-RANGE-SPEC #358

Open
pstray opened this issue Dec 4, 2024 · 0 comments
Open

There is a flaw in the VERSION-RANGE-SPEC #358

pstray opened this issue Dec 4, 2024 · 0 comments

Comments

@pstray
Copy link

pstray commented Dec 4, 2024

There is a logical flaw in VERSION-RANGE-SPEC, as there is only an OR-operator for ranges. At least for npms semvers there should be an AND operator.

One of the examples:
vers:npm/1.2.3|>=2.0.0|<5.0.0

This would essentially parse to every version, as everything mathes less than 5.0.0 or greater or equal to 2.0.0

Following the npm semver spec (https://github.com/npm/node-semver#ranges) this would have been written as:

1.2.3 || >=2.0.0 <5.0.0

Parsing to either 1.2.3 or (greater or equal to 2.0.0 AND less than 5.0.0)

That AND operator seem to have gotten lost on the way...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant