From 1ad9cc0099e26f1ebe568d0eeba0597666afb977 Mon Sep 17 00:00:00 2001 From: iphydf Date: Fri, 1 Sep 2023 17:41:48 +0000 Subject: [PATCH] chore: Upgrade stack LTS snapshot to 21.9 (GHC 9.4.6). --- github-tools.cabal | 6 +++--- src/GitHub/WebHook/Handler.hs | 4 ++-- stack.yaml | 7 +++---- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/github-tools.cabal b/github-tools.cabal index 30bee9a..19e2c02 100644 --- a/github-tools.cabal +++ b/github-tools.cabal @@ -126,13 +126,13 @@ library default-language: Haskell2010 build-depends: base >= 4 && < 5 - , aeson >= 0.8.1.0 && < 2 + , aeson >= 2 , bytestring , containers , cryptohash , exceptions , directory - , github >= 0.25 && <= 0.27 + , github >= 0.25 && < 0.29 , html , http-client >= 0.4.30 , http-client-tls @@ -267,7 +267,7 @@ test-suite testsuite hspec-discover:hspec-discover build-depends: base < 5 - , aeson >= 0.8.1.0 + , aeson >= 2 , github-tools , hspec , QuickCheck diff --git a/src/GitHub/WebHook/Handler.hs b/src/GitHub/WebHook/Handler.hs index a468aa2..26d4f24 100644 --- a/src/GitHub/WebHook/Handler.hs +++ b/src/GitHub/WebHook/Handler.hs @@ -12,10 +12,10 @@ import Crypto.Hash (HMAC, SHA1, digestToHexByteString, hmac, hmacGetDigest) import Data.Aeson (ToJSON (..), Value (..), eitherDecodeStrict') +import qualified Data.Aeson.KeyMap as KeyMap import Data.Aeson.Types (parseEither) import Data.ByteString (ByteString) import qualified Data.ByteString.Char8 as BC8 -import qualified Data.HashMap.Strict as HashMap import Data.Text (Text) import qualified Data.Text as Text import Data.Text.Encoding (decodeUtf8) @@ -77,7 +77,7 @@ removeNulls :: ToJSON a => a -> Value removeNulls = go . toJSON where go (Array x) = Array . Vector.map go $ x - go (Object x) = Object . HashMap.map go . HashMap.filter (not . isEmpty) $ x + go (Object x) = Object . KeyMap.map go . KeyMap.filter (not . isEmpty) $ x go x = x isEmpty Null = True diff --git a/stack.yaml b/stack.yaml index e5726d3..7f01328 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,7 +1,6 @@ --- packages: [.] -resolver: lts-18.18 +resolver: lts-21.9 extra-deps: - - github-0.27@sha256:2288b807a4bd97fefeff75487ef5d2ed31f0faa18f306e01e5f5cb498e228208,7033 - - suspend-0.2.0.0@sha256:0d98526558b773c3ff792664bc45d7a083a32eedb6206d4101a7570869c75a28,1115 - - timers-0.2.0.4@sha256:081e81f1f7384795acc4f887cf3c07cc6e7a9c1bf6e65f0f94507f3d2e0585c2,1175 + - suspend-0.2.0.0 + - timers-0.2.0.4