wai-middleware-static 0.9.1 → 0.9.2
raw patch · 3 files changed
+19/−10 lines, 3 filesdep +base16-bytestringdep +cryptohash-sha1dep −cryptonitedep −memorydep ~bytestringdep ~containersdep ~filepathPVP ok
version bump matches the API change (PVP)
Dependencies added: base16-bytestring, cryptohash-sha1
Dependencies removed: cryptonite, memory
Dependency ranges changed: bytestring, containers, filepath, text, time
API changes (from Hackage documentation)
Files
- Network/Wai/Middleware/Static.hs +6/−4
- changelog.md +5/−0
- wai-middleware-static.cabal +8/−6
Network/Wai/Middleware/Static.hs view
@@ -28,6 +28,8 @@ import Caching.ExpiringCacheMap.HashECM (newECMIO, lookupECM, CacheSettings(..), consistentDuration) import Control.Monad+import qualified Crypto.Hash.SHA1 as SHA1+import qualified Data.ByteString.Base16 as Base16 import qualified Data.List as L #if !(MIN_VERSION_base(4,8,0)) import Data.Monoid (Monoid(..))@@ -44,9 +46,9 @@ #if !(MIN_VERSION_time(1,5,0)) import System.Locale #endif-import Crypto.Hash.Algorithms-import Crypto.Hash-import Data.ByteArray.Encoding+-- import Crypto.Hash.Algorithms+-- import Crypto.Hash+-- import Data.ByteArray.Encoding import qualified Data.ByteString as BS import qualified Data.ByteString.Char8 as BSC import qualified Data.ByteString.Lazy as BSL@@ -328,7 +330,7 @@ return $ FileMeta { fm_lastModified = BSC.pack $ formatTime defaultTimeLocale "%a, %d-%b-%Y %X %Z" mtime- , fm_etag = convertToBase Base16 (hashlazy ct :: Digest SHA1)+ , fm_etag = Base16.encode (SHA1.hashlazy ct) , fm_fileName = fp }
changelog.md view
@@ -1,3 +1,8 @@+## 0.9.2 [2022.03.08]+* Allow building with GHC 9.2.+* Replace the `cryptonite` and `memory` dependencies with equivalent+ functionality from `cryptohash-sha1` and `base16-bytestring`.+ ## 0.9.1 [2021.10.31] * Always import `Data.List` qualified.
wai-middleware-static.cabal view
@@ -1,5 +1,5 @@ Name: wai-middleware-static-Version: 0.9.1+Version: 0.9.2 Synopsis: WAI middleware that serves requests to static files. Homepage: https://github.com/scotty-web/wai-middleware-static Bug-reports: https://github.com/scotty-web/wai-middleware-static/issues@@ -24,8 +24,10 @@ , GHC == 8.2.2 , GHC == 8.4.4 , GHC == 8.6.5- , GHC == 8.8.3- , GHC == 8.10.1+ , GHC == 8.8.4+ , GHC == 8.10.7+ , GHC == 9.0.2+ , GHC == 9.2.2 Extra-source-files: changelog.md, README.md Library@@ -33,10 +35,10 @@ default-language: Haskell2010 Build-depends: base >= 4.6.0.1 && < 5,+ base16-bytestring >= 0.1 && < 1.1, bytestring >= 0.10.0.2 && < 0.12, containers >= 0.5.0.0 && < 0.7,- cryptonite >= 0.10 && < 1.0,- memory >= 0.10 && < 1.0,+ cryptohash-sha1 >= 0.11 && < 0.12, directory >= 1.2.0.1 && < 1.4, expiring-cache-map >= 0.0.5 && < 0.1, filepath >= 1.3.0.1 && < 1.5,@@ -44,7 +46,7 @@ mime-types >= 0.1.0.3 && < 0.2, old-locale >= 1.0 && < 1.1, semigroups >= 0.18 && < 1,- text >= 0.11.3.1 && < 1.3,+ text >= 0.11.3.1 && < 2.1, time >= 1.4 && < 1.12, wai >= 3.0.0 && < 3.3