semver
semver copied to clipboard
[Feature Request] Support for Semver Ranges
Hey, could you add support for ranges to the library? These are not in the official standard, but are still widely used.
Example: ^1.2.3
means >= 1.2.3 && < 2.0.0
So maybe add a class semver::range
with:
- a constructor that takes a range string
- an
inRange()
method that takes a single semver object and checks if the passed semver fits into the range
Here's the node documentation for semver ranges. This github project also has test cases.
Hi, yes, it looks useful, I will add semver::range
You want ranges and advanced-range-syntax?
Yeah, both would be awesome 😎
@Gei0r You might be interested in my version with advanced ranges etc. See tons of examples in tests https://github.com/egorpugin/primitives/blob/master/src/version.cpp#L1839 Root dir https://github.com/egorpugin/primitives/tree/master/src/version
It works in my C++ build system/package manager and you need it to include into your project, again, if you're interested. https://software-network.org/