SemanticVersionRange
A module for working with ranges of semantic versions, like 1.0.0 <= v < 2.0.0
.
A range of SemanticVersion
values between a lower value (inclusive) and an upper
value (exclusive).
An example range. More specifically, the range 1.0.0 <= v < 2.0.0
.
Construction
Construct a SemanticVersionRange between the two provided
SemanticVersion
s. This function will return Nothing
if the first value is less than
or equal to the second.
Construct a SemanticVersionRange where the provided
SemanticVersion
is the only contained value.
Using the function with the version 1.5.0
will return the range 1.5.0 <= v < 1.5.1
.
Construct a SemanticVersionRange that is compatible with the
provided SemanticVersion
, and other semantically compatible versions.
Using this function with the version 1.2.3
will return the range 1.2.0 <= v < 2.0.0
.
Convert a String
formatted like 1.0.0 <= v < 2.0.0
to a SemanticVerisonRange.
JSON Decoder for a SemanticVersionRange.
Query
Returns the lowest SemanticVersion
of a SemanticVersionRange.
Returns the lowest SemanticVersion
which is higher than all other versions of the
SemanticVersionRange.
Construct a SemanticVersionRange that forms the intersection of the two provided values.
Conversion
Create a String
representation of a SemanticVersionRange.
Encode a SemanticVersionRange as JSON.