packages feed

versions 6.0.4 → 6.0.5

raw patch · 4 files changed

+14/−3 lines, 4 files

Files

CHANGELOG.md view
@@ -1,5 +1,11 @@ # Changelog +## 6.0.5 (2024-01-24)++#### Fixed++- Certain illegal versions were parsing as PVP.+ ## 6.0.4 (2023-12-29)  #### Changed@@ -11,7 +17,7 @@ #### Added  - `Data` instances for the various data types.-- Simple conversion types between the main version types.+- Simple conversion functions between the main version types. - Compile-time constructors via Template Haskell, like `versioningQ`.  ## 6.0.2 (2023-10-12)
Data/Versions.hs view
@@ -904,7 +904,7 @@  -- | Internal megaparsec parser of `pvp`. pvp' :: Parsec Void Text PVP-pvp' = L.lexeme space (PVP . NEL.fromList <$> L.decimal `sepBy` char '.')+pvp' = L.lexeme space (PVP <$> L.decimal `PC.sepBy1` char '.')  -- | Parse a (General) `Version`, as defined above. version :: Text -> Either ParsingError Version
test/Test.hs view
@@ -31,6 +31,9 @@ badVers :: [T.Text] badVers = ["", "1.2 "] +badPVP :: [T.Text]+badPVP = ["", "clc237", "abc"]+ messes :: [T.Text] messes = [ "10.2+0.93+1-1", "003.03-3", "002.000-7", "20.26.1_0-2", "1.6.0a+2014+m872b87e73dfb-1"          , "1.3.00.16851-1", "5.2.458699.0906-1", "12.0.0-3ubuntu1~20.04.5" ]@@ -96,6 +99,8 @@     , testGroup "(Haskell) PVP"       [ testGroup "Good PVPs" $         map (\s -> testCase (T.unpack s) $ isomorphPVP s) cabalOrd+      , testGroup "Bad PVP" $+        map (\s -> testCase (T.unpack s) $ assertBool "A bad PVP parsed" $ isLeft $ pvp s) badPVP       , testGroup "Comparisons" $         zipWith (\a b -> testCase (T.unpack $ a <> " < " <> b) $ comp pvp a b) cabalOrd (tail cabalOrd)       ]
versions.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.2 name:               versions-version:            6.0.4+version:            6.0.5 synopsis:           Types and parsers for software version numbers. description:   A library for parsing and comparing software version numbers. We like to give