NAME
vers-tool - Version Range tool
SYNOPSIS
vers-tool [OPTIONS]...STRING
vers-tool STRING --contains STRING
vers-tool [--help|--man|-v]
Options:
--help Brief help message
--man Full documentation
-v Print version
--contains=VERSION Check if a version is contained within a range
--format=FORMAT Output format
--json JSON output format (--format=json)
-h, --human-readable Human-readable format (--format=human-readable)
Examples:
Decode a "vers" string:
vers-tool "vers:cpan/1.00|>=2.00|<5.00" | jq
Check if a version is contained within a range:
vers-tool "vers:cpan/1.00|>=2.00|<5.00" --contains "2.20"
Humanize "vers":
vers-tool "vers:cpan/1.00|>=2.00|<5.00" --human-readable
cpan
- equal 1.00
- greater than or equal 2.00
- less than 5.00
DESCRIPTION
vers-tool Version Range tool
A version range specifier (aka. "vers") is a URI string using the vers URI-scheme with this syntax:
vers:<versioning-scheme>/<version-constraint>|<version-constraint>|...
vers is the URI-scheme and is an acronym for "VErsion Range Specifier".
The pipe "|" is used as a simple separator between version-constraint. Each version-constraint in this pipe-separated list contains a comparator and a version:
<comparator:version>
This list of version-constraint are signposts in the version timeline of a package that specify version intervals.
A version satisfies a version range specifier if it is contained within any of the intervals defined by these version-constraint.
https://github.com/package-url/vers-spec
EXAMPLES
Decode a "vers" string:
vers-tool "vers:cpan/1.00|>=2.00|<5.00" | jq
Check if a version is contained within a range:
vers-tool "vers:cpan/1.00|>=2.00|<5.00" --contains "2.20"
Humanize "vers":
vers-tool "vers:cpan/1.00|>=2.00|<5.00" --human-readable
cpan
- equal 1.00
- greater than or equal 2.00
- less than 5.00
AUTHOR
COPYRIGHT AND LICENSE
Copyright © 2022-2025 Giuseppe Di Terlizzi
You may use and distribute this module according to the same terms that Perl is distributed under.