hspec-expectations-json 1.0.0.5 → 1.0.0.6
raw patch · 3 files changed
+31/−11 lines, 3 filesdep +unordered-containersdep ~Diffdep ~HUnitdep ~aesonPVP ok
version bump matches the API change (PVP)
Dependencies added: unordered-containers
Dependency ranges changed: Diff, HUnit, aeson, aeson-pretty, aeson-qq, hspec, scientific, text, vector
API changes (from Hackage documentation)
Files
- CHANGELOG.md +6/−1
- hspec-expectations-json.cabal +11/−10
- library/Test/Hspec/Expectations/Json/Internal.hs +14/−0
CHANGELOG.md view
@@ -1,6 +1,11 @@-## [_Unreleased_](https://github.com/freckle/hspec-expectations-json/compare/v1.0.0.4...main)+## [_Unreleased_](https://github.com/freckle/hspec-expectations-json/compare/v1.0.0.6...main) None++## [v1.0.0.6](https://github.com/freckle/hspec-expectations-json/compare/v1.0.0.5...v1.0.0.6)++- Support GHC 9.0 and 9.2+- Re-add support for aeson-1.x ## [v1.0.0.5](https://github.com/freckle/hspec-expectations-json/compare/v1.0.0.4...v1.0.0.5)
hspec-expectations-json.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.18 name: hspec-expectations-json-version: 1.0.0.5+version: 1.0.0.6 license: MIT license-file: LICENSE copyright: 2020 Freckle Education@@ -57,14 +57,15 @@ TypeApplications TypeFamilies build-depends:- Diff >=0.4.0,- HUnit >=1.6.2.0,- aeson >=2.0.0.0,- aeson-pretty >=0.8.9,+ Diff >=0.3.4,+ HUnit >=1.6.0.0,+ aeson >=1.3.1.1,+ aeson-pretty >=0.8.7, base >=4.11 && <5,- scientific >=0.3.7.0,- text >1.2,- vector >=0.12.3.1+ scientific >=0.3.6.2,+ text >=1.2.3.1,+ unordered-containers >=0.2.9.0,+ vector >=0.12.0.2 test-suite spec type: exitcode-stdio-1.0@@ -86,7 +87,7 @@ TypeApplications TypeFamilies build-depends:- aeson-qq >=0.8.4,+ aeson-qq >=0.8.2, base >=4.11 && <5,- hspec >=2.8.5,+ hspec >=2.5.5, hspec-expectations-json -any
library/Test/Hspec/Expectations/Json/Internal.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE CPP #-}+ -- | Internal building-blocks for JSON 'Value' expectations module Test.Hspec.Expectations.Json.Internal (@@ -21,9 +23,18 @@ import Prelude + import Data.Aeson+#if MIN_VERSION_Diff(0,4,0) import Data.Algorithm.Diff (PolyDiff(..), getDiff)+#else+import Data.Algorithm.Diff (Diff(..), getDiff)+#endif+#if MIN_VERSION_aeson(2,0,0) import qualified Data.Aeson.KeyMap as KeyMap+#else+import qualified Data.HashMap.Strict as KeyMap+#endif import Data.List (sortOn) import qualified Data.Scientific as Scientific import Data.Text (Text)@@ -32,6 +43,9 @@ import qualified Data.Vector as V import GHC.Stack (HasCallStack) import qualified Test.HUnit as HUnit++-- So we can call HashMap KeyMap in older aeson+{-# ANN module ("HLint: ignore Avoid restricted qualification" :: String) #-} assertBoolWithDiff :: HasCallStack => Bool -> Text -> Text -> IO () assertBoolWithDiff asserting expected got =