From e4945740aa4f82853663bd90ce2d943a9c47c28e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20Deest?= Date: Mon, 31 Jan 2022 15:13:47 +0100 Subject: [PATCH] Prepare 0.19 release --- cabal.project | 3 + .../servant-auth-client.cabal | 6 +- .../servant-auth-docs/servant-auth-docs.cabal | 2 +- .../servant-auth-server.cabal | 4 +- .../servant-auth-swagger.cabal | 2 +- servant-auth/servant-auth/servant-auth.cabal | 2 +- servant-client-core/CHANGELOG.md | 29 +++++ servant-client-core/servant-client-core.cabal | 4 +- .../servant-client-ghcjs.cabal | 4 +- servant-client/CHANGELOG.md | 29 +++++ servant-client/servant-client.cabal | 10 +- servant-conduit/servant-conduit.cabal | 6 +- servant-docs/servant-docs.cabal | 2 +- servant-foreign/servant-foreign.cabal | 2 +- .../servant-http-streams.cabal | 8 +- servant-machines/servant-machines.cabal | 6 +- servant-pipes/servant-pipes.cabal | 6 +- servant-server/CHANGELOG.md | 16 +++ servant-server/servant-server.cabal | 4 +- servant-swagger/servant-swagger.cabal | 2 +- servant/CHANGELOG.md | 109 ++++++++++++++++++ servant/servant.cabal | 2 +- 22 files changed, 222 insertions(+), 36 deletions(-) diff --git a/cabal.project b/cabal.project index ac4a4e3b..641fcb5b 100644 --- a/cabal.project +++ b/cabal.project @@ -71,6 +71,9 @@ allow-newer: servant-pagination-2.2.2:servant allow-newer: servant-pagination-2.2.2:servant-server allow-newer: servant-js:servant +allow-newer: servant-multipart:servant +allow-newer: servant-multipart:servant-server +allow-newer: servant-multipart-api:servant -- ghc 9 allow-newer: tdigest:base diff --git a/servant-auth/servant-auth-client/servant-auth-client.cabal b/servant-auth/servant-auth-client/servant-auth-client.cabal index 32f6d3bb..b5fad596 100644 --- a/servant-auth/servant-auth-client/servant-auth-client.cabal +++ b/servant-auth/servant-auth-client/servant-auth-client.cabal @@ -35,8 +35,8 @@ library , bytestring >= 0.10.6.0 && < 0.11 , containers >= 0.5.6.2 && < 0.7 , servant-auth == 0.4.* - , servant >= 0.13 && < 0.19 - , servant-client-core >= 0.13 && < 0.19 + , servant >= 0.13 && < 0.20 + , servant-client-core >= 0.13 && < 0.20 exposed-modules: Servant.Auth.Client @@ -69,7 +69,7 @@ test-suite spec , http-client >= 0.5.13.1 && < 0.8 , http-types >= 0.12.2 && < 0.13 , servant-auth-server >= 0.4.2.0 && < 0.5 - , servant-server >= 0.13 && < 0.19 + , servant-server >= 0.13 && < 0.20 , time >= 1.5.0.1 && < 1.13 , transformers >= 0.4.2.0 && < 0.6 , wai >= 3.2.1.2 && < 3.3 diff --git a/servant-auth/servant-auth-docs/servant-auth-docs.cabal b/servant-auth/servant-auth-docs/servant-auth-docs.cabal index bbcfa90c..ea9ee592 100644 --- a/servant-auth/servant-auth-docs/servant-auth-docs.cabal +++ b/servant-auth/servant-auth-docs/servant-auth-docs.cabal @@ -37,7 +37,7 @@ library build-depends: base >= 4.10 && < 4.16 , servant-docs >= 0.11.2 && < 0.12 - , servant >= 0.13 && < 0.19 + , servant >= 0.13 && < 0.20 , servant-auth == 0.4.* , lens >= 4.16.1 && <5.1 exposed-modules: diff --git a/servant-auth/servant-auth-server/servant-auth-server.cabal b/servant-auth/servant-auth-server/servant-auth-server.cabal index 94b38184..5a2080d0 100644 --- a/servant-auth/servant-auth-server/servant-auth-server.cabal +++ b/servant-auth/servant-auth-server/servant-auth-server.cabal @@ -46,9 +46,9 @@ library , memory >= 0.14.16 && < 0.17 , monad-time >= 0.3.1.0 && < 0.4 , mtl >= 2.2.2 && < 2.3 - , servant >= 0.13 && < 0.19 + , servant >= 0.13 && < 0.20 , servant-auth == 0.4.* - , servant-server >= 0.13 && < 0.19 + , servant-server >= 0.13 && < 0.20 , tagged >= 0.8.4 && < 0.9 , text >= 1.2.3.0 && < 1.3 , time >= 1.5.0.1 && < 1.10 diff --git a/servant-auth/servant-auth-swagger/servant-auth-swagger.cabal b/servant-auth/servant-auth-swagger/servant-auth-swagger.cabal index 29353e6c..9dcb8806 100644 --- a/servant-auth/servant-auth-swagger/servant-auth-swagger.cabal +++ b/servant-auth/servant-auth-swagger/servant-auth-swagger.cabal @@ -35,7 +35,7 @@ library , text >= 1.2.3.0 && < 1.3 , servant-swagger >= 1.1.5 && < 2 , swagger2 >= 2.2.2 && < 3 - , servant >= 0.13 && < 0.19 + , servant >= 0.13 && < 0.20 , servant-auth == 0.4.* , lens >= 4.16.1 && < 5.1 if impl(ghc >= 9) diff --git a/servant-auth/servant-auth/servant-auth.cabal b/servant-auth/servant-auth/servant-auth.cabal index a845cad5..eb88bdff 100644 --- a/servant-auth/servant-auth/servant-auth.cabal +++ b/servant-auth/servant-auth/servant-auth.cabal @@ -38,7 +38,7 @@ library , aeson >= 1.3.1.1 && < 3 , jose >= 0.7.0.0 && < 0.10 , lens >= 4.16.1 && < 5.1 - , servant >= 0.15 && < 0.19 + , servant >= 0.15 && < 0.20 , text >= 1.2.3.0 && < 1.3 , unordered-containers >= 0.2.9.0 && < 0.3 exposed-modules: diff --git a/servant-client-core/CHANGELOG.md b/servant-client-core/CHANGELOG.md index ce5f1573..dee697ba 100644 --- a/servant-client-core/CHANGELOG.md +++ b/servant-client-core/CHANGELOG.md @@ -1,6 +1,35 @@ [The latest version of this document is on GitHub.](https://github.com/haskell-servant/servant/blob/master/servant-client-core/CHANGELOG.md) [Changelog for `servant` package contains significant entries for all core packages.](https://github.com/haskell-servant/servant/blob/master/servant/CHANGELOG.md) +Package versions follow the [Package Versioning Policy](https://pvp.haskell.org/): in A.B.C, bumps to either A or B represent major versions. + +0.19 +---- + +### Significant changes + +- Drop support for GHC < 8.6. +- Support GHC 9.0 (GHC 9.2 should work as well, but isn't fully tested yet). +- Support Aeson 2 ([#1475](https://github.com/haskell-servant/servant/pull/1475)). +- Add `NamedRoutes` combinator, making support for records first-class in Servant + ([#1388](https://github.com/haskell-servant/servant/pull/1388)). +- Add custom type errors for partially applied combinators + ([#1289](https://github.com/haskell-servant/servant/pull/1289), + [#1486](https://github.com/haskell-servant/servant/pull/1486)). +- *servant-client* / *servant-client*: Fix erroneous behavior, where only 2XX + status codes would be considered successful, irrelevant of the status + parameter specified by the verb combinator. + ([#1469](https://github.com/haskell-servant/servant/pull/1469)) +- *servant-client* / *servant-client-core*: Fix `Show` instance for + `Servant.Client.Core.Request`. +- *servant-client* / *servant-client-core*: Allow passing arbitrary binary data + in Query parameters. + ([#1432](https://github.com/haskell-servant/servant/pull/1432)). + +### Other changes + +- Various version bumps. + 0.18.3 ------ diff --git a/servant-client-core/servant-client-core.cabal b/servant-client-core/servant-client-core.cabal index 976961ce..1518fff4 100644 --- a/servant-client-core/servant-client-core.cabal +++ b/servant-client-core/servant-client-core.cabal @@ -1,6 +1,6 @@ cabal-version: 2.2 name: servant-client-core -version: 0.18.3 +version: 0.19 synopsis: Core functionality and class for client function generation for servant APIs category: Servant, Web @@ -65,7 +65,7 @@ library -- Servant dependencies build-depends: - servant >= 0.18.3 && <0.19 + servant >= 0.19 -- Other dependencies: Lower bound around what is in the latest Stackage LTS. -- Here can be exceptions if we really need features from the newer versions. diff --git a/servant-client-ghcjs/servant-client-ghcjs.cabal b/servant-client-ghcjs/servant-client-ghcjs.cabal index 3e43f0f2..7249dc21 100644 --- a/servant-client-ghcjs/servant-client-ghcjs.cabal +++ b/servant-client-ghcjs/servant-client-ghcjs.cabal @@ -56,8 +56,8 @@ library -- strict, as we re-export stuff build-depends: - servant >=0.16 && <0.17 - , servant-client-core >=0.16 && <0.16.1 + servant >=0.16 && <0.20 + , servant-client-core >=0.16 && <0.20 hs-source-dirs: src default-language: Haskell2010 diff --git a/servant-client/CHANGELOG.md b/servant-client/CHANGELOG.md index 02f27369..53e8e013 100644 --- a/servant-client/CHANGELOG.md +++ b/servant-client/CHANGELOG.md @@ -1,6 +1,35 @@ [The latest version of this document is on GitHub.](https://github.com/haskell-servant/servant/blob/master/servant-client/CHANGELOG.md) [Changelog for `servant` package contains significant entries for all core packages.](https://github.com/haskell-servant/servant/blob/master/servant/CHANGELOG.md) +Package versions follow the [Package Versioning Policy](https://pvp.haskell.org/): in A.B.C, bumps to either A or B represent major versions. + +0.19 +---- + +### Significant changes + +- Drop support for GHC < 8.6. +- Support GHC 9.0 (GHC 9.2 should work as well, but isn't fully tested yet). +- Support Aeson 2 ([#1475](https://github.com/haskell-servant/servant/pull/1475)). +- Add `NamedRoutes` combinator, making support for records first-class in Servant + ([#1388](https://github.com/haskell-servant/servant/pull/1388)). +- Add custom type errors for partially applied combinators + ([#1289](https://github.com/haskell-servant/servant/pull/1289), + [#1486](https://github.com/haskell-servant/servant/pull/1486)). +- *servant-client* / *servant-client*: Fix erroneous behavior, where only 2XX + status codes would be considered successful, irrelevant of the status + parameter specified by the verb combinator. + ([#1469](https://github.com/haskell-servant/servant/pull/1469)) +- *servant-client* / *servant-client-core*: Fix `Show` instance for + `Servant.Client.Core.Request`. +- *servant-client* / *servant-client-core*: Allow passing arbitrary binary data + in Query parameters. + ([#1432](https://github.com/haskell-servant/servant/pull/1432)). + +### Other changes + +- Various version bumps. + 0.18.3 ------ diff --git a/servant-client/servant-client.cabal b/servant-client/servant-client.cabal index e8643f52..68108658 100644 --- a/servant-client/servant-client.cabal +++ b/servant-client/servant-client.cabal @@ -1,6 +1,6 @@ cabal-version: 2.2 name: servant-client -version: 0.18.3 +version: 0.19 synopsis: Automatic derivation of querying functions for servant category: Servant, Web @@ -58,8 +58,8 @@ library -- Servant dependencies. -- Strict dependency on `servant-client-core` as we re-export things. build-depends: - servant == 0.18.* - , servant-client-core >= 0.18.3 && <0.18.4 + servant >= 0.18 && < 0.20 + , servant-client-core >= 0.19 && < 0.19.1 -- Other dependencies: Lower bound around what is in the latest Stackage LTS. -- Here can be exceptions if we really need features from the newer versions. @@ -128,8 +128,8 @@ test-suite spec , HUnit >= 1.6.0.0 && < 1.7 , network >= 2.8.0.0 && < 3.2 , QuickCheck >= 2.12.6.1 && < 2.15 - , servant == 0.18.* - , servant-server == 0.18.* + , servant == 0.19.* + , servant-server == 0.19.* , tdigest >= 0.2 && < 0.3 build-tool-depends: diff --git a/servant-conduit/servant-conduit.cabal b/servant-conduit/servant-conduit.cabal index 8360a21b..9a641524 100644 --- a/servant-conduit/servant-conduit.cabal +++ b/servant-conduit/servant-conduit.cabal @@ -33,7 +33,7 @@ library , conduit >=1.3.1 && <1.4 , mtl >=2.2.2 && <2.3 , resourcet >=1.2.2 && <1.3 - , servant >=0.15 && <0.19 + , servant >=0.15 && <0.20 , unliftio-core >=0.1.2.0 && <0.3 hs-source-dirs: src default-language: Haskell2010 @@ -54,8 +54,8 @@ test-suite example , resourcet , servant , servant-conduit - , servant-server >=0.15 && <0.19 - , servant-client >=0.15 && <0.19 + , servant-server >=0.15 && <0.20 + , servant-client >=0.15 && <0.20 , wai >=3.2.1.2 && <3.3 , warp >=3.2.25 && <3.4 , http-client diff --git a/servant-docs/servant-docs.cabal b/servant-docs/servant-docs.cabal index c58c64d4..3cea5d34 100644 --- a/servant-docs/servant-docs.cabal +++ b/servant-docs/servant-docs.cabal @@ -47,7 +47,7 @@ library -- Servant dependencies build-depends: - servant >= 0.18 && <0.19 + servant >= 0.18 && <0.20 -- Other dependencies: Lower bound around what is in the latest Stackage LTS. -- Here can be exceptions if we really need features from the newer versions. diff --git a/servant-foreign/servant-foreign.cabal b/servant-foreign/servant-foreign.cabal index 7c1068e6..f075fe01 100644 --- a/servant-foreign/servant-foreign.cabal +++ b/servant-foreign/servant-foreign.cabal @@ -46,7 +46,7 @@ library -- Servant dependencies build-depends: - servant >=0.18 && <0.19 + servant >=0.18 && <0.20 -- Other dependencies: Lower bound around what is in the latest Stackage LTS. -- Here can be exceptions if we really need features from the newer versions. diff --git a/servant-http-streams/servant-http-streams.cabal b/servant-http-streams/servant-http-streams.cabal index c1a6c87f..191a9ed8 100644 --- a/servant-http-streams/servant-http-streams.cabal +++ b/servant-http-streams/servant-http-streams.cabal @@ -54,8 +54,8 @@ library -- Servant dependencies. -- Strict dependency on `servant-client-core` as we re-export things. build-depends: - servant == 0.18.* - , servant-client-core >= 0.18.3 && <0.18.4 + servant >= 0.18 && < 0.20 + , servant-client-core >= 0.18.3 && <0.20 -- Other dependencies: Lower bound around what is in the latest Stackage LTS. -- Here can be exceptions if we really need features from the newer versions. @@ -116,8 +116,8 @@ test-suite spec , HUnit >= 1.6.0.0 && < 1.7 , network >= 2.8.0.0 && < 3.2 , QuickCheck >= 2.12.6.1 && < 2.15 - , servant == 0.18.* - , servant-server == 0.18.* + , servant == 0.19.* + , servant-server == 0.19.* , tdigest >= 0.2 && < 0.3 build-tool-depends: diff --git a/servant-machines/servant-machines.cabal b/servant-machines/servant-machines.cabal index 96fbd2bb..21b58633 100644 --- a/servant-machines/servant-machines.cabal +++ b/servant-machines/servant-machines.cabal @@ -32,7 +32,7 @@ library , bytestring >=0.10.8.1 && <0.12 , machines >=0.6.4 && <0.8 , mtl >=2.2.2 && <2.3 - , servant >=0.15 && <0.19 + , servant >=0.15 && <0.20 hs-source-dirs: src default-language: Haskell2010 ghc-options: -Wall @@ -51,8 +51,8 @@ test-suite example , servant , machines , servant-machines - , servant-server >=0.15 && <0.19 - , servant-client >=0.15 && <0.19 + , servant-server >=0.15 && <0.20 + , servant-client >=0.15 && <0.20 , wai >=3.2.1.2 && <3.3 , warp >=3.2.25 && <3.4 , http-client diff --git a/servant-pipes/servant-pipes.cabal b/servant-pipes/servant-pipes.cabal index 4a1e36e1..9b3e1151 100644 --- a/servant-pipes/servant-pipes.cabal +++ b/servant-pipes/servant-pipes.cabal @@ -34,7 +34,7 @@ library , pipes-safe >=2.3.1 && <2.4 , mtl >=2.2.2 && <2.3 , monad-control >=1.0.2.3 && <1.1 - , servant >=0.15 && <0.19 + , servant >=0.15 && <0.20 hs-source-dirs: src default-language: Haskell2010 ghc-options: -Wall @@ -55,8 +55,8 @@ test-suite example , pipes-safe , servant-pipes , pipes-bytestring >=2.1.6 && <2.2 - , servant-server >=0.15 && <0.19 - , servant-client >=0.15 && <0.19 + , servant-server >=0.15 && <0.20 + , servant-client >=0.15 && <0.20 , wai >=3.2.1.2 && <3.3 , warp >=3.2.25 && <3.4 , http-client diff --git a/servant-server/CHANGELOG.md b/servant-server/CHANGELOG.md index b33d9877..632fed3e 100644 --- a/servant-server/CHANGELOG.md +++ b/servant-server/CHANGELOG.md @@ -1,6 +1,22 @@ [The latest version of this document is on GitHub.](https://github.com/haskell-servant/servant/blob/master/servant-server/CHANGELOG.md) [Changelog for `servant` package contains significant entries for all core packages.](https://github.com/haskell-servant/servant/blob/master/servant/CHANGELOG.md) +Package versions follow the [Package Versioning Policy](https://pvp.haskell.org/): in A.B.C, bumps to either A or B represent major versions. + +0.19 +---- + +### Significant changes + +- Drop support for GHC < 8.6. +- Support GHC 9.0 (GHC 9.2 should work as well, but isn't fully tested yet). +- Support Aeson 2 ([#1475](https://github.com/haskell-servant/servant/pull/1475)). +- Add `NamedRoutes` combinator, making support for records first-class in Servant + ([#1388](https://github.com/haskell-servant/servant/pull/1388)). +- Add custom type errors for partially applied combinators + ([#1289](https://github.com/haskell-servant/servant/pull/1289), + [#1486](https://github.com/haskell-servant/servant/pull/1486)). + 0.18.3 ------ diff --git a/servant-server/servant-server.cabal b/servant-server/servant-server.cabal index 2a63f940..6e298e99 100644 --- a/servant-server/servant-server.cabal +++ b/servant-server/servant-server.cabal @@ -1,6 +1,6 @@ cabal-version: 2.2 name: servant-server -version: 0.18.3 +version: 0.19 synopsis: A family of combinators for defining webservices APIs and serving them category: Servant, Web @@ -72,7 +72,7 @@ library -- Servant dependencies -- strict dependency as we re-export 'servant' things. build-depends: - servant >= 0.18.3 && < 0.18.4 + servant >= 0.19 , http-api-data >= 0.4.1 && < 0.4.4 -- Other dependencies: Lower bound around what is in the latest Stackage LTS. diff --git a/servant-swagger/servant-swagger.cabal b/servant-swagger/servant-swagger.cabal index d2c0bef7..0b0993d5 100644 --- a/servant-swagger/servant-swagger.cabal +++ b/servant-swagger/servant-swagger.cabal @@ -77,7 +77,7 @@ library , http-media >=0.7.1.3 && <0.9 , insert-ordered-containers >=0.2.1.0 && <0.3 , lens >=4.17 && <6 - , servant >=0.18.1 && <0.19 + , servant >=0.18.1 && <0.20 , singleton-bool >=0.1.4 && <0.2 , swagger2 >=2.3.0.1 && <3 , text >=1.2.3.0 && <1.3 diff --git a/servant/CHANGELOG.md b/servant/CHANGELOG.md index 8c58ed7b..1812ac67 100644 --- a/servant/CHANGELOG.md +++ b/servant/CHANGELOG.md @@ -1,5 +1,114 @@ [The latest version of this document is on GitHub.](https://github.com/haskell-servant/servant/blob/master/servant/CHANGELOG.md) +Package versions follow the [Package Versioning Policy](https://pvp.haskell.org/): in A.B.C, bumps to either A or B represent major versions. + +0.19 +---- + +### Significant changes + +- Drop support for GHC < 8.6. +- Support GHC 9.0 (GHC 9.2 should work as well, but isn't fully tested yet). +- Support Aeson 2 ([#1475](https://github.com/haskell-servant/servant/pull/1475)). +- Add `NamedRoutes` combinator, making support for records first-class in Servant + ([#1388](https://github.com/haskell-servant/servant/pull/1388)). + + Users can now directly mark part as an API as defined by a record, instead of + using `(:<|>)` to combine routes. Concretely, the anonymous: + + ```haskell + type API = + "version" :> Get '[JSON] String :<|> + "products" :> Get '[JSON] [Product] + ``` + + can be replaced with the explicitly-named: + + ```haskell + type API = NamedRoutes NamedAPI + data NamedAPI mode = NamedAPI + { version :: mode :- "version" :> Get '[JSON] String + , products :: mode :- "products" :> Get '[JSON] [Product] + } + ``` + + `NamedRoutes` builds upon `servant-generic`, but improves usability by freeing + users from the need to perform `toServant` / `fromServant` conversions + manually. Serving `NamedRoutes NamedAPI` is now done directly by providing a + record of handlers, and servant generates clients directly as records as well. + In particular, it makes it much more practical to work with nested hierarchies + of named routes. + + Two convenience functions, `(//)` and `(/:)`, have been added to make the + usage of named route hierarchies more pleasant: + + ```haskell + rootClient :: RootApi (AsClientT ClientM) + rootClient = client (Proxy @API) + + hello :: String -> ClientM String + hello name = rootClient // hello /: name + + endpointClient :: ClientM Person + endpointClient = client // subApi /: "foobar123" // endpoint + + type Api = NamedRoutes RootApi + + data RootApi mode = RootApi + { subApi :: mode :- Capture "token" String :> NamedRoutes SubApi + , hello :: mode :- Capture "name" String :> Get '[JSON] String + , … + } deriving Generic + + data SubApi mode = SubApi + { endpoint :: mode :- Get '[JSON] Person + , … + } deriving Generic + ``` + +- Add custom type errors for partially applied combinators + ([#1289](https://github.com/haskell-servant/servant/pull/1289), + [#1486](https://github.com/haskell-servant/servant/pull/1486)). + + For example, forgetting to document the expected type for a query parameter, + as in: + + ``` haskell + type API = QueryParam "param" :> Get '[JSON] NoContent + ``` + + will raise to the following error when trying to serve the API: + + ``` + • There is no instance for HasServer (QueryParam' + '[Optional, Strict] "param" :> ...) + QueryParam' '[Optional, Strict] "1" expects 1 more arguments + ``` + + As a consequence of this change, unsaturated types are now forbidden before `(:>)`. + +- Add a `HeadNoContent` verb ([#1502](https://github.com/haskell-servant/servant/pull/1502)). + +- *servant-client* / *servant-client*: Fix erroneous behavior, where only 2XX + status codes would be considered successful, irrelevant of the status + parameter specified by the verb combinator. + ([#1469](https://github.com/haskell-servant/servant/pull/1469)) + +- *servant-client* / *servant-client-core*: Fix `Show` instance for + `Servant.Client.Core.Request`. + + +- *servant-client* / *servant-client-core*: Allow passing arbitrary binary data + in Query parameters. + ([#1432](https://github.com/haskell-servant/servant/pull/1432)). + +### Other changes + +- Various bit rotten cookbooks have been updated and re-introduced on + `haskell-servant.github.io`. + +- Various version bumps. + 0.18.3 ------ diff --git a/servant/servant.cabal b/servant/servant.cabal index f5f973bb..314b784c 100644 --- a/servant/servant.cabal +++ b/servant/servant.cabal @@ -1,6 +1,6 @@ cabal-version: 2.2 name: servant -version: 0.18.3 +version: 0.19 synopsis: A family of combinators for defining webservices APIs category: Servant, Web