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

[BUG] Inconsistency between X-Ranges and Partial Version #509

Open
1 task done
WalkerCodeRanger opened this issue Dec 26, 2022 · 0 comments
Open
1 task done

[BUG] Inconsistency between X-Ranges and Partial Version #509

WalkerCodeRanger opened this issue Dec 26, 2022 · 0 comments
Labels
Bug thing that needs fixing Needs Triage needs an initial review

Comments

@WalkerCodeRanger
Copy link

WalkerCodeRanger commented Dec 26, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

A version range like >1.x.x+build is valid, but >1.x+build and >1+build are not. The same can be observed when using a prerelease version instead of build metadata.

Expected Behavior

While the behavior is consistent with the BNF grammar in the readme, it is inconsistent with the expectation built up by every other aspect of the package that X-ranges and partial versions are equivalent. I expect that build metadata and prerelease would either be allowed with all versions, even partial ones, or not allowed with X-ranges.

Personally, I think build metadata should always be allowed as it is stripped off and ignored. However, I think prerelease should not be allowed with any partial or X-ranges because it isn't clear what one should even take that to mean. What versions should be matched by 2.x.x-rc? (I am actually going to file a separate bug about that.)

Steps To Reproduce

As I am not a Node developer but rather a maintainer of a semver package for C# that needs to support npm style version ranges, I am using https://semver.npmjs.com/ to test. Simply put the listed versions into it.

@WalkerCodeRanger WalkerCodeRanger added Bug thing that needs fixing Needs Triage needs an initial review labels Dec 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Needs Triage needs an initial review
Projects
None yet
Development

No branches or pull requests

1 participant