semver
parser
ParseVersion / comparison, libpkgx semantics
semver.ParseVersion("1.1.1w") โ openssl-style and the rest of what pkgx accepts, with the same ordering.
LICENSE=BSD-3-ClauseCGO_ENABLED=0The version scheme real packages actually use โ a faithful Go port of pkgx's, for the versions strict semver rejects.
$ go get github.com/go-versions/semver@latest
The real world ships many โalmost validโ versions โ 1.1.1w and its kin โ that node-semver and the Go semver libraries simply refuse. A package manager cannot refuse them back, so it needs a scheme that accepts what upstreams actually publish.
This is that scheme, ported faithfully rather than approximated, and it is the parsing and comparison implementation behind the go-pkgx family.
semver
parserParseVersion / comparison, libpkgx semantics
semver.ParseVersion("1.1.1w") โ openssl-style and the rest of what pkgx accepts, with the same ordering.
Faithful means tested against the reference behaviour, not merely inspired by it โ the point of a port is that it agrees with the original on the awkward inputs, which are the only ones that matter here.