Crate version_spec Copy item path Source CalVer Container for a calendar version. SemVer Container for a semantic version. UnresolvedParser ParseKind ParsePart SpecError UnresolvedVersionSpec Represents an unresolved version or alias that must be resolved
to a fully-qualified version. VersionSpec Represents a resolved version or alias. clean_version_req_string Cleans a version requirement string by removing * version parts,
and correcting AND operators. clean_version_string Cleans a potential version string by removing a leading v
or V
. get_calver_regex Get a regex pattern that matches calendar versions (calver).
For example: 2024-02-26, 2024-12, 2024-01-alpha, etc. get_semver_regex Get a regex pattern that matches semantic versions (semver).
For example: 1.2.3, 6.5.4, 7.8.9-alpha, etc. is_alias_name Returns true if the provided value is an alias. An alias is a word that
maps to version, for example, “latest” -> “1.2.3”. is_calver Returns true if the provided value is a calendar version string. is_semver Returns true if the provided value is a semantic version string. parse Parse the provided string and determine the output format.
Since an unresolved version can be many things, such as an
alias, version requirement, semver, or calver, we need to
parse this manually to determine the correct output. parse_multi Parse the provided string as a list of version requirements,
as separated by ||
. Each requirement will be parsed
individually with parse
.