0.1.0-codewithcheese-add-semver-7ecdad123af56e83a8b50381fbfd6f65398ec146 • Published 3 years ago

cue-semver v0.1.0-codewithcheese-add-semver-7ecdad123af56e83a8b50381fbfd6f65398ec146

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 years ago

cue-semver

CUE based implementation of SemVer, version ranges and comparison.

Implementation based upon semantic versioner for npm.

Usage

Test if version string satisfies a range

Use #SemVer to evaluate a version string into semantic version components. Unify it with #SemVerSatisfies and provide a range string. The unification will error if the version does not fall within the range.

foo: {
    version: "1.0.0"
}

foo: this={
    semVer: #SemVer&{#version: this.version} & #SemVerSatisfies&{#range: ">=1.0.0"}
}

Notes

  • node-semver loose option not supported.

TODO