diff --git a/Network/Pusher/WebSockets/Internal/Client.hs b/Network/Pusher/WebSockets/Internal/Client.hs
--- a/Network/Pusher/WebSockets/Internal/Client.hs
+++ b/Network/Pusher/WebSockets/Internal/Client.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP               #-}
 {-# LANGUAGE OverloadedStrings #-}
 
 -- |
@@ -143,7 +144,11 @@
   Terminate -> sendClose conn ("goodbye" :: Text)
   where
     -- Send some JSON down the channel.
+#if MIN_VERSION_websockets(0,12,0)
+    sendJSON val = WS.sendDataMessage conn (WS.Text (encode val) Nothing)
+#else
     sendJSON = WS.sendDataMessage conn . WS.Text . encode
+#endif
 
 -- | Throw the appropriate exception for a close code.
 throwCloseException :: Word16 -> IO a
diff --git a/Network/Pusher/WebSockets/Internal/Event.hs b/Network/Pusher/WebSockets/Internal/Event.hs
--- a/Network/Pusher/WebSockets/Internal/Event.hs
+++ b/Network/Pusher/WebSockets/Internal/Event.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP               #-}
 {-# LANGUAGE OverloadedStrings #-}
 
 -- |
@@ -38,7 +39,11 @@
 -- | Block and wait for an event.
 awaitEvent :: Connection -> IO (Either ByteString Value)
 awaitEvent = fmap decode . receiveDataMessage where
+#if MIN_VERSION_websockets(0,12,0)
+  decode (Text bs _) = maybe (Left bs) Right (decode' bs)
+#else
   decode (Text   bs) = maybe (Left bs) Right (decode' bs)
+#endif
   decode (Binary bs) = Left bs
 
 -- | Launch all event handlers which are bound to the current event.
diff --git a/pusher-ws.cabal b/pusher-ws.cabal
--- a/pusher-ws.cabal
+++ b/pusher-ws.cabal
@@ -2,7 +2,7 @@
 -- documentation, see http://haskell.org/cabal/users-guide/
 
 name:                pusher-ws
-version:             0.1.0.1
+version:             0.1.1.0
 synopsis:            Implementation of the Pusher WebSocket protocol
 
 description:
@@ -50,36 +50,37 @@
 source-repository this
   type:     git
   location: https://github.com/barrucadu/pusher-ws.git
-  tag:      pusher-ws-0.1.0.1
+  tag:      pusher-ws-0.1.1.0
 
 library
   exposed-modules:     Network.Pusher.WebSockets
                      , Network.Pusher.WebSockets.Channel
                      , Network.Pusher.WebSockets.Event
                      , Network.Pusher.WebSockets.Util
-  other-modules:       Network.Pusher.WebSockets.Internal
+                     , Network.Pusher.WebSockets.Internal
                      , Network.Pusher.WebSockets.Internal.Client
                      , Network.Pusher.WebSockets.Internal.Event
                      , Paths_pusher_ws
+  -- other-modules:       
   -- other-extensions:    
-  build-depends:       base >=4.8 && <5
-                     , aeson
-                     , bytestring
-                     , containers
-                     , deepseq
-                     , hashable
-                     , http-conduit
-                     , lens
-                     , lens-aeson
-                     , network
-                     , scientific
-                     , stm
-                     , text
-                     , time
-                     , transformers
-                     , unordered-containers
-                     , websockets
-                     , wuss
+  build-depends:       base                 >=4.7  && <5
+                     , aeson                >=0.8  && <1.3
+                     , bytestring           >=0.10 && <0.11
+                     , containers           >=0.5  && <0.6
+                     , deepseq              >=1.4  && <1.5
+                     , hashable             >=1.2  && <1.3
+                     , http-conduit         >=2.1  && <2.3
+                     , lens                 >=4.12 && <4.16
+                     , lens-aeson           >=1.0  && <1.1
+                     , network              >=2.6  && <2.7
+                     , scientific           >=0.3  && <0.4
+                     , stm                  >=2.4  && <2.5
+                     , text                 >=1.2  && <1.3
+                     , time                 >=1.5  && <1.9
+                     , transformers         >=0.4  && <0.6
+                     , unordered-containers >=0.2  && <0.3
+                     , websockets           >=0.9  && <0.13
+                     , wuss                 >=1.0  && <1.2
   -- hs-source-dirs:      
   default-language:    Haskell2010
   ghc-options:         -Wall
