def semver
import ezx@1.11.0.0/src/pub/plan.bend as Planimport Base
import ezx@1.11.0.0/src/pkg/pkg.bend as K
175# whether a version is MAJOR.MINOR.PATCH: digits and dots only, and three
176# numbers, none with a leading zero (`K.ver.num`, the rule bend's NAMED
177# holds each of its four numbers to)
178def semver(+text: String) -> Bool:
179 +ps = String.split(text, '.')
180 Bool.and(semver.chars(text),
181 Bool.and(Nat.is_eq(List.length(&2, String, ps), 3n), K.ver.nums(ps)))