diff --git a/config/stack.yaml b/config/stack.yaml index cc1d9d7df..94bb061c6 100644 --- a/config/stack.yaml +++ b/config/stack.yaml @@ -22,13 +22,6 @@ packages: - morpheus-graphql-server - morpheus-graphql plan: - 8.10.7: - deps: - fastsum: 0.1.1.1 - graphql: 0.11.1.0 - include: - - morpheus-graphql-benchmarks - resolver: lts-18.10 8.2.2: resolver: lts-11.10 8.4.4: @@ -51,8 +44,16 @@ plan: deps: prettyprinter: 1.7.0 resolver: lts-16.2 + 8.10.7: + deps: + fastsum: 0.1.1.1 + graphql: 0.11.1.0 + include: + - morpheus-graphql-benchmarks + resolver: lts-18.10 9.0.2: deps: + attoparsec-aeson: 2.1.0.0 dependent-map: 0.2.4.0 dependent-sum: 0.4 resolver: lts-19.28 @@ -63,26 +64,23 @@ plan: fraxl: 0.3.0.0 haxl: 2.4.0.0 type-aligned: 0.9.6 - resolver: nightly-2023-04-23 + resolver: nightly-2024-04-20 skip: - examples/scotty-fraxl - examples/scotty-freer-simple rules: - Glob: - - 0.7.0 - - 1.0.0 aeson: - 1.4.4 - 3.0.0 attoparsec-aeson: - - 2.1.0 - - '3' + - 2.1.0.0 + - 3.0.0 base: - 4.7.0 - 5.0.0 bytestring: - 0.10.4 - - 0.12.0 + - 0.15.0 containers: - 0.4.2.1 - 0.7.0 @@ -95,6 +93,9 @@ rules: filepath: - 1.1.0 - 1.5.0 + Glob: + - 0.7.0 + - 1.0.0 hashable: - 1.0.0 - 2.0.0 @@ -109,7 +110,7 @@ rules: - 3.0.0 optparse-applicative: - 0.12.0 - - 0.18.0 + - 0.20.0 prettyprinter: - 1.7.0 - 2.0.0 diff --git a/examples/client/morpheus-graphql-examples-client.cabal b/examples/client/morpheus-graphql-examples-client.cabal index 1d39d01f2..4c87645d1 100644 --- a/examples/client/morpheus-graphql-examples-client.cabal +++ b/examples/client/morpheus-graphql-examples-client.cabal @@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.35.0. +-- This file has been generated from package.yaml by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack @@ -39,9 +39,9 @@ executable morpheus-client-example ghc-options: -Wall build-depends: base >=4.7 && <5 - , bytestring >=0.10.4 && <0.12 + , bytestring >=0.10.4 , file-embed , morpheus-graphql-client , req >=2.1.0 - , text >=1.2.3.0 && <1.3 + , text >=1.2.3.0 default-language: Haskell2010 diff --git a/examples/client/package.yaml b/examples/client/package.yaml index 1345d97b3..6573ca0eb 100644 --- a/examples/client/package.yaml +++ b/examples/client/package.yaml @@ -10,8 +10,8 @@ description: examples of GraphQL APIs dependencies: - base >= 4.7 && < 5 - - bytestring >= 0.10.4 && < 0.12 - - text >= 1.2.3.0 && < 1.3 + - bytestring >= 0.10.4 + - text >= 1.2.3.0 - morpheus-graphql-client - req >= 2.1.0 - file-embed diff --git a/examples/code-gen-docs/morpheus-graphql-examples-code-gen-docs.cabal b/examples/code-gen-docs/morpheus-graphql-examples-code-gen-docs.cabal index 274473acd..05c73aecf 100644 --- a/examples/code-gen-docs/morpheus-graphql-examples-code-gen-docs.cabal +++ b/examples/code-gen-docs/morpheus-graphql-examples-code-gen-docs.cabal @@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.35.0. +-- This file has been generated from package.yaml by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack @@ -35,11 +35,11 @@ executable code-gen-docs-server ghc-options: -Wall build-depends: base >=4.7 && <5 - , bytestring >=0.10.4 && <0.12 - , containers >=0.4.2.1 && <0.7 + , bytestring >=0.10.4 + , containers >=0.4.2.1 , morpheus-graphql , morpheus-graphql-client , morpheus-graphql-server , scotty - , text >=1.2.3.0 && <1.3 + , text >=1.2.3.0 default-language: Haskell2010 diff --git a/examples/code-gen-docs/package.yaml b/examples/code-gen-docs/package.yaml index 9d5394cef..3aa675b5b 100644 --- a/examples/code-gen-docs/package.yaml +++ b/examples/code-gen-docs/package.yaml @@ -10,13 +10,13 @@ description: examples of GraphQL APIs dependencies: - base >= 4.7 && < 5 - - bytestring >= 0.10.4 && < 0.12 - - text >= 1.2.3.0 && < 1.3 + - bytestring >= 0.10.4 + - text >= 1.2.3.0 - morpheus-graphql - morpheus-graphql-server - morpheus-graphql-client - scotty - - containers >= 0.4.2.1 && < 0.7 + - containers >= 0.4.2.1 executables: code-gen-docs-server: diff --git a/examples/code-gen/morpheus-graphql-examples-code-gen.cabal b/examples/code-gen/morpheus-graphql-examples-code-gen.cabal index 80d93951e..92c10e3e3 100644 --- a/examples/code-gen/morpheus-graphql-examples-code-gen.cabal +++ b/examples/code-gen/morpheus-graphql-examples-code-gen.cabal @@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.35.0. +-- This file has been generated from package.yaml by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack @@ -51,11 +51,11 @@ executable generated-server ghc-options: -Wall build-depends: base >=4.7 && <5 - , bytestring >=0.10.4 && <0.12 - , containers >=0.4.2.1 && <0.7 + , bytestring >=0.10.4 + , containers >=0.4.2.1 , morpheus-graphql , morpheus-graphql-client , morpheus-graphql-server , scotty - , text >=1.2.3.0 && <1.3 + , text >=1.2.3.0 default-language: Haskell2010 diff --git a/examples/code-gen/package.yaml b/examples/code-gen/package.yaml index b4f2c3c24..49fc6e1e1 100644 --- a/examples/code-gen/package.yaml +++ b/examples/code-gen/package.yaml @@ -10,13 +10,13 @@ description: examples of GraphQL APIs dependencies: - base >= 4.7 && < 5 - - bytestring >= 0.10.4 && < 0.12 - - text >= 1.2.3.0 && < 1.3 + - bytestring >= 0.10.4 + - text >= 1.2.3.0 - morpheus-graphql - morpheus-graphql-server - morpheus-graphql-client - scotty - - containers >= 0.4.2.1 && < 0.7 + - containers >= 0.4.2.1 executables: generated-server: diff --git a/examples/scotty-fraxl/morpheus-graphql-examples-scotty-fraxl.cabal b/examples/scotty-fraxl/morpheus-graphql-examples-scotty-fraxl.cabal new file mode 100644 index 000000000..3f4ae7ee0 --- /dev/null +++ b/examples/scotty-fraxl/morpheus-graphql-examples-scotty-fraxl.cabal @@ -0,0 +1,41 @@ +cabal-version: 1.12 + +-- This file has been generated from package.yaml by hpack version 0.36.0. +-- +-- see: https://github.com/sol/hpack + +name: morpheus-graphql-examples-scotty-fraxl +version: 0.1.0 +synopsis: examples +description: Fraxl example of GraphQL APIs +category: web, graphql +homepage: https://github.com/nalchevanidze/morpheus-graphql#readme +bug-reports: https://github.com/nalchevanidze/morpheus-graphql/issues +author: Daviti Nalchevanidze +maintainer: Daviti Nalchevanidze +copyright: (c) 2019 Daviti Nalchevanidze +license: MIT +build-type: Simple + +source-repository head + type: git + location: https://github.com/nalchevanidze/morpheus-graphql + +executable scotty-server-fraxl + main-is: Main.hs + other-modules: + Fraxl.API + Fraxl.FakeDB + Paths_morpheus_graphql_examples_scotty_fraxl + hs-source-dirs: + src + ghc-options: -Wall + build-depends: + base >=4.7 && <5 + , containers >=0.4.2.1 + , fraxl + , morpheus-graphql + , mtl >=2.0 + , scotty + , text >=1.2.3.0 + default-language: Haskell2010 diff --git a/examples/scotty-fraxl/package.yaml b/examples/scotty-fraxl/package.yaml index b7295a71b..6013562c3 100644 --- a/examples/scotty-fraxl/package.yaml +++ b/examples/scotty-fraxl/package.yaml @@ -10,9 +10,9 @@ description: Fraxl example of GraphQL APIs dependencies: - base >= 4.7 && < 5 - - mtl >= 2.0 && <= 2.3 - - text >= 1.2.3.0 && < 1.3 - - containers >= 0.4.2.1 && < 0.7 + - mtl >= 2.0 + - text >= 1.2.3.0 + - containers >= 0.4.2.1 - morpheus-graphql - scotty - fraxl diff --git a/examples/scotty-haxl/morpheus-graphql-examples-scotty-haxl.cabal b/examples/scotty-haxl/morpheus-graphql-examples-scotty-haxl.cabal index d186648ea..08773adee 100644 --- a/examples/scotty-haxl/morpheus-graphql-examples-scotty-haxl.cabal +++ b/examples/scotty-haxl/morpheus-graphql-examples-scotty-haxl.cabal @@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.35.0. +-- This file has been generated from package.yaml by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack @@ -33,12 +33,12 @@ executable scotty-server-haxl ghc-options: -Wall build-depends: base >=4.7 && <5 - , containers >=0.4.2.1 && <0.7 + , containers >=0.4.2.1 , hashable , haxl , morpheus-graphql , morpheus-graphql-app - , mtl >=2.0 && <=2.3 + , mtl >=2.0 , scotty - , text >=1.2.3.0 && <1.3 + , text >=1.2.3.0 default-language: Haskell2010 diff --git a/examples/scotty-haxl/package.yaml b/examples/scotty-haxl/package.yaml index f139729c8..c0e6a7308 100644 --- a/examples/scotty-haxl/package.yaml +++ b/examples/scotty-haxl/package.yaml @@ -10,9 +10,9 @@ description: examples of GraphQL APIs dependencies: - base >= 4.7 && < 5 - - mtl >= 2.0 && <= 2.3 - - text >= 1.2.3.0 && < 1.3 - - containers >= 0.4.2.1 && < 0.7 + - mtl >= 2.0 + - text >= 1.2.3.0 + - containers >= 0.4.2.1 - morpheus-graphql - morpheus-graphql-app - scotty diff --git a/examples/scotty/morpheus-graphql-examples-scotty.cabal b/examples/scotty/morpheus-graphql-examples-scotty.cabal index 38218d556..b546a12af 100644 --- a/examples/scotty/morpheus-graphql-examples-scotty.cabal +++ b/examples/scotty/morpheus-graphql-examples-scotty.cabal @@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.35.0. +-- This file has been generated from package.yaml by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack @@ -42,22 +42,22 @@ executable scotty-server src ghc-options: -Wall build-depends: - aeson >=1.4.4.0 && <3 + aeson >=1.4.4.0 , base >=4.7 && <5 - , bytestring >=0.10.4 && <0.12 - , containers >=0.4.2.1 && <0.7 + , bytestring >=0.10.4 + , containers >=0.4.2.1 , extra , http-types , morpheus-graphql , morpheus-graphql-app , morpheus-graphql-core , morpheus-graphql-subscriptions - , mtl >=2.0 && <=2.3 + , mtl >=2.0 , scotty , stm - , text >=1.2.3.0 && <1.3 + , text >=1.2.3.0 , transformers - , wai-websockets >=1.0 && <=3.5 + , wai-websockets >=1.0 , warp - , websockets >=0.11.0 && <=0.13 + , websockets >=0.11.0 default-language: Haskell2010 diff --git a/examples/scotty/package.yaml b/examples/scotty/package.yaml index 19a4f5873..12f05792f 100644 --- a/examples/scotty/package.yaml +++ b/examples/scotty/package.yaml @@ -10,13 +10,13 @@ description: examples of GraphQL APIs dependencies: - base >= 4.7 && < 5 - - aeson >= 1.4.4.0 && < 3 - - bytestring >= 0.10.4 && < 0.12 - - text >= 1.2.3.0 && < 1.3 - - containers >= 0.4.2.1 && < 0.7 - - mtl >= 2.0 && <= 2.3 - - websockets >= 0.11.0 && <= 0.13 - - wai-websockets >= 1.0 && <= 3.5 + - aeson >= 1.4.4.0 + - bytestring >= 0.10.4 + - text >= 1.2.3.0 + - containers >= 0.4.2.1 + - mtl >= 2.0 + - websockets >= 0.11.0 + - wai-websockets >= 1.0 - morpheus-graphql - morpheus-graphql-core - morpheus-graphql-app diff --git a/examples/servant/morpheus-graphql-examples-servant.cabal b/examples/servant/morpheus-graphql-examples-servant.cabal index b11fbbd6e..34b8d356d 100644 --- a/examples/servant/morpheus-graphql-examples-servant.cabal +++ b/examples/servant/morpheus-graphql-examples-servant.cabal @@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.35.0. +-- This file has been generated from package.yaml by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack @@ -33,15 +33,15 @@ executable servant-server ghc-options: -Wall build-depends: base >=4.7 && <5 - , bytestring >=0.10.4 && <0.12 + , bytestring >=0.10.4 , file-embed , http-media , morpheus-graphql , morpheus-graphql-subscriptions - , mtl >=2.0 && <=2.3 + , mtl >=2.0 , servant-server - , text >=1.2.3.0 && <1.3 - , wai-websockets >=1.0 && <=3.5 + , text >=1.2.3 + , wai-websockets >=1.0 , warp - , websockets >=0.11.0 && <=0.13 + , websockets >=0.11.0 default-language: Haskell2010 diff --git a/examples/servant/package.yaml b/examples/servant/package.yaml index 636054516..c9e717a65 100644 --- a/examples/servant/package.yaml +++ b/examples/servant/package.yaml @@ -10,13 +10,13 @@ description: examples of GraphQL APIs dependencies: - base >= 4.7 && < 5 - - bytestring >= 0.10.4 && < 0.12 - - text >= 1.2.3.0 && < 1.3 - - mtl >= 2.0 && <= 2.3 + - bytestring >= 0.10.4 + - text >= 1.2.3 + - mtl >= 2.0 - morpheus-graphql - morpheus-graphql-subscriptions - - wai-websockets >= 1.0 && <= 3.5 - - websockets >= 0.11.0 && <= 0.13 + - wai-websockets >= 1.0 + - websockets >= 0.11.0 - warp - servant-server - http-media diff --git a/morpheus-graphql-app/morpheus-graphql-app.cabal b/morpheus-graphql-app/morpheus-graphql-app.cabal index f3f1420ae..839d17fd2 100644 --- a/morpheus-graphql-app/morpheus-graphql-app.cabal +++ b/morpheus-graphql-app/morpheus-graphql-app.cabal @@ -161,8 +161,9 @@ library ghc-options: -Wall build-depends: aeson >=1.4.4 && <3.0.0 + , attoparsec-aeson >=2.1.0.0 && <3.0.0 , base >=4.7.0 && <5.0.0 - , bytestring >=0.10.4 && <0.12.0 + , bytestring >=0.10.4 && <0.15.0 , containers >=0.4.2.1 && <0.7.0 , hashable >=1.0.0 && <2.0.0 , megaparsec >=7.0.0 && <10.0.0 @@ -193,8 +194,9 @@ test-suite morpheus-graphql-app-test ghc-options: -Wall build-depends: aeson >=1.4.4 && <3.0.0 + , attoparsec-aeson >=2.1.0.0 && <3.0.0 , base >=4.7.0 && <5.0.0 - , bytestring >=0.10.4 && <0.12.0 + , bytestring >=0.10.4 && <0.15.0 , containers >=0.4.2.1 && <0.7.0 , directory >=1.0.0 && <2.0.0 , hashable >=1.0.0 && <2.0.0 diff --git a/morpheus-graphql-app/package.yaml b/morpheus-graphql-app/package.yaml index c964d42d7..f9989a366 100644 --- a/morpheus-graphql-app/package.yaml +++ b/morpheus-graphql-app/package.yaml @@ -18,8 +18,9 @@ data-files: - test/**/*.json dependencies: - aeson >= 1.4.4 && < 3.0.0 + - attoparsec-aeson >= 2.1.0.0 && < 3.0.0 - base >= 4.7.0 && < 5.0.0 - - bytestring >= 0.10.4 && < 0.12.0 + - bytestring >= 0.10.4 && < 0.15.0 - containers >= 0.4.2.1 && < 0.7.0 - hashable >= 1.0.0 && < 2.0.0 - megaparsec >= 7.0.0 && < 10.0.0 diff --git a/morpheus-graphql-app/src/Data/Morpheus/App/MapAPI.hs b/morpheus-graphql-app/src/Data/Morpheus/App/MapAPI.hs index 020774afd..44ca87771 100644 --- a/morpheus-graphql-app/src/Data/Morpheus/App/MapAPI.hs +++ b/morpheus-graphql-app/src/Data/Morpheus/App/MapAPI.hs @@ -16,9 +16,9 @@ import Data.Aeson.Parser ( eitherDecodeWith, jsonNoDup, ) -#if MIN_VERSION_aeson(2,1,0) +#if MIN_VERSION_aeson(2,1,0) import Data.Aeson.Types ( formatError,ifromJSON,) -#else +#else import Data.Aeson.Internal ( formatError,ifromJSON,) #endif import Data.ByteString.Lazy.Char8 (pack) diff --git a/morpheus-graphql-client/morpheus-graphql-client.cabal b/morpheus-graphql-client/morpheus-graphql-client.cabal index 3be21bd6e..152676d1e 100644 --- a/morpheus-graphql-client/morpheus-graphql-client.cabal +++ b/morpheus-graphql-client/morpheus-graphql-client.cabal @@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.35.0. +-- This file has been generated from package.yaml by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack @@ -89,7 +89,7 @@ library build-depends: aeson >=1.4.4 && <3.0.0 , base >=4.7.0 && <5.0.0 - , bytestring >=0.10.4 && <0.12.0 + , bytestring >=0.10.4 && <0.15.0 , containers >=0.4.2.1 && <0.7.0 , file-embed >=0.0.10 && <1.0.0 , modern-uri >=0.1.0.0 && <1.0.0 @@ -130,7 +130,7 @@ test-suite morpheus-graphql-client-test build-depends: aeson >=1.4.4 && <3.0.0 , base >=4.7.0 && <5.0.0 - , bytestring >=0.10.4 && <0.12.0 + , bytestring >=0.10.4 && <0.15.0 , containers >=0.4.2.1 && <0.7.0 , directory >=1.0.0 && <2.0.0 , file-embed >=0.0.10 && <1.0.0 diff --git a/morpheus-graphql-client/package.yaml b/morpheus-graphql-client/package.yaml index 6d2facf54..0e1e0926b 100644 --- a/morpheus-graphql-client/package.yaml +++ b/morpheus-graphql-client/package.yaml @@ -19,7 +19,7 @@ data-files: dependencies: - aeson >= 1.4.4 && < 3.0.0 - base >= 4.7.0 && < 5.0.0 - - bytestring >= 0.10.4 && < 0.12.0 + - bytestring >= 0.10.4 && < 0.15.0 - containers >= 0.4.2.1 && < 0.7.0 - file-embed >= 0.0.10 && < 1.0.0 - morpheus-graphql-code-gen-utils diff --git a/morpheus-graphql-code-gen-utils/morpheus-graphql-code-gen-utils.cabal b/morpheus-graphql-code-gen-utils/morpheus-graphql-code-gen-utils.cabal index 9cba6ccd9..36972d936 100644 --- a/morpheus-graphql-code-gen-utils/morpheus-graphql-code-gen-utils.cabal +++ b/morpheus-graphql-code-gen-utils/morpheus-graphql-code-gen-utils.cabal @@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.35.0. +-- This file has been generated from package.yaml by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack @@ -40,7 +40,7 @@ library ghc-options: -Wall build-depends: base >=4.7.0 && <5.0.0 - , bytestring >=0.10.4 && <0.12.0 + , bytestring >=0.10.4 && <0.15.0 , containers >=0.4.2.1 && <0.7.0 , morpheus-graphql-core >=0.27.0 && <0.28.0 , mtl >=2.0.0 && <3.0.0 diff --git a/morpheus-graphql-code-gen-utils/package.yaml b/morpheus-graphql-code-gen-utils/package.yaml index e7da48ec2..e1c8634ae 100644 --- a/morpheus-graphql-code-gen-utils/package.yaml +++ b/morpheus-graphql-code-gen-utils/package.yaml @@ -14,7 +14,7 @@ extra-source-files: - changelog.md dependencies: - base >= 4.7.0 && < 5.0.0 - - bytestring >= 0.10.4 && < 0.12.0 + - bytestring >= 0.10.4 && < 0.15.0 - containers >= 0.4.2.1 && < 0.7.0 - morpheus-graphql-core >= 0.27.0 && < 0.28.0 - mtl >= 2.0.0 && < 3.0.0 diff --git a/morpheus-graphql-code-gen/morpheus-graphql-code-gen.cabal b/morpheus-graphql-code-gen/morpheus-graphql-code-gen.cabal index cacc9f3e4..5766d713c 100644 --- a/morpheus-graphql-code-gen/morpheus-graphql-code-gen.cabal +++ b/morpheus-graphql-code-gen/morpheus-graphql-code-gen.cabal @@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.35.0. +-- This file has been generated from package.yaml by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack @@ -41,7 +41,7 @@ library ghc-options: -Wall build-depends: base >=4.7.0 && <5.0.0 - , bytestring >=0.10.4 && <0.12.0 + , bytestring >=0.10.4 && <0.15.0 , containers >=0.4.2.1 && <0.7.0 , file-embed >=0.0.10 && <1.0.0 , morpheus-graphql-code-gen-utils >=0.27.0 && <0.28.0 @@ -68,7 +68,7 @@ executable morpheus build-depends: Glob >=0.7.0 && <1.0.0 , base >=4.7.0 && <5.0.0 - , bytestring >=0.10.4 && <0.12.0 + , bytestring >=0.10.4 && <0.15.0 , containers >=0.4.2.1 && <0.7.0 , file-embed >=0.0.10 && <1.0.0 , filepath >=1.1.0 && <1.5.0 @@ -77,7 +77,7 @@ executable morpheus , morpheus-graphql-code-gen-utils , morpheus-graphql-core >=0.27.0 && <0.28.0 , morpheus-graphql-server >=0.27.0 && <0.28.0 - , optparse-applicative >=0.12.0 && <0.18.0 + , optparse-applicative >=0.12.0 && <0.20.0 , prettyprinter >=1.7.0 && <2.0.0 , relude >=0.3.0 && <2.0.0 , template-haskell >=2.0.0 && <3.0.0 diff --git a/morpheus-graphql-code-gen/package.yaml b/morpheus-graphql-code-gen/package.yaml index af3a79f60..56571b29f 100644 --- a/morpheus-graphql-code-gen/package.yaml +++ b/morpheus-graphql-code-gen/package.yaml @@ -14,7 +14,7 @@ extra-source-files: - changelog.md dependencies: - base >= 4.7.0 && < 5.0.0 - - bytestring >= 0.10.4 && < 0.12.0 + - bytestring >= 0.10.4 && < 0.15.0 - containers >= 0.4.2.1 && < 0.7.0 - file-embed >= 0.0.10 && < 1.0.0 - morpheus-graphql-core >= 0.27.0 && < 0.28.0 @@ -42,5 +42,5 @@ executables: - morpheus-graphql-code-gen - morpheus-graphql-client - morpheus-graphql-code-gen-utils - - optparse-applicative >= 0.12.0 && < 0.18.0 + - optparse-applicative >= 0.12.0 && < 0.20.0 - yaml >= 0.8.32 && < 1.0.0 diff --git a/morpheus-graphql-code-gen/src/Data/Morpheus/CodeGen/Server/Interpreting/Utils.hs b/morpheus-graphql-code-gen/src/Data/Morpheus/CodeGen/Server/Interpreting/Utils.hs index 82a408a0f..03caf0d45 100644 --- a/morpheus-graphql-code-gen/src/Data/Morpheus/CodeGen/Server/Interpreting/Utils.hs +++ b/morpheus-graphql-code-gen/src/Data/Morpheus/CodeGen/Server/Interpreting/Utils.hs @@ -60,14 +60,14 @@ import Language.Haskell.TH ( Dec (..), Info (..), Q, - TyVarBndr, reify, ) +import qualified Language.Haskell.TH as TH import Relude hiding (ByteString, get) class (MonadReader ServerCodeGenContext m, Monad m, MonadFail m, CodeGenMonad m, MonadState Flags m) => CodeGenM m -instance CodeGenMonad m => CodeGenM (CodeGenT ServerCodeGenContext m) +instance (CodeGenMonad m) => CodeGenM (CodeGenT ServerCodeGenContext m) data ServerCodeGenContext = ServerCodeGenContext { toArgsTypeName :: FieldName -> TypeName, @@ -78,17 +78,17 @@ data ServerCodeGenContext = ServerCodeGenContext hasNamespace :: Bool } -checkTypeExistence :: CodeGenM m => TypeName -> m () +checkTypeExistence :: (CodeGenM m) => TypeName -> m () checkTypeExistence name = do exists <- isJust <$> lookupType name if exists then pure () else requireExternal (unpackName name) -getFieldTypeName :: CodeGenM m => TypeName -> m TypeName +getFieldTypeName :: (CodeGenM m) => TypeName -> m TypeName getFieldTypeName name = checkTypeExistence name $> packName (toHaskellTypeName name) -getFieldName :: CodeGenM m => FieldName -> m FieldName +getFieldName :: (CodeGenM m) => FieldName -> m FieldName getFieldName fieldName = do ServerCodeGenContext {hasNamespace, currentTypeName} <- ask pure $ @@ -96,7 +96,7 @@ getFieldName fieldName = do then maybe fieldName (`camelCaseFieldName` fieldName) currentTypeName else fieldName -getEnumName :: MonadReader ServerCodeGenContext m => TypeName -> m CodeGenTypeName +getEnumName :: (MonadReader ServerCodeGenContext m) => TypeName -> m CodeGenTypeName getEnumName enumName = do ServerCodeGenContext {hasNamespace, currentTypeName} <- ask pure $ @@ -108,7 +108,7 @@ class (Monad m, MonadFail m) => CodeGenMonad m where isParametrizedType :: TypeName -> m Bool printWarnings :: [GQLError] -> m () -instance CodeGenMonad m => CodeGenMonad (CodeGenT ctx m) where +instance (CodeGenMonad m) => CodeGenMonad (CodeGenT ctx m) where isParametrizedType = lift . isParametrizedType printWarnings = lift . printWarnings @@ -122,10 +122,12 @@ instance CodeGenMonad GQLResult where -- Utils: is Parametrized type -#if MIN_VERSION_template_haskell(2,17,0) -getTypeVariables :: Dec -> [TyVarBndr ()] +#if MIN_VERSION_template_haskell(2,21,0) +getTypeVariables :: Dec -> [TH.TyVarBndr TH.BndrVis] +#elif MIN_VERSION_template_haskell(2,17,0) +getTypeVariables :: Dec -> [TH.TyVarBndr ()] #else -getTypeVariables :: Dec -> [TyVarBndr] +getTypeVariables :: Dec -> [TH.TyVarBndr] #endif getTypeVariables (DataD _ _ args _ _ _) = args getTypeVariables (NewtypeD _ _ args _ _ _) = args @@ -136,7 +138,7 @@ isParametrizedHaskellType :: Info -> Bool isParametrizedHaskellType (TyConI x) = not $ null $ getTypeVariables x isParametrizedHaskellType _ = False -isParametrizedResolverType :: CodeGenM m => TypeName -> [TypeDefinition ANY s] -> m Bool +isParametrizedResolverType :: (CodeGenM m) => TypeName -> [TypeDefinition ANY s] -> m Bool isParametrizedResolverType "__TypeKind" _ = pure False isParametrizedResolverType "Boolean" _ = pure False isParametrizedResolverType "String" _ = pure False @@ -146,19 +148,19 @@ isParametrizedResolverType name lib = case lookupWith typeName name lib of Just x -> pure (isResolverType x) Nothing -> isParametrizedType name -isParamResolverType :: CodeGenM m => TypeName -> m Bool +isParamResolverType :: (CodeGenM m) => TypeName -> m Bool isParamResolverType typeConName = isParametrizedResolverType typeConName =<< asks typeDefinitions -notFoundError :: MonadFail m => String -> String -> m a +notFoundError :: (MonadFail m) => String -> String -> m a notFoundError name at = fail $ "can't found " <> name <> "at " <> at <> "!" -lookupType :: CodeGenM m => TypeName -> m (Maybe (TypeDefinition ANY CONST)) +lookupType :: (CodeGenM m) => TypeName -> m (Maybe (TypeDefinition ANY CONST)) lookupType name = do types <- asks typeDefinitions pure $ find (\t -> typeName t == name) types -lookupFieldType :: CodeGenM m => TypeName -> FieldName -> m TypeRef +lookupFieldType :: (CodeGenM m) => TypeName -> FieldName -> m TypeRef lookupFieldType name fieldName = do TypeDefinition {typeContent} <- lookupType name >>= maybe (notFoundError (show name) "type definitions") pure case typeContent of @@ -171,5 +173,5 @@ isSubscription :: TypeKind -> Bool isSubscription (KIND_OBJECT (Just OPERATION_SUBSCRIPTION)) = True isSubscription _ = False -inType :: MonadReader ServerCodeGenContext m => Maybe TypeName -> m a -> m a +inType :: (MonadReader ServerCodeGenContext m) => Maybe TypeName -> m a -> m a inType name = local (\x -> x {currentTypeName = name, currentKind = Nothing}) diff --git a/morpheus-graphql-core/morpheus-graphql-core.cabal b/morpheus-graphql-core/morpheus-graphql-core.cabal index e41d1b231..4b6d06d9e 100644 --- a/morpheus-graphql-core/morpheus-graphql-core.cabal +++ b/morpheus-graphql-core/morpheus-graphql-core.cabal @@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.35.0. +-- This file has been generated from package.yaml by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack @@ -241,7 +241,7 @@ library build-depends: aeson >=1.4.4 && <3.0.0 , base >=4.7.0 && <5.0.0 - , bytestring >=0.10.4 && <0.12.0 + , bytestring >=0.10.4 && <0.15.0 , containers >=0.4.2.1 && <0.7.0 , hashable >=1.0.0 && <2.0.0 , megaparsec >=7.0.0 && <10.0.0 @@ -267,7 +267,7 @@ test-suite morpheus-graphql-core-test build-depends: aeson >=1.4.4 && <3.0.0 , base >=4.7.0 && <5.0.0 - , bytestring >=0.10.4 && <0.12.0 + , bytestring >=0.10.4 && <0.15.0 , containers >=0.4.2.1 && <0.7.0 , directory >=1.0.0 && <2.0.0 , hashable >=1.0.0 && <2.0.0 diff --git a/morpheus-graphql-core/package.yaml b/morpheus-graphql-core/package.yaml index 564523cad..21dce3c0d 100644 --- a/morpheus-graphql-core/package.yaml +++ b/morpheus-graphql-core/package.yaml @@ -19,7 +19,7 @@ data-files: dependencies: - aeson >= 1.4.4 && < 3.0.0 - base >= 4.7.0 && < 5.0.0 - - bytestring >= 0.10.4 && < 0.12.0 + - bytestring >= 0.10.4 && < 0.15.0 - containers >= 0.4.2.1 && < 0.7.0 - hashable >= 1.0.0 && < 2.0.0 - megaparsec >= 7.0.0 && < 10.0.0 diff --git a/morpheus-graphql-server/morpheus-graphql-server.cabal b/morpheus-graphql-server/morpheus-graphql-server.cabal index 8dde486a2..2a2b6cb5a 100644 --- a/morpheus-graphql-server/morpheus-graphql-server.cabal +++ b/morpheus-graphql-server/morpheus-graphql-server.cabal @@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.35.0. +-- This file has been generated from package.yaml by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack @@ -358,7 +358,7 @@ library build-depends: aeson >=1.4.4 && <3.0.0 , base >=4.7.0 && <5.0.0 - , bytestring >=0.10.4 && <0.12.0 + , bytestring >=0.10.4 && <0.15.0 , containers >=0.4.2.1 && <0.7.0 , morpheus-graphql-app >=0.27.0 && <0.28.0 , morpheus-graphql-core >=0.27.0 && <0.28.0 @@ -412,7 +412,7 @@ test-suite morpheus-graphql-server-test build-depends: aeson >=1.4.4 && <3.0.0 , base >=4.7.0 && <5.0.0 - , bytestring >=0.10.4 && <0.12.0 + , bytestring >=0.10.4 && <0.15.0 , containers >=0.4.2.1 && <0.7.0 , file-embed >=0.0.10 && <1.0.0 , morpheus-graphql-app >=0.27.0 && <0.28.0 diff --git a/morpheus-graphql-server/package.yaml b/morpheus-graphql-server/package.yaml index f0e0932d6..097a371e0 100644 --- a/morpheus-graphql-server/package.yaml +++ b/morpheus-graphql-server/package.yaml @@ -19,7 +19,7 @@ data-files: dependencies: - aeson >= 1.4.4 && < 3.0.0 - base >= 4.7.0 && < 5.0.0 - - bytestring >= 0.10.4 && < 0.12.0 + - bytestring >= 0.10.4 && < 0.15.0 - containers >= 0.4.2.1 && < 0.7.0 - mtl >= 2.0.0 && < 3.0.0 - morpheus-graphql-core >= 0.27.0 && < 0.28.0 diff --git a/morpheus-graphql-server/test/Spec.hs b/morpheus-graphql-server/test/Spec.hs index e025f3889..e6a95f0cf 100644 --- a/morpheus-graphql-server/test/Spec.hs +++ b/morpheus-graphql-server/test/Spec.hs @@ -6,6 +6,7 @@ module Main ) where +import Data.Aeson (FromJSON, ToJSON) import Data.Morpheus.Server.Types (GQLRequest (..), GQLResponse (..)) import qualified Feature.Collision.CategoryCollisionFail as TypeCategoryCollisionFail import qualified Feature.Collision.CategoryCollisionSuccess as TypeCategoryCollisionSuccess @@ -45,10 +46,10 @@ import Test.Tasty mkFeatureUrl :: FilePath -> FilePath -> FileUrl mkFeatureUrl groupName = cd (cd (mkUrl "Feature") groupName) -testFeature :: FilePath -> (GQLRequest -> IO GQLResponse, FilePath) -> IO TestTree +testFeature :: (FromJSON a, ToJSON b) => FilePath -> (a -> IO b, FilePath) -> IO TestTree testFeature groupName (api, name) = scan (testApi api) (mkFeatureUrl groupName name) -testFeatures :: FilePath -> [(GQLRequest -> IO GQLResponse, FilePath)] -> IO TestTree +testFeatures :: (FromJSON a, ToJSON b) => FilePath -> [(a -> IO b, FilePath)] -> IO TestTree testFeatures name cases = testGroup name <$> traverse diff --git a/morpheus-graphql-subscriptions/morpheus-graphql-subscriptions.cabal b/morpheus-graphql-subscriptions/morpheus-graphql-subscriptions.cabal index 112813be5..1577733ac 100644 --- a/morpheus-graphql-subscriptions/morpheus-graphql-subscriptions.cabal +++ b/morpheus-graphql-subscriptions/morpheus-graphql-subscriptions.cabal @@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.35.0. +-- This file has been generated from package.yaml by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack @@ -42,7 +42,7 @@ library build-depends: aeson >=1.4.4 && <3.0.0 , base >=4.7.0 && <5.0.0 - , bytestring >=0.10.4 && <0.12.0 + , bytestring >=0.10.4 && <0.15.0 , morpheus-graphql-app >=0.27.0 && <0.28.0 , morpheus-graphql-core >=0.27.0 && <0.28.0 , mtl >=2.0.0 && <3.0.0 diff --git a/morpheus-graphql-subscriptions/package.yaml b/morpheus-graphql-subscriptions/package.yaml index af0fe9971..00f2a2149 100644 --- a/morpheus-graphql-subscriptions/package.yaml +++ b/morpheus-graphql-subscriptions/package.yaml @@ -16,7 +16,7 @@ extra-source-files: dependencies: - aeson >= 1.4.4 && < 3.0.0 - base >= 4.7.0 && < 5.0.0 - - bytestring >= 0.10.4 && < 0.12.0 + - bytestring >= 0.10.4 && < 0.15.0 - morpheus-graphql-core >= 0.27.0 && < 0.28.0 - morpheus-graphql-app >= 0.27.0 && < 0.28.0 - mtl >= 2.0.0 && < 3.0.0 diff --git a/morpheus-graphql-tests/morpheus-graphql-tests.cabal b/morpheus-graphql-tests/morpheus-graphql-tests.cabal index 192b10b89..110f3cb70 100644 --- a/morpheus-graphql-tests/morpheus-graphql-tests.cabal +++ b/morpheus-graphql-tests/morpheus-graphql-tests.cabal @@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.35.0. +-- This file has been generated from package.yaml by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack @@ -35,7 +35,7 @@ library build-depends: aeson >=1.4.4 && <3.0.0 , base >=4.7.0 && <5.0.0 - , bytestring >=0.10.4 && <0.12.0 + , bytestring >=0.10.4 && <0.15.0 , directory >=1.0.0 && <2.0.0 , relude >=0.3.0 && <2.0.0 , tasty >=0.1.0 && <1.5.0 diff --git a/morpheus-graphql-tests/package.yaml b/morpheus-graphql-tests/package.yaml index 5b6052ead..9e9b34ad3 100644 --- a/morpheus-graphql-tests/package.yaml +++ b/morpheus-graphql-tests/package.yaml @@ -11,7 +11,7 @@ copyright: (c) 2019 Daviti Nalchevanidze dependencies: - aeson >= 1.4.4 && < 3.0.0 - base >= 4.7.0 && < 5.0.0 - - bytestring >= 0.10.4 && < 0.12.0 + - bytestring >= 0.10.4 && < 0.15.0 - directory >= 1.0.0 && < 2.0.0 - relude >= 0.3.0 && < 2.0.0 - text >= 1.2.3 && < 3.0.0 diff --git a/morpheus-graphql-tests/src/Test/Morpheus/Utils.hs b/morpheus-graphql-tests/src/Test/Morpheus/Utils.hs index 6002af42f..c4129f130 100644 --- a/morpheus-graphql-tests/src/Test/Morpheus/Utils.hs +++ b/morpheus-graphql-tests/src/Test/Morpheus/Utils.hs @@ -40,7 +40,7 @@ import Test.Tasty.HUnit ( assertFailure, ) -readSchemaFile :: ReadSource t => FileUrl -> IO t +readSchemaFile :: (ReadSource t) => FileUrl -> IO t readSchemaFile = readGQL "schema" runCaseTree :: (FileUrl -> [FileUrl] -> [TestTree]) -> CaseTree [FileUrl] -> TestTree @@ -54,7 +54,7 @@ foldCaseTree f CaseTree {caseUrl, children = []} = f caseUrl foldCaseTree f CaseTree {caseUrl = FileUrl {fileName}, children} = testGroup fileName (fmap (foldCaseTree f) children) -recursiveScan :: Monoid assets => (FileUrl -> IO assets) -> FileUrl -> IO (CaseTree assets) +recursiveScan :: (Monoid assets) => (FileUrl -> IO assets) -> FileUrl -> IO (CaseTree assets) recursiveScan scanAssets caseUrl = do dir <- isDirectory caseUrl children <- @@ -100,7 +100,7 @@ getSchema f url = readSchemaFile url >>= assertValidSchema . f -assertValidSchema :: Show err => Either err a -> IO a +assertValidSchema :: (Show err) => Either err a -> IO a assertValidSchema = either ( assertFailure @@ -111,5 +111,5 @@ assertValidSchema = ) pure -getResolver :: FromJSON resolver => FileUrl -> IO resolver +getResolver :: (FromJSON resolver) => FileUrl -> IO resolver getResolver url = readJSON "resolvers" url >>= either fail pure . eitherDecode diff --git a/morpheus-graphql/morpheus-graphql.cabal b/morpheus-graphql/morpheus-graphql.cabal index 1fca961d8..2c2566696 100644 --- a/morpheus-graphql/morpheus-graphql.cabal +++ b/morpheus-graphql/morpheus-graphql.cabal @@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.35.0. +-- This file has been generated from package.yaml by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack @@ -229,8 +229,9 @@ library ghc-options: -Wall build-depends: aeson >=1.4.4 && <3.0.0 + , attoparsec-aeson >=2.1.0.0 && <3.0.0 , base >=4.7.0 && <5.0.0 - , bytestring >=0.10.4 && <0.12.0 + , bytestring >=0.10.4 && <0.15.0 , containers >=0.4.2.1 && <0.7.0 , morpheus-graphql-app >=0.27.0 && <0.28.0 , morpheus-graphql-code-gen >=0.27.0 && <0.28.0 @@ -264,8 +265,9 @@ test-suite morpheus-graphql-test ghc-options: -Wall build-depends: aeson >=1.4.4 && <3.0.0 + , attoparsec-aeson >=2.1.0.0 && <3.0.0 , base >=4.7.0 && <5.0.0 - , bytestring >=0.10.4 && <0.12.0 + , bytestring >=0.10.4 && <0.15.0 , containers >=0.4.2.1 && <0.7.0 , morpheus-graphql , morpheus-graphql-app >=0.27.0 && <0.28.0 diff --git a/morpheus-graphql/package.yaml b/morpheus-graphql/package.yaml index d8e7a01f7..a60f5f1ab 100644 --- a/morpheus-graphql/package.yaml +++ b/morpheus-graphql/package.yaml @@ -18,8 +18,9 @@ data-files: - test/**/*.json dependencies: - aeson >= 1.4.4 && < 3.0.0 + - attoparsec-aeson >= 2.1.0.0 && < 3.0.0 - base >= 4.7.0 && < 5.0.0 - - bytestring >= 0.10.4 && < 0.12.0 + - bytestring >= 0.10.4 && < 0.15.0 - containers >= 0.4.2.1 && < 0.7.0 - mtl >= 2.0.0 && < 3.0.0 - morpheus-graphql-code-gen >= 0.27.0 && < 0.28.0 diff --git a/scripts/lib/utils/file.ts b/scripts/lib/utils/file.ts index 281eb06d8..d041ce4e5 100644 --- a/scripts/lib/utils/file.ts +++ b/scripts/lib/utils/file.ts @@ -4,6 +4,7 @@ import { dirname, join } from "path"; import { dump, load } from "js-yaml"; import { Config, DepsMap } from "../check-packages/types"; import { map } from "ramda"; +import { compareVersion } from "./version"; const ROOT_DIR = join(dirname(require.main?.filename ?? ""), "../"); @@ -36,8 +37,28 @@ export const getConfig = async (): Promise => { }; }; +const compareConfigKeys = (a: string, b: string) => { + try { + return compareVersion(a, b); + } catch { + const x = a.toLowerCase(); + const y = b.toLowerCase(); + if (x < y) { + return -1; + } + if (x > y) { + return 1; + } + return 0; + } +}; + export const writeConfig = (config: Config) => write( STACK_CONFIG_URL, - dump(config, { sortKeys: true, lineWidth: 240, condenseFlow: true }) + dump(config, { + sortKeys: compareConfigKeys, + lineWidth: 240, + condenseFlow: true, + }) ); diff --git a/stack.yaml b/stack.yaml index 1353c873b..20a67509d 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,5 @@ -resolver: lts-19.28 +allow-newer: true +resolver: nightly-2024-04-20 save-hackage-creds: false packages: - examples/client @@ -6,7 +7,6 @@ packages: - examples/code-gen-docs - examples/scotty - examples/scotty-haxl - - examples/scotty-freer-simple - examples/servant - examples/yesod-pubsub - morpheus-graphql-tests @@ -19,8 +19,6 @@ packages: - morpheus-graphql-server - morpheus-graphql extra-deps: - - dependent-map-0.2.4.0 - - dependent-sum-0.4 - fraxl-0.3.0.0 - haxl-2.4.0.0 - type-aligned-0.9.6