larzsemver
Semantic Versioning 2.0.
Parse, compare and match semantic versions against ranges (^, ~, x-ranges, ||) — verified against the semver.org precedence chain, for dependency and release tooling.
larzscript pkg install semver
What you get
- SemVer 2.0 parse & compare
- satisfies() with ^ ~ x ||
- max_satisfying()
- Spec-verified
Try it
import "semver" as semver
print(semver.compare("1.2.0", "1.10.0"))
print(semver.gt("2.0.0", "1.9.9"))
print(semver.satisfies("1.5.0", ">=1.0.0"))
print(semver.satisfies("1.5.0", "1.x"))
print(semver.max_satisfying(["1.0.0", "1.5.0", "2.0.0"], "^1.0.0"))Output
-1 true true true 1.5.0
Why it's in the Larz Stack
larzsemver is a real Larzscript package (larzscript pkg install semver) - money-native, zero dependencies, the same language as the rest of the estate, not a separate Python runtime. It composes with the rest of the Larz Stack and the Larz framework.