Skip to content

Releases: fosskers/versions

6.0.6

08 Mar 06:01
Compare
Choose a tag to compare

Fixed

  • Account for large numbers when parsing on 32-bit (or smaller) systems.

6.0.5

24 Jan 00:58
Compare
Choose a tag to compare

Fixed

  • Certain illegal versions were parsing as PVP.

6.0.4

30 Dec 00:48
Compare
Choose a tag to compare

Changed

  • Bump dependencies to support GHC 9.8.

6.0.2.

12 Oct 09:01
Compare
Choose a tag to compare

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

08 May 03:08
Compare
Choose a tag to compare

Fixed

  • Restored the ability to compile with GHC versions earlier than 9.

6.0.0

29 Apr 06:17
Compare
Choose a tag to compare

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, and Chunk.

Changed

  • Both SemVer and Version now contain a better-behaving Release type for their prerelease info.
  • Similarly, Version now also has a better-behaving Chunks type for its main
    version number sections.
  • The release traversal now yields a Maybe Release.
  • Versions with ~ in their metadata will now parse as a Mess. 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 and VUnit types and their associated functions.

Fixed

  • Leading zeroes are handled a little better in SemVer pre-release data.

5.0.5

23 Mar 00:36
f178ab7
Compare
Choose a tag to compare

Support for GHC 9.6.

5.0.0

15 Apr 03:30
249bd29
Compare
Choose a tag to compare

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 of SemVer is now parsed as a dumber Maybe Text instead of [VChunk], due to metadata now being allowed to possess leading zeroes.
  • Breaking: Like the above, the _vMeta field of Version is now Maybe Text.
  • Breaking: The _vRel and _vMeta fields of Version have had their order flipped. Further, the prelease and meta sections are now expected in the same order as SemVer when parsing (prerel first, meta second). Version is thus now a quite similar to SemVer, 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.

4.0.3

23 Feb 18:58
f1156f8
Compare
Choose a tag to compare

Changed

  • Support for GHC 9.

4.0.2

24 Jan 07:09
98594f2
Compare
Choose a tag to compare

Fixed

  • A bug in zero parsing within SemVer prereleases. #42