packages feed

greskell-websocket 0.1.2.6 → 1.0.0.0

raw patch · 5 files changed

+23/−14 lines, 5 filesdep ~aesondep ~greskell-coredep ~hashtablesPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: aeson, greskell-core, hashtables

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -1,5 +1,13 @@ # Revision history for greskell-websocket +## 1.0.0.0  -- 2021-12-28++* **BREAKING CHANGE**: Now greskell-websocket uses `aeson-2`.+  As a result, now implementation of `Data.Aeson.Object` has been changed from `HashMap` to `KeyMap`.+  Some types in greskell-websocket (e.g. `ResponseResult`) directly uses the `Object` type.++* Confirm test with `aeson-2.0.2.0`, `hashtables-1.3`, `greskell-core-1.0`.+ ## 0.1.2.6  -- 2021-11-08  * Confirm test with `base-4.15.0.0`
greskell-websocket.cabal view
@@ -1,5 +1,5 @@ name:                   greskell-websocket-version:                0.1.2.6+version:                1.0.0.0 author:                 Toshio Ito <debug.ito@gmail.com> maintainer:             Toshio Ito <debug.ito@gmail.com> license:                BSD3@@ -44,17 +44,17 @@                         Network.Greskell.WebSocket.Client.Impl,                         Network.Greskell.WebSocket.Util   build-depends:        base >=4.9.1.0 && <4.16,-                        greskell-core >=0.1.2.0 && <0.2,+                        greskell-core >=0.1.2.0 && <1.1,                         bytestring >=0.10.8.1 && <0.11,                         base64-bytestring >=1.0.0.1 && <1.3,                         text >=1.2.2.2 && <1.3,-                        aeson >=1.1.2.0 && <1.6,+                        aeson >=2.0.2.0 && <2.1,                         unordered-containers >=0.2.8 && <0.3,                         uuid >=1.3.13 && <1.4,                         async >=2.1.1.1 && <2.3,                         stm >=2.4.4.1 && <2.6,                         websockets >=0.10 && <0.13,-                        hashtables >=1.2.2.1 && <1.3,+                        hashtables >=1.2.2.1 && <1.4,                         safe-exceptions >=0.1.6 && <0.2,                         vector >=0.12.0.1 && <0.13 
test/Network/Greskell/WebSocket/Codec/JSONSpec.hs view
@@ -5,6 +5,7 @@ import Control.Monad (forM_) import Data.Aeson (Value(Null, Number), (.=)) import qualified Data.Aeson as A+import qualified Data.Aeson.KeyMap as KM import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as BSL import Data.Greskell.GraphSON@@ -88,13 +89,13 @@                                        meta = mempty                                      }         exp_v1 = nonTypedGValue $ GArray $ V.fromList-                 [ nonTypedGValue $ GObject $ HM.fromList+                 [ nonTypedGValue $ GObject $ KM.fromList                    [ ("id", nonTypedGValue $ GNumber 1),                      ("label", nonTypedGValue $ GString "person"),                      ("type", nonTypedGValue $ GString "vertex")                    ]                   ]-        exp_typed_vertex = typedGValue' "g:Vertex" $ GObject $ HM.fromList+        exp_typed_vertex = typedGValue' "g:Vertex" $ GObject $ KM.fromList                            [ ("id", typedGValue' "g:Int32" $ GNumber 1),                              ("label", nonTypedGValue $ GString "person")                            ]@@ -136,7 +137,7 @@     $ OpEval       { batchSize = Nothing,         gremlin = "g.V(x)",-        bindings = Just $ HM.fromList [("x", Number 1)],+        bindings = Just $ KM.fromList [("x", Number 1)],         language = Just "gremlin-groovy",         aliases = Nothing,         scriptEvaluationTimeout = Nothing@@ -145,7 +146,7 @@     $ OpEval       { batchSize = Nothing,         gremlin = "social.V(x)",-        bindings = Just $ HM.fromList [("x", Number 1)],+        bindings = Just $ KM.fromList [("x", Number 1)],         language = Just "gremlin-groovy",         aliases = Just $ HM.fromList [("g", "social")],         scriptEvaluationTimeout = Nothing@@ -154,7 +155,7 @@     $ S.OpEval       { S.batchSize = Nothing,         S.gremlin = "g.V(x)",-        S.bindings = Just $ HM.fromList [("x", Number 1)],+        S.bindings = Just $ KM.fromList [("x", Number 1)],         S.language = Just "gremlin-groovy",         S.aliases = Nothing,         S.scriptEvaluationTimeout = Nothing,@@ -165,7 +166,7 @@     $ S.OpEval       { S.batchSize = Nothing,         S.gremlin = "social.V(x)",-        S.bindings = Just $ HM.fromList [("x", Number 1)],+        S.bindings = Just $ KM.fromList [("x", Number 1)],         S.language = Just "gremlin-groovy",         S.aliases = Just $ HM.fromList [("g", "social")],         S.scriptEvaluationTimeout = Nothing,
test/ServerTest/Client.hs view
@@ -6,8 +6,8 @@ import Control.Exception.Safe (bracket) import Control.Monad (forM_) import Data.Aeson (Value(Number))+import qualified Data.Aeson.KeyMap as KM import Data.HashMap.Strict (HashMap)-import qualified Data.HashMap.Strict as HM import Data.Maybe (isNothing, isJust, fromJust) import Data.Text (Text) import qualified Data.Vector as V@@ -89,7 +89,7 @@   specify "eval (bound Double)" $ withClient $ \client -> do     let gx = G.unsafeGreskell "x"         g = 92.125 + gx :: Greskell Double-        b = HM.fromList [("x", Number 22.25)]+        b = KM.fromList [("x", Number 22.25)]     rh <- submit client g (Just b)     slurpResults rh `shouldReturn` V.fromList [114.375]   specify "multiple response messages" $ \(host, port) -> do
test/ServerTest/Connection.hs view
@@ -13,10 +13,10 @@ import Data.Aeson (Value(Number), FromJSON(..), ToJSON(toJSON), Object) import qualified Data.Aeson as Aeson import qualified Data.Aeson.Types as Aeson (parseEither)+import qualified Data.Aeson.KeyMap as KM import qualified Data.ByteString.Lazy as BSL import Data.Maybe (isNothing, isJust, fromJust) import Data.Monoid ((<>))-import qualified Data.HashMap.Strict as HM import Data.Greskell.GraphSON (GraphSON, gsonValue) import Data.Text (Text, pack) import qualified Data.Vector as V@@ -142,7 +142,7 @@   specify "continuous response with bindings" $ withConn $ \conn -> do     rid <- nextRandom     let op = (opEval "x") { batchSize = Just 2,-                            bindings = Just $ HM.fromList [("x", toJSON ([1 .. 10] :: [Int]))]+                            bindings = Just $ KM.fromList [("x", toJSON ([1 .. 10] :: [Int]))]                           }         exp_vals :: [Either String [Int]]         exp_vals = map Right [[1,2], [3,4], [5,6], [7,8], [9,10]]