packages feed

aeson-match-qq 1.1.0 → 1.2.0

raw patch · 4 files changed

+32/−4 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.markdown view
@@ -1,3 +1,8 @@+1.2.0+=====++  * Fixed a couple of parsing edge cases (https://github.com/supki/aeson-match-qq/pull/11)+ 1.1.0 ===== 
aeson-match-qq.cabal view
@@ -4,13 +4,15 @@ -- -- see: https://github.com/sol/hpack ----- hash: b37b8f340b6ce5d17c4938172bdd5e7805347f8290f68163f3215e5b7cfd8a14+-- hash: 4c785585b04d7380e3612f9a3011a3bbcccf7b0d155941ab58f79e69afb6a1ba  name:           aeson-match-qq-version:        1.1.0+version:        1.2.0 synopsis:       Declarative JSON matchers. description:    See README.markdown category:       Web+homepage:       https://github.com/supki/aeson-match-qq#readme+bug-reports:    https://github.com/supki/aeson-match-qq/issues maintainer:     matvey.aksenov@gmail.com copyright:      Matvey Aksenov 2020 license:        BSD2@@ -19,6 +21,10 @@ extra-source-files:     README.markdown     CHANGELOG.markdown++source-repository head+  type: git+  location: https://github.com/supki/aeson-match-qq  library   exposed-modules:
src/Aeson/Match/QQ/Internal/Parse.hs view
@@ -95,7 +95,8 @@   spaces   b <- Atto.peekWord8'   case b of-    CloseSquareBracketP ->+    CloseSquareBracketP -> do+      _ <- Atto.word8 CloseSquareBracketP       pure (Array Box {knownValues = Vector.empty, extendable = False})     _ -> do       loop [] 0@@ -133,7 +134,8 @@   spaces   b <- Atto.peekWord8'   case b of-    CloseCurlyBracketP ->+    CloseCurlyBracketP -> do+      _ <- Atto.word8 CloseCurlyBracketP       pure (Object Box {knownValues = HashMap.empty, extendable = False})     _ ->       loop []
test/Aeson/Match/QQSpec.hs view
@@ -103,6 +103,21 @@       match [qq| [_] |] [aesonQQ| [] |] `shouldBe`         missingPathElem [] (Idx 0) +    -- https://github.com/supki/aeson-match-qq/issues/10+    it "#10" $ do+      [qq| {foo: []} |] `shouldBe`+        Object+          (Box+            { knownValues = [("foo", Array (Box {knownValues = [], extendable = False}))]+            , extendable = False+            })+      [qq| [{}] |] `shouldBe`+        Array+          (Box+            { knownValues = [Object (Box {knownValues = [], extendable = False})]+            , extendable = False+            })+ newtype ToEncoding a = ToEncoding { unToEncoding :: a }     deriving (Show, Eq, Num)