diff --git a/yesod-auth/yesod-auth.cabal b/yesod-auth/yesod-auth.cabal index a5a40dd3..2f32c9d9 100644 --- a/yesod-auth/yesod-auth.cabal +++ b/yesod-auth/yesod-auth.cabal @@ -1,5 +1,5 @@ name: yesod-auth -version: 1.3.4.2 +version: 1.3.4.3 license: MIT license-file: LICENSE author: Michael Snoyman, Patrick Brisbin diff --git a/yesod-bin/yesod-bin.cabal b/yesod-bin/yesod-bin.cabal index 421d5f82..5b367d7f 100644 --- a/yesod-bin/yesod-bin.cabal +++ b/yesod-bin/yesod-bin.cabal @@ -1,5 +1,5 @@ name: yesod-bin -version: 1.2.12.4 +version: 1.2.12.5 license: MIT license-file: LICENSE author: Michael Snoyman @@ -78,7 +78,7 @@ executable yesod , fsnotify >= 0.0 && < 0.2 , split >= 0.2 && < 0.3 , file-embed - , conduit >= 0.5 && < 1.2 + , conduit >= 0.5 && < 1.3 , conduit-extra , resourcet >= 0.3 && < 1.2 , base64-bytestring diff --git a/yesod-core/Yesod/Core/Content.hs b/yesod-core/Yesod/Core/Content.hs index 61974027..fa12f7f6 100644 --- a/yesod-core/Yesod/Core/Content.hs +++ b/yesod-core/Yesod/Core/Content.hs @@ -63,6 +63,9 @@ import Text.Blaze.Html.Renderer.Utf8 (renderHtmlBuilder) import Data.Conduit (Source, Flush (Chunk), ResumableSource, mapOutput) import Control.Monad.Trans.Resource (ResourceT) import Data.Conduit.Internal (ResumableSource (ResumableSource)) +#if MIN_VERSION_conduit(1, 2, 0) +import qualified Data.Conduit.Internal as CI +#endif import qualified Data.Aeson as J import Data.Aeson.Encode (fromValue) @@ -115,6 +118,11 @@ instance ToContent Css where instance ToContent Javascript where toContent = toContent . toLazyText . unJavascript +#if MIN_VERSION_conduit(1, 2, 0) +instance ToFlushBuilder builder => ToContent (CI.Pipe () () builder () (ResourceT IO) ()) where + toContent src = ContentSource $ CI.ConduitM (CI.mapOutput toFlushBuilder src >>=) +#endif + instance ToFlushBuilder builder => ToContent (Source (ResourceT IO) builder) where toContent src = ContentSource $ mapOutput toFlushBuilder src instance ToFlushBuilder builder => ToContent (ResumableSource (ResourceT IO) builder) where diff --git a/yesod-core/yesod-core.cabal b/yesod-core/yesod-core.cabal index f518d9b8..b1fb9bea 100644 --- a/yesod-core/yesod-core.cabal +++ b/yesod-core/yesod-core.cabal @@ -1,5 +1,5 @@ name: yesod-core -version: 1.2.19.1 +version: 1.2.19.2 license: MIT license-file: LICENSE author: Michael Snoyman diff --git a/yesod-eventsource/yesod-eventsource.cabal b/yesod-eventsource/yesod-eventsource.cabal index 9ff36ad7..ecdcddd3 100644 --- a/yesod-eventsource/yesod-eventsource.cabal +++ b/yesod-eventsource/yesod-eventsource.cabal @@ -1,5 +1,5 @@ name: yesod-eventsource -version: 1.1.1 +version: 1.1.1.1 license: MIT license-file: LICENSE author: Felipe Lessa diff --git a/yesod-form/yesod-form.cabal b/yesod-form/yesod-form.cabal index 29ff0719..3c7c34c8 100644 --- a/yesod-form/yesod-form.cabal +++ b/yesod-form/yesod-form.cabal @@ -1,5 +1,5 @@ name: yesod-form -version: 1.3.15.2 +version: 1.3.15.3 license: MIT license-file: LICENSE author: Michael Snoyman diff --git a/yesod-persistent/test/Yesod/PersistSpec.hs b/yesod-persistent/test/Yesod/PersistSpec.hs index 58cdb2c4..c1d5eb59 100644 --- a/yesod-persistent/test/Yesod/PersistSpec.hs +++ b/yesod-persistent/test/Yesod/PersistSpec.hs @@ -1,6 +1,7 @@ {-# LANGUAGE OverloadedStrings, TemplateHaskell, QuasiQuotes, TypeFamilies #-} {-# LANGUAGE EmptyDataDecls, FlexibleContexts, GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} +{-# LANGUAGE CPP #-} module Yesod.PersistSpec where import Test.Hspec @@ -28,7 +29,11 @@ mkYesod "App" [parseRoutes| instance Yesod App instance YesodPersist App where +#if MIN_VERSION_persistent(2, 0, 0) type YesodPersistBackend App = SqlBackend +#else + type YesodPersistBackend App = SqlPersistT +#endif runDB = defaultRunDB appConfig appPool instance YesodPersistRunner App where getDBRunner = defaultGetDBRunner appPool diff --git a/yesod-persistent/yesod-persistent.cabal b/yesod-persistent/yesod-persistent.cabal index a6ce68f7..b116f3a9 100644 --- a/yesod-persistent/yesod-persistent.cabal +++ b/yesod-persistent/yesod-persistent.cabal @@ -1,5 +1,5 @@ name: yesod-persistent -version: 1.2.3 +version: 1.2.3.1 license: MIT license-file: LICENSE author: Michael Snoyman