Changelog for versions-6.0.8
Changelog
6.0.8 (2025-02-03)
Changed
- Bumped upper bound on
base(support for GHC 9.12).
6.0.7 (2024-06-03)
Changed
- Bumped upper bound on
base.
6.0.6 (2024-03-08)
Fixed
- Account for large numbers when parsing on 32-bit (or smaller) systems.
6.0.5 (2024-01-24)
Fixed
- Certain illegal versions were parsing as PVP.
6.0.4 (2023-12-29)
Changed
- Bump dependencies to support GHC 9.8.
6.0.3 (2023-10-23)
Added
Datainstances for the various data types.- Simple conversion functions between the main version types.
- Compile-time constructors via Template Haskell, like
versioningQ.
6.0.2 (2023-10-12)
Added
Liftinstances 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 (2023-05-08)
Fixed
- Restored the ability to compile with GHC versions earlier than 9.
6.0.0 (2023-04-29)
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
SemVerandVersionnow contain a better-behavingReleasetype for their prerelease info. - Similarly,
Versionnow also has a better-behavingChunkstype for its main version number sections. - The
releasetraversal 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
Semigroupinstances. Adding version numbers together is a nonsensical operation and should never have been added in the first place. - The
VChunkandVUnittypes and their associated functions.
Fixed
- Leading zeroes are handled a little better in
SemVerpre-release data.
5.0.5 (2023-03-23)
Changed
- Bumped
basebound to support GHC 9.6.
5.0.4 (2022-10-18)
Changed
- Bumped
basebound to support GHC 9.4.
5.0.3 (2022-02-25)
Fixed
- A bug in
prettyVerthat flipped the order of thepreRelandmetafields.
5.0.2 (2022-01-21)
Added
text-2.0support.
5.0.1 (2021-12-08)
Changed
- Support for GHC 9.2.
Fixed
- Remove redundant pattern match.
5.0.0 (2021-04-14)
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
_svMetafield ofSemVeris now parsed as a dumberMaybe Textinstead of[VChunk], due to metadata now being allowed to possess leading zeroes. - Breaking: Like the above, the
_vMetafield ofVersionis nowMaybe Text. - Breaking: The
_vReland_vMetafields ofVersionhave had their order flipped. Further, the prelease and meta sections are now expected in the same order asSemVerwhen parsing (prerel first, meta second).Versionis thus now a quite similar toSemVer, except allowing letters in more permissive positions. - Breaking: The
metatraversal has been altered to accomodate the metadata field changes.
Fixed
- Parsing certain legal SemVers specified in the spec.
4.0.3 (2021-02-23)
Changed
- Support for GHC 9.
4.0.2 (2021-01-23)
Fixed
- A bug in zero parsing within SemVer prereleases. #42
4.0.1 (2020-10-22)
Fixed
- An infinite loop in
Versioncomparison. aura#652
4.0.0 (2020-10-20)
Changed
- Breaking:
VChunknow cannot be empty. - Breaking: A
Versionnow guaranteesNonEmptychunks. - Breaking: A
Messnow guaranteesNonEmptychunks, and its structure has been significantly changed. Particularly,Messvalues are now aware of theIntvalues they hold (when they do), as well as "revision" values of the patternrXYZ. - Comparison of
Versionvalues is more memory efficient.
Added
Versionnow has an extra field,_vMeta :: [VChunk]for capturing "metadata" like Semver. This prevents otherwise nice-looking versions from being demoted toMess.- The
MChunktype to accomodate the changes toMessmentioned above.
Removed
- Breaking:
Versionno longer has aMonoidinstance.
Fixed
""no longer parses in any way. #32- Version strings with trailing whitespace no longer parse via
versioning. #33 - Particular edge cases involving
Messcomparisons. aura#646 - A particular edge case involving prereleases in
Versioncomparisons. aura#586
3.5.4 (2020-05-12)
Added
- The functions
isIdeal,isGeneral, andisComplexforBool-based inspection of parse results. messMajor,messMinor,messPatch, andmessPatchChunkfor improved introspection intoMessvalues.
Changed
- Improved
Messcomparison logic.
3.5.3
- GHC 8.10 support.
3.5.2
- Added a new
PVPtype and parsers.
3.5.1.1
- GHC 8.8 compatibility.
3.5.0
- Updated to
megaparsec-7. OurParsingErrortype alias has changed to match Megaparsec's new error model, anderrorBundlePrettyis now exposed instead of the oldparseErrorPretty.
3.4.0.1
- Enhanced the whitespace handling in
semver',version', andmess'.
3.4.0
- Removed
ParseVand surrounding machinery. Useversioningnow instead of theparseVfunction.
3.3.2
- GHC 8.4.1 compatibility.
3.3.0
- New
Semantictypeclass that provides Traversals for SemVer-like data out of all the version types.Textwas also given an instance, so its much easier to manipulate directly:
λ "1.2.3" & minor %~ (+ 1)
"1.3.3"
Some Lenses and Traversals had their names changed or were removed entirely to accomodate this new typeclass.
SemVerandVersionshould never contain negative values, so their numeric components were changed fromInttoWord.
3.2.0
- Updated for
megaparsec-6and GHC 8.2.
3.1.1
- Added instances for common typeclasses:
Generic,NFData, andHashable. This is to avoid having users define these instances themselves as orphans. If there are more instances you want added, please let me know.Datawas left out on purpose.
3.1.0
- Added support for epoch numbers in the
Versiontype. These are numbers like the1:in1:2.3.4. These are used in Arch Linux in rare cases where packages change their versioning scheme, but need a reliable integer prefix to establish ordering. TheVersiontype has been given a new field,_vEpoch :: Maybe Int, and a corresponding lens,vEpoch.
3.0.2
- Expose internal parsers so that they could be used in other parser programs that parse version numbers in larger files.
3.0.0
- Updated for
megaparsec-5andghc-8
2.0.0
- Switched to
megaparsecto perform all parsing asText - Support for legacy
Stringremoved - Added more Traversals and INLINE'd all Lenses/Traversals
1.1.0
- Added Lenses and Traversals (no
lensdependency)