Merge pull request #1746 from yesodweb/enable-new-nightly
Enable new nightly
This commit is contained in:
commit
5bd872be02
1
.github/workflows/tests.yml
vendored
1
.github/workflows/tests.yml
vendored
@ -16,6 +16,7 @@ jobs:
|
|||||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
args:
|
args:
|
||||||
#- "--resolver nightly"
|
#- "--resolver nightly"
|
||||||
|
- "--resolver nightly-2022-02-11"
|
||||||
- "--resolver lts-18"
|
- "--resolver lts-18"
|
||||||
- "--resolver lts-16"
|
- "--resolver lts-16"
|
||||||
- "--resolver lts-14"
|
- "--resolver lts-14"
|
||||||
|
|||||||
@ -1,5 +1,9 @@
|
|||||||
# ChangeLog for yesod-auth-oauth
|
# ChangeLog for yesod-auth-oauth
|
||||||
|
|
||||||
|
## 1.6.1
|
||||||
|
|
||||||
|
* Allow newer GHC
|
||||||
|
|
||||||
## 1.6.0.3
|
## 1.6.0.3
|
||||||
|
|
||||||
* Allow yesod-form 1.7
|
* Allow yesod-form 1.7
|
||||||
|
|||||||
@ -18,7 +18,6 @@ import Control.Applicative as A ((<$>), (<*>))
|
|||||||
import Control.Arrow ((***))
|
import Control.Arrow ((***))
|
||||||
import UnliftIO.Exception
|
import UnliftIO.Exception
|
||||||
import Control.Monad.IO.Class
|
import Control.Monad.IO.Class
|
||||||
import UnliftIO (MonadUnliftIO)
|
|
||||||
import Data.ByteString (ByteString)
|
import Data.ByteString (ByteString)
|
||||||
import Data.Maybe
|
import Data.Maybe
|
||||||
import Data.Text (Text)
|
import Data.Text (Text)
|
||||||
@ -53,14 +52,9 @@ authOAuth oauth mkCreds = AuthPlugin name dispatch login
|
|||||||
oauthSessionName = "__oauth_token_secret"
|
oauthSessionName = "__oauth_token_secret"
|
||||||
|
|
||||||
dispatch
|
dispatch
|
||||||
:: ( MonadHandler m
|
:: Text
|
||||||
, master ~ HandlerSite m
|
|
||||||
, Auth ~ SubHandlerSite m
|
|
||||||
, MonadUnliftIO m
|
|
||||||
)
|
|
||||||
=> Text
|
|
||||||
-> [Text]
|
-> [Text]
|
||||||
-> m TypedContent
|
-> AuthHandler master TypedContent
|
||||||
dispatch "GET" ["forward"] = do
|
dispatch "GET" ["forward"] = do
|
||||||
render <- getUrlRender
|
render <- getUrlRender
|
||||||
tm <- getRouteToParent
|
tm <- getRouteToParent
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
cabal-version: >= 1.10
|
cabal-version: >= 1.10
|
||||||
name: yesod-auth-oauth
|
name: yesod-auth-oauth
|
||||||
version: 1.6.0.3
|
version: 1.6.1
|
||||||
license: BSD3
|
license: BSD3
|
||||||
license-file: LICENSE
|
license-file: LICENSE
|
||||||
author: Hiromi Ishii
|
author: Hiromi Ishii
|
||||||
@ -15,7 +15,7 @@ extra-source-files: README.md ChangeLog.md
|
|||||||
|
|
||||||
library
|
library
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
build-depends: authenticate-oauth >= 1.5 && < 1.7
|
build-depends: authenticate-oauth >= 1.5 && < 1.8
|
||||||
, base >= 4.10 && < 5
|
, base >= 4.10 && < 5
|
||||||
, bytestring >= 0.9.1.4
|
, bytestring >= 0.9.1.4
|
||||||
, text >= 0.7
|
, text >= 0.7
|
||||||
|
|||||||
@ -1,5 +1,13 @@
|
|||||||
# ChangeLog for yesod-auth
|
# ChangeLog for yesod-auth
|
||||||
|
|
||||||
|
## 1.6.11
|
||||||
|
|
||||||
|
* Add support for aeson 2
|
||||||
|
|
||||||
|
## 1.6.10.5
|
||||||
|
|
||||||
|
* Fix German translations of AuthMessage [#1741](https://github.com/yesodweb/yesod/pull/1741)
|
||||||
|
|
||||||
## 1.6.10.4
|
## 1.6.10.4
|
||||||
|
|
||||||
* Add support for GHC 9 [#1737](https://github.com/yesodweb/yesod/pull/1737)
|
* Add support for GHC 9 [#1737](https://github.com/yesodweb/yesod/pull/1737)
|
||||||
|
|||||||
@ -52,7 +52,6 @@ import Control.Monad.Trans.Maybe
|
|||||||
import UnliftIO (withRunInIO, MonadUnliftIO)
|
import UnliftIO (withRunInIO, MonadUnliftIO)
|
||||||
|
|
||||||
import Yesod.Auth.Routes
|
import Yesod.Auth.Routes
|
||||||
import Data.Aeson hiding (json)
|
|
||||||
import Data.Text.Encoding (decodeUtf8With)
|
import Data.Text.Encoding (decodeUtf8With)
|
||||||
import Data.Text.Encoding.Error (lenientDecode)
|
import Data.Text.Encoding.Error (lenientDecode)
|
||||||
import Data.Text (Text)
|
import Data.Text (Text)
|
||||||
@ -452,7 +451,7 @@ $nothing
|
|||||||
<p>Not logged in.
|
<p>Not logged in.
|
||||||
|]
|
|]
|
||||||
jsonCreds creds =
|
jsonCreds creds =
|
||||||
Object $ Map.fromList
|
toJSON $ Map.fromList
|
||||||
[ (T.pack "logged_in", Bool $ maybe False (const True) creds)
|
[ (T.pack "logged_in", Bool $ maybe False (const True) creds)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@ -87,7 +87,6 @@ import Data.Aeson.Types (FromJSON (parseJSON), parseEither,
|
|||||||
parseMaybe, withObject, withText)
|
parseMaybe, withObject, withText)
|
||||||
import Data.Conduit
|
import Data.Conduit
|
||||||
import Data.Conduit.Attoparsec (sinkParser)
|
import Data.Conduit.Attoparsec (sinkParser)
|
||||||
import qualified Data.HashMap.Strict as M
|
|
||||||
import Data.Maybe (fromMaybe)
|
import Data.Maybe (fromMaybe)
|
||||||
import Data.Monoid (mappend)
|
import Data.Monoid (mappend)
|
||||||
import Data.Text (Text)
|
import Data.Text (Text)
|
||||||
@ -103,6 +102,13 @@ import Network.HTTP.Conduit (http)
|
|||||||
import Network.HTTP.Types (renderQueryText)
|
import Network.HTTP.Types (renderQueryText)
|
||||||
import System.IO.Unsafe (unsafePerformIO)
|
import System.IO.Unsafe (unsafePerformIO)
|
||||||
|
|
||||||
|
#if MIN_VERSION_aeson(2, 0, 0)
|
||||||
|
import qualified Data.Aeson.Key
|
||||||
|
import qualified Data.Aeson.KeyMap
|
||||||
|
#else
|
||||||
|
import qualified Data.HashMap.Strict as M
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
-- | Plugin identifier. This is used to identify the plugin used for
|
-- | Plugin identifier. This is used to identify the plugin used for
|
||||||
-- authentication. The 'credsPlugin' will contain this value when this
|
-- authentication. The 'credsPlugin' will contain this value when this
|
||||||
@ -587,9 +593,19 @@ instance FromJSON EmailType where
|
|||||||
_ -> EmailType t
|
_ -> EmailType t
|
||||||
|
|
||||||
allPersonInfo :: A.Value -> [(Text, Text)]
|
allPersonInfo :: A.Value -> [(Text, Text)]
|
||||||
allPersonInfo (A.Object o) = map enc $ M.toList o
|
allPersonInfo (A.Object o) = map enc $ mapToList o
|
||||||
where enc (key, A.String s) = (key, s)
|
where
|
||||||
enc (key, v) = (key, TL.toStrict $ TL.toLazyText $ A.encodeToTextBuilder v)
|
enc (key, A.String s) = (keyToText key, s)
|
||||||
|
enc (key, v) = (keyToText key, TL.toStrict $ TL.toLazyText $ A.encodeToTextBuilder v)
|
||||||
|
|
||||||
|
#if MIN_VERSION_aeson(2, 0, 0)
|
||||||
|
keyToText = Data.Aeson.Key.toText
|
||||||
|
mapToList = Data.Aeson.KeyMap.toList
|
||||||
|
#else
|
||||||
|
keyToText = id
|
||||||
|
mapToList = M.toList
|
||||||
|
#endif
|
||||||
|
|
||||||
allPersonInfo _ = []
|
allPersonInfo _ = []
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
cabal-version: >=1.10
|
cabal-version: >=1.10
|
||||||
name: yesod-auth
|
name: yesod-auth
|
||||||
version: 1.6.10.4
|
version: 1.6.11
|
||||||
license: MIT
|
license: MIT
|
||||||
license-file: LICENSE
|
license-file: LICENSE
|
||||||
author: Michael Snoyman, Patrick Brisbin
|
author: Michael Snoyman, Patrick Brisbin
|
||||||
|
|||||||
@ -1,5 +1,9 @@
|
|||||||
# ChangeLog for yesod-bin
|
# ChangeLog for yesod-bin
|
||||||
|
|
||||||
|
## 1.6.2
|
||||||
|
|
||||||
|
* aeson 2.0
|
||||||
|
|
||||||
## 1.6.1
|
## 1.6.1
|
||||||
|
|
||||||
Added command line options `cert` and `key` to allow TLS certificate and key files to be passed to `yesod devel` [#1717](https://github.com/yesodweb/yesod/pull/1717)
|
Added command line options `cert` and `key` to allow TLS certificate and key files to be passed to `yesod devel` [#1717](https://github.com/yesodweb/yesod/pull/1717)
|
||||||
|
|||||||
@ -1,10 +1,16 @@
|
|||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
|
{-# LANGUAGE CPP #-}
|
||||||
module Keter
|
module Keter
|
||||||
( keter
|
( keter
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Data.Yaml
|
import Data.Yaml
|
||||||
|
|
||||||
|
#if MIN_VERSION_aeson(2, 0, 0)
|
||||||
|
import qualified Data.Aeson.KeyMap as Map
|
||||||
|
#else
|
||||||
import qualified Data.HashMap.Strict as Map
|
import qualified Data.HashMap.Strict as Map
|
||||||
|
#endif
|
||||||
import qualified Data.Text as T
|
import qualified Data.Text as T
|
||||||
import System.Environment (getEnvironment)
|
import System.Environment (getEnvironment)
|
||||||
import System.Exit
|
import System.Exit
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
name: yesod-bin
|
name: yesod-bin
|
||||||
version: 1.6.1
|
version: 1.6.2
|
||||||
license: MIT
|
license: MIT
|
||||||
license-file: LICENSE
|
license-file: LICENSE
|
||||||
author: Michael Snoyman <michael@snoyman.com>
|
author: Michael Snoyman <michael@snoyman.com>
|
||||||
@ -61,6 +61,7 @@ executable yesod
|
|||||||
, warp-tls >= 3.0.1
|
, warp-tls >= 3.0.1
|
||||||
, yaml >= 0.8 && < 0.12
|
, yaml >= 0.8 && < 0.12
|
||||||
, zlib >= 0.5
|
, zlib >= 0.5
|
||||||
|
, aeson
|
||||||
|
|
||||||
ghc-options: -Wall -threaded -rtsopts
|
ghc-options: -Wall -threaded -rtsopts
|
||||||
main-is: main.hs
|
main-is: main.hs
|
||||||
|
|||||||
@ -1,5 +1,9 @@
|
|||||||
# ChangeLog for yesod
|
# ChangeLog for yesod
|
||||||
|
|
||||||
|
## 1.6.2
|
||||||
|
|
||||||
|
* aeson 2
|
||||||
|
|
||||||
## 1.6.1.2
|
## 1.6.1.2
|
||||||
|
|
||||||
* Fix compatibility with template-haskell 2.17 [#1730](https://github.com/yesodweb/yesod/pull/1730)
|
* Fix compatibility with template-haskell 2.17 [#1730](https://github.com/yesodweb/yesod/pull/1730)
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
{-# LANGUAGE CPP #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{-# LANGUAGE PatternGuards #-}
|
{-# LANGUAGE PatternGuards #-}
|
||||||
module Yesod.Default.Config
|
module Yesod.Default.Config
|
||||||
@ -19,12 +20,17 @@ import Data.Text (Text)
|
|||||||
import qualified Data.Text as T
|
import qualified Data.Text as T
|
||||||
import Data.Yaml
|
import Data.Yaml
|
||||||
import Data.Maybe (fromMaybe)
|
import Data.Maybe (fromMaybe)
|
||||||
import qualified Data.HashMap.Strict as M
|
|
||||||
import System.Environment (getArgs, getProgName, getEnvironment)
|
import System.Environment (getArgs, getProgName, getEnvironment)
|
||||||
import System.Exit (exitFailure)
|
import System.Exit (exitFailure)
|
||||||
import Data.Streaming.Network (HostPreference)
|
import Data.Streaming.Network (HostPreference)
|
||||||
import Data.String (fromString)
|
import Data.String (fromString)
|
||||||
|
|
||||||
|
#if MIN_VERSION_aeson(2, 0, 0)
|
||||||
|
import qualified Data.Aeson.KeyMap as M
|
||||||
|
#else
|
||||||
|
import qualified Data.HashMap.Strict as M
|
||||||
|
#endif
|
||||||
|
|
||||||
-- | A yesod-provided @'AppEnv'@, allows for Development, Testing, and
|
-- | A yesod-provided @'AppEnv'@, allows for Development, Testing, and
|
||||||
-- Production environments
|
-- Production environments
|
||||||
data DefaultEnv = Development
|
data DefaultEnv = Development
|
||||||
@ -143,7 +149,7 @@ configSettings env0 = ConfigSettings
|
|||||||
Object obj -> return obj
|
Object obj -> return obj
|
||||||
_ -> fail "Expected Object"
|
_ -> fail "Expected Object"
|
||||||
let senv = show env
|
let senv = show env
|
||||||
tenv = T.pack senv
|
tenv = fromString senv
|
||||||
maybe
|
maybe
|
||||||
(error $ "Could not find environment: " ++ senv)
|
(error $ "Could not find environment: " ++ senv)
|
||||||
return
|
return
|
||||||
@ -237,5 +243,5 @@ withYamlEnvironment fp env f = do
|
|||||||
Left err ->
|
Left err ->
|
||||||
fail $ "Invalid YAML file: " ++ show fp ++ " " ++ prettyPrintParseException err
|
fail $ "Invalid YAML file: " ++ show fp ++ " " ++ prettyPrintParseException err
|
||||||
Right (Object obj)
|
Right (Object obj)
|
||||||
| Just v <- M.lookup (T.pack $ show env) obj -> parseMonad f v
|
| Just v <- M.lookup (fromString $ show env) obj -> parseMonad f v
|
||||||
_ -> fail $ "Could not find environment: " ++ show env
|
_ -> fail $ "Could not find environment: " ++ show env
|
||||||
|
|||||||
@ -30,7 +30,6 @@ import Data.Yaml.Config
|
|||||||
|
|
||||||
import Data.Semigroup
|
import Data.Semigroup
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
import qualified Data.HashMap.Strict as H
|
|
||||||
import System.Environment (getEnvironment)
|
import System.Environment (getEnvironment)
|
||||||
import Network.Wai (Application)
|
import Network.Wai (Application)
|
||||||
import Network.Wai.Handler.Warp
|
import Network.Wai.Handler.Warp
|
||||||
@ -43,6 +42,12 @@ import Network.Wai.Logger (clockDateCacher)
|
|||||||
import Yesod.Core.Types (Logger (Logger))
|
import Yesod.Core.Types (Logger (Logger))
|
||||||
import System.Log.FastLogger (LoggerSet)
|
import System.Log.FastLogger (LoggerSet)
|
||||||
|
|
||||||
|
#if MIN_VERSION_aeson(2, 0, 0)
|
||||||
|
import qualified Data.Aeson.KeyMap as H
|
||||||
|
#else
|
||||||
|
import qualified Data.HashMap.Strict as H
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef mingw32_HOST_OS
|
#ifndef mingw32_HOST_OS
|
||||||
import System.Posix.Signals (installHandler, sigINT, Handler(Catch))
|
import System.Posix.Signals (installHandler, sigINT, Handler(Catch))
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
name: yesod
|
name: yesod
|
||||||
version: 1.6.1.2
|
version: 1.6.2
|
||||||
license: MIT
|
license: MIT
|
||||||
license-file: LICENSE
|
license-file: LICENSE
|
||||||
author: Michael Snoyman <michael@snoyman.com>
|
author: Michael Snoyman <michael@snoyman.com>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user