hw-uri 0.0.0.1 → 0.0.1.0
raw patch · 2 files changed
+17/−7 lines, 2 filesdep +aesondep ~antiope-coredep ~antiope-s3PVP ok
version bump matches the API change (PVP)
Dependencies added: aeson
Dependency ranges changed: antiope-core, antiope-s3
API changes (from Hackage documentation)
+ HaskellWorks.Data.Uri.Location: instance Data.Aeson.Types.ToJSON.ToJSON HaskellWorks.Data.Uri.Location.Location
Files
hw-uri.cabal view
@@ -1,16 +1,16 @@ cabal-version: 2.2 name: hw-uri-version: 0.0.0.1-synopsis: CI Assistant for Haskell projects-description: CI Assistant for Haskell projects. Implements package caching.+version: 0.0.1.0+synopsis: Supports IO on URIs+description: Supports IO on URIs. homepage: https://github.com/haskell-works/hw-uri license: BSD-3-Clause license-file: LICENSE author: John Ky maintainer: newhoggy@gmail.com copyright: John Ky 2019-category: Development+category: Data extra-source-files: CHANGELOG.md, README.md source-repository head@@ -19,16 +19,17 @@ common base { build-depends: base >= 4.7 && < 5 } +common aeson { build-depends: aeson >= 1.4.4.0 && < 1.5 } common amazonka { build-depends: amazonka >= 1.6.1 && < 1.7 } common amazonka-core { build-depends: amazonka-core >= 1.6.1 && < 1.7 } common amazonka-s3 { build-depends: amazonka-s3 >= 1.6.1 && < 1.7 }-common antiope-core { build-depends: antiope-core >= 7.0.1 && < 8 }-common antiope-s3 { build-depends: antiope-s3 >= 7.0.1 && < 8 }+common antiope-core { build-depends: antiope-core >= 7.1.1 && < 8 }+common antiope-s3 { build-depends: antiope-s3 >= 7.1.1 && < 8 } common bytestring { build-depends: bytestring >= 0.10.8.2 && < 0.11 } common directory { build-depends: directory >= 1.3.3.0 && < 1.4 } common exceptions { build-depends: exceptions >= 0.10.1 && < 0.11 } common filepath { build-depends: filepath >= 1.3 && < 1.5 }-common hedgehog { build-depends: hedgehog >= 0.5 && < 0.7 }+common hedgehog { build-depends: hedgehog >= 0.5 && < 1.1 } common hspec { build-depends: hspec >= 2.4 && < 3 } common http-client { build-depends: http-client >= 0.5.14 && < 0.7 } common http-types { build-depends: http-types >= 0.12.3 && < 0.13 }@@ -44,6 +45,7 @@ library import: base, config+ , aeson , amazonka , amazonka-core , amazonka-s3
src/HaskellWorks/Data/Uri/Location.hs view
@@ -12,10 +12,12 @@ import Antiope.Core (ToText (..), fromText) import Antiope.S3 (ObjectKey (..), S3Uri (..))+import Data.Aeson import Data.Maybe (fromMaybe) import Data.Semigroup ((<>)) import Data.Text (Text) import GHC.Generics (Generic)+import Data.Aeson (ToJSON) import qualified Data.Text as T import qualified System.FilePath as FP@@ -32,6 +34,12 @@ | Local FilePath | HttpUri Text deriving (Show, Eq, Generic)++instance ToJSON Location where+ toJSON v = case v of+ S3 uri -> toJSON uri+ Local filePath -> toJSON filePath+ HttpUri text -> toJSON text instance ToText Location where toText (S3 uri) = toText uri