Releases: fosskers/versions
Releases · fosskers/versions
6.0.6
6.0.5
6.0.4
6.0.2.
Added
Lift
instances for the various types, which allows parsing version numbers
at compile time within Template Haskell quotes. Currently there is no exported
function that supports this directly, but you could write one like:
-- | Parse a `Versioning` at compile time.
thVer :: Text -> Q Exp
thVer nm =
case versioning nm of
Left err -> fail (errorBundlePretty err)
Right v -> lift v
Changed
- Due to the new dependency on
template-haskell
, GHC 8.8 is now the lowest
supported compiler version.
6.0.1
6.0.0
A number of type changes have been made to improve parsing and comparison logic.
Doing so fixed several bugs and made the code cleaner overall.
If you're just doing basic parsing and comparisons and not actually inspecting
the types themselves, you shouldn't notice a difference.
Added
- New types
Release
,Chunks
, andChunk
.
Changed
- Both
SemVer
andVersion
now contain a better-behavingRelease
type for their prerelease info. - Similarly,
Version
now also has a better-behavingChunks
type for its main
version number sections. - The
release
traversal now yields aMaybe Release
. - Versions with
~
in their metadata will now parse as aMess
. Example:12.0.0-3ubuntu1~20.04.5
Removed
- The various
Semigroup
instances. Adding version numbers together is a
nonsensical operation and should never have been added in the first place. - The
VChunk
andVUnit
types and their associated functions.
Fixed
- Leading zeroes are handled a little better in
SemVer
pre-release data.
5.0.5
5.0.0
This release brings versions
in line with version 2.0.0
of the SemVer spec. The main addition to the spec is the allowance of hyphens in both the prerelease and metadata sections. As such, certain versions like 1.2.3+1-1
which previously would not parse as SemVer now do.
To accomodate this and other small spec updates, the SemVer
and Version
types have received breaking changes here.
Changed
- Breaking: The
_svMeta
field ofSemVer
is now parsed as a dumberMaybe Text
instead of[VChunk]
, due to metadata now being allowed to possess leading zeroes. - Breaking: Like the above, the
_vMeta
field ofVersion
is nowMaybe Text
. - Breaking: The
_vRel
and_vMeta
fields ofVersion
have had their order flipped. Further, the prelease and meta sections are now expected in the same order asSemVer
when parsing (prerel first, meta second).Version
is thus now a quite similar toSemVer
, except allowing letters in more permissive positions. - Breaking: The
meta
traversal has been altered to accomodate the metadata field changes.
Fixed
- Parsing certain legal SemVers specified in the spec.