Repository navigation
ext: upstream semver library from Kubernetes - #1632
Open
itzPranshul wants to merge 1 commit into
Open
itzPranshul wants to merge 1 commit into
itzPranshul wants to merge 1 commit into
Conversation
Collaborator
|
@itzPranshul thanks for the contribution. Could you perhaps place this extension under a new sub-module |
Upstream the semantic versioning library from Kubernetes into cel-go under the ext package, following the precedent set by the network (IP/CIDR) library.
itzPranshul
force-pushed
the
upstream-semver-lib
branch
from
November 13, 2026 03:20
495415a to
52163bf
Compare
Author
|
@TristonianJones Makes total sense, i've moved the semVer extension into its own sub-module under ext/semver, keeps the core dependencies and the root vendor tree completely clean. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1510
This PR upstreams the CEL semantic versioning library from Kubernetes into cel-go as a standalone sub-module under ext/semver, keeping core cel-go dependencies unchanged.
Changes
ext/semver/semver.go: AddsLibrary(Version(v))(withSemverLib/SemverVersionaliases) providing:semver(...)andisSemver(...)with optional normalization (v1+)..major(),.minor(),.patch()..compareTo(),.isGreaterThan(),.isLessThan(),==.string(semver(...)).cel.validator.semver).ResultSizeof 1).semver.Version,*semver.Version, and[]semver.Version.ext/semver/semver_test.go: Added unit tests, compile/runtime error tests, type conversion/adapter tests, andTestK8sCostParityto enforce 1:1 cost parity against Kubernetes test cases across model versions.ext/semver/go.mod,ext/semver/go.sum,ext/semver/BUILD.bazel,ext/semver/README.md, and registeredgithub.com/blang/semver/v4inMODULE.bazel.Testing
cd ext/semver && go test -count=1 ./..../scripts/verify-vendor.sh && go test -count=1 ./ext/... ./cel/...