packages feed

hpack 0.29.3 → 0.29.4

raw patch · 5 files changed

+20/−9 lines, 5 filesdep ~infer-licensePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: infer-license

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,3 +1,7 @@+## Changes in 0.29.4+  - Desugar ^>= when dependency is a string (see #309)+  - Add support for Apache, MPL and ISC when inferring `license` (see #305)+ ## Changes in 0.29.3   - Desugar `^>=` for compatibility with `Cabal < 2` (see #213)   - Add support for GPL, LGPL and AGPL when inferring `license` (see #305)
hpack.cabal view
@@ -1,13 +1,13 @@ cabal-version: >= 1.10 --- This file has been generated from package.yaml by hpack version 0.29.2.+-- This file has been generated from package.yaml by hpack version 0.29.3. -- -- see: https://github.com/sol/hpack ----- hash: 4ff78568d9482ecc3542cb90e91e1939d6f65d510f414956757b0593cf11c15b+-- hash: b74ce72f59395f87ee42933fe1146d9349b94fbb3be741ef85998ea2d37af660  name:           hpack-version:        0.29.3+version:        0.29.4 synopsis:       An alternative format for Haskell packages description:    See README at <https://github.com/sol/hpack#readme> category:       Development@@ -43,7 +43,7 @@     , http-client     , http-client-tls     , http-types-    , infer-license >=0.1.0 && <0.2+    , infer-license >=0.2.0 && <0.3     , pretty     , scientific     , text@@ -97,7 +97,7 @@     , http-client     , http-client-tls     , http-types-    , infer-license >=0.1.0 && <0.2+    , infer-license >=0.2.0 && <0.3     , pretty     , scientific     , text@@ -135,7 +135,7 @@     , http-client     , http-client-tls     , http-types-    , infer-license >=0.1.0 && <0.2+    , infer-license >=0.2.0 && <0.3     , interpolate     , mockery >=0.3     , pretty
src/Hpack/License.hs view
@@ -34,9 +34,12 @@   where     toLicense = \ case       Infer.MIT -> Cabal.MIT+      Infer.ISC -> Cabal.ISC       Infer.BSD2 -> Cabal.BSD2       Infer.BSD3 -> Cabal.BSD3       Infer.BSD4 -> Cabal.BSD4+      Infer.Apache_2_0 -> Cabal.Apache (Just $ mkVersion [2,0])+      Infer.MPL_2_0 -> Cabal.MPL (mkVersion [2,0])       Infer.GPLv2 -> Cabal.GPL (Just $ mkVersion [2])       Infer.GPLv3 -> Cabal.GPL (Just $ mkVersion [3])       Infer.LGPLv2_1 -> Cabal.LGPL (Just $ mkVersion [2,1])
src/Hpack/Syntax/Dependency.hs view
@@ -154,7 +154,7 @@ dependencyVersionFromCabal :: D.VersionRange -> DependencyVersion dependencyVersionFromCabal versionRange   | D.isAnyVersion versionRange = AnyVersion-  | otherwise = VersionRange . renderStyle style . D.disp $ versionRange+  | otherwise = VersionRange . renderStyle style . D.disp $ toPreCabal2VersionRange versionRange   where     style = Style OneLineMode 0 0 @@ -165,13 +165,12 @@ parseVersionRange = liftM dependencyVersionFromCabal . parseCabalVersionRange  parseCabalVersionRange :: Monad m => String -> m D.VersionRange-parseCabalVersionRange = fmap toPreCabal2VersionRange . cabalParse "constraint"+parseCabalVersionRange = cabalParse "constraint"  cabalParse :: (Monad m, D.Text a) => String -> String -> m a cabalParse subject s = case [d | (d, "") <- D.readP_to_S D.parse s] of   [d] -> return d   _ -> fail $ unwords ["invalid",  subject, show s]-  toPreCabal2VersionRange :: D.VersionRange -> D.VersionRange toPreCabal2VersionRange = D.embedVersionRange . D.cataVersionRange f
test/Hpack/Syntax/DependencySpec.hs view
@@ -46,6 +46,11 @@             - hpack >= 2 && < 3           |] `shouldDecodeTo_` Dependencies [("hpack", VersionRange ">=2 && <3")] +        it "accepts ^>=" $ do+          [yaml|+            - hpack ^>= 1.2.3.4+          |] `shouldDecodeTo_` Dependencies [("hpack", VersionRange ">=1.2.3.4 && <1.3")]+         it "accepts git dependencies" $ do           let source = GitRef "https://github.com/sol/hpack" "master" Nothing           [yaml|