node-semver icon indicating copy to clipboard operation
node-semver copied to clipboard

[BUG] Numerical Versions After X-Ranges Are Ignored

Open WalkerCodeRanger opened this issue 3 years ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Current Behavior

A version range like 1.x.5 is valid and treated as equivalent to 1.x.x.

Expected Behavior

1.x.5 should either be invalid or match only versions like 1.0.5 and 1.10.5 but not versions like 1.0.0 or 1.2.3.

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 avatar Dec 26 '22 19:12 WalkerCodeRanger

I think it should just be invalid. a non-x specifier after an x specifier makes no sense at all.

ljharb avatar Dec 26 '22 20:12 ljharb