Closed Alexejhero closed 5 years ago
Hi, this is working as expected. 1.2 in a range specification is the same as 1.2.x so represents any patch version from 1.2.0 up to but excluding 1.3.0. 1.2.3 isn't greater than 1.2 because it is in the range of versions 1.2 represents. If you want a range that excludes 1.2.0 but includes 1.2.3 you need to specify the patch version explicitly, ie. >1.2.0
.
This is the same behaviour as node-semver.
Could this be circumvented in any way? I would have expected that setting loose
to true
would change this behaviour
No, loose just makes the version and range parsing more lenient but doesn't affect the range behaviour. Why do you want different behaviour? You could create versions and compare them rather than using the provided ranges of they don't work how you'd like.
Exactly what the title says.
Range.IsSatisfied(">1.2", "1.2.3")
returnsfalse
instead oftrue