Open Gei0r opened 4 years ago
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/
When comparing X-Ranges, the code currently hangs.
semver::version l_v("1.0.0");
std::string_view r_v("2.x");
semver::range::satisfies(l_v, r_v);
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:inRange()
method that takes a single semver object and checks if the passed semver fits into the rangeHere's the node documentation for semver ranges. This github project also has test cases.