Version
Represents a version in a format consisting of the following three components:
Dot-separated version number of infinite length (ex.
1.0.0.0.0.1
,1.0.0
,1
, etc.). Individual components must be non-negative integers and cannot contain leading zeros, except for0
itself.Optional pre-release stage (any of
snapshot
,alpha
,beta
,rc
(ignoring capitalization)), separated by a dash from the main version number and followed by an optional pre-release version number as in (1). (ex.1.0.0-alpha
,1.0.0-beta.1.2.3
)Optional metadata, separated by a plus sign from the main version number. Metadata consists of one or multiple dot-separated identifiers, which themselves are non-empty alphanumeric strings. (ex.
1.0.0+build.123
,1.0.0+build.123+build.456
)
When comparing version numbers, the dot-separated components of version numbers are compared individually, such that 1.11 > 1.2
and no pre-release stage > rc > beta > alpha > snapshot
. Metadata is ignored when comparing versions.
This class loosely follows the SemVer specification, but allows variable-length version numbers and restricts the pre-release stages to snapshot
, alpha
, beta
and rc
.
Constructors
Properties
Functions
Creates a new ClosedVersionRange from this version to the given other version.
Creates a new OpenEndVersionRange from this version to the given other version.