Commit Graph

918 Commits

Author SHA1 Message Date
Steve Hart
ee41ae000e Update changelog 2022-01-19 10:26:41 -05:00
Steve Hart
6b164c6007 Add missing documentation to 'warp' 2022-01-19 10:18:12 -05:00
Georgi Lyubenov
1f52a39aa2 Export defaultGen 2021-07-22 14:54:58 +03:00
Michael Snoyman
9edbc05827
Version bump for #1729 2021-06-27 12:19:01 +03:00
Felix Yan
a1e18c5b68
Fix compatibility with template-haskell 2.17 2021-06-25 10:54:55 +08:00
Tom Sydney Kerckhove
2d0dab20a6 minor version bump and changelog entry 2021-05-21 17:09:10 +02:00
Tom Sydney Kerckhove
0db056534c breadcrumbs: guard refactor 2021-05-21 08:41:42 +02:00
Tom Sydney Kerckhove
884d937792 use ++ instead of <> to fix the build 2021-05-20 16:00:55 +02:00
Tom Sydney Kerckhove
59ef730317 yesod-core: refactor the loop detector to not use Just wrapping 2021-05-20 14:28:09 +02:00
Tom Sydney Kerckhove
96a940b60c yesod-core: test for looping breadcrumbs 2021-05-20 14:25:17 +02:00
Tom Sydney Kerckhove
d981c87c39 yesod-core: detect loops in breadcrumbs 2021-05-17 20:40:09 +02:00
Hypercube
1cb0fc579c Change version number 2021-05-11 14:03:51 +08:00
Hypercube
5deabe53e8 Update changelog 2021-05-11 11:35:59 +08:00
Hypercube
b6215582d8 Use secure entropy source to generate CSRF tokens 2021-05-11 11:32:07 +08:00
patrick brisbin
0c2a4ebc81
Bump minor, not patch 2021-04-08 10:07:18 -04:00
patrick brisbin
7875930c43
Version bump 2021-04-08 09:53:58 -04:00
patrick brisbin
dc2d5d9cd0
Stop moving session language ahead of reqLangs
Yesod.Core.Handler.languages checks first for a language set in the
user's session, prepending that value to YesodRequest{reqLangs}, so it
is respected above all else if present.

For context, reqLangs itself also includes the session, but just later
in line:

    langs' = catMaybes [ lookup langKey gets -- Query _LANG
                       , lookup langKey cookies     -- Cookie _LANG
                       , lookupText langKey session -- Session _LANG
                       ] ++ langs                    -- Accept-Language(s)

In #1720, it was raised that allowing the session (something implicitly
present for any request) to override a query parameter (something
explicitly given on that request) is surprising.

We decided (without knowing what order reqLangs was doing) that query,
cookie, session, accept was best and languages should be changed to do
that. Conveniently, this just makes languages equivalent to reqLangs, so
that is what this patch does.
2021-04-08 09:34:38 -04:00
Michael Snoyman
f52291d2c9
Forgot to update cabal file 2020-12-14 11:30:14 +02:00
Michael Snoyman
e4cd44a4c7
Fix test suite for latest wai-extra (fixes #1711) 2020-12-14 11:29:11 +02:00
Eric Ahlberg
fd049ec3b0 Update changelog 2020-11-18 19:37:39 +01:00
Eric Ahlberg
13039e567f Bump version 2020-11-18 19:28:36 +01:00
Eric Ahlberg
62479374cf Use property attribute instead of name 2020-11-18 19:22:17 +01:00
Jeff Happily
29bb2053fd
Bump version and update changelog 2020-11-08 18:32:33 +08:00
Jeff Happily
de375e26de
Replace HandlerT with HandlerFor in the documentation 2020-11-08 10:55:01 +08:00
Maximilian Tagher
24061e18bd .. 2020-10-06 10:41:53 -04:00
Maximilian Tagher
067914aac0 Document ErrorResponse 2020-10-06 10:41:03 -04:00
Michael Snoyman
de45bc0d27
Appease Hackage 2020-09-22 17:37:55 +03:00
Michael Snoyman
f6ac2b1d3a
Fix filepath in cabal file 2020-09-22 17:32:37 +03:00
d86leader
22c59207c1 Update changelog and version 2020-09-22 15:59:18 +07:00
d86leader
e3528ad85d Add test for regression of mkYesod 2020-09-22 15:41:45 +07:00
d86leader
4c4584fde8 Fix incorrect code generation for polymorphic datatypes 2020-09-22 15:33:43 +07:00
d86leader
62b418a801 Add tests for mkYesod with polymorphic datatypes 2020-09-22 15:33:34 +07:00
Maximilian Tagher
6e5fa23dc2 .. 2020-09-20 16:57:01 -04:00
Maximilian Tagher
f0db028ec0 .. 2020-09-20 16:54:44 -04:00
Maximilian Tagher
30f189a48c Remove GHandler from handlerToIO docs 2020-09-20 16:50:16 -04:00
Maximilian Tagher
77e6c3e7c2
Recommend .yesodroutes file extension (#1686)
* Recommend .yesodroutes file extension

Closes https://github.com/yesodweb/yesod/issues/1685

* ..
2020-07-26 17:08:39 +03:00
Michael Snoyman
98afc13e92
Allow random 1.2 2020-06-24 10:34:43 +03:00
Andrei Mikhailov
c39b165ff3 increase the size of CSRF token 2020-05-01 00:40:11 -03:00
Ryan Scott
29a08425e9 Use DeriveLift to generate yesod-core's Lift instances
GHC 8.0 and later come with the `DeriveLift` extension for deriving
instances of `Language.Haskell.TH.Syntax.Lift`. `yesod-core` supports
GHC 8.2 and up, so it is able to make use of this. Not only does
`DeriveLift` make for much shorter code, but it also fixes warnings
that you get when compiling `yesod-core` with GHC 8.10 or later:

```
[20 of 31] Compiling Yesod.Routes.TH.Types ( src/Yesod/Routes/TH/Types.hs, interpreted )

src/Yesod/Routes/TH/Types.hs:34:10: warning: [-Wmissing-methods]
    • No explicit implementation for
        ‘liftTyped’
    • In the instance declaration for ‘Lift (ResourceTree t)’
   |
34 | instance Lift t => Lift (ResourceTree t) where
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Yesod/Routes/TH/Types.hs:49:10: warning: [-Wmissing-methods]
    • No explicit implementation for
        ‘liftTyped’
    • In the instance declaration for ‘Lift (Resource t)’
   |
49 | instance Lift t => Lift (Resource t) where
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Yesod/Routes/TH/Types.hs:59:10: warning: [-Wmissing-methods]
    • No explicit implementation for
        ‘liftTyped’
    • In the instance declaration for ‘Lift (Piece t)’
   |
59 | instance Lift t => Lift (Piece t) where
   |          ^^^^^^^^^^^^^^^^^^^^^^^^

src/Yesod/Routes/TH/Types.hs:78:10: warning: [-Wmissing-methods]
    • No explicit implementation for
        ‘liftTyped’
    • In the instance declaration for ‘Lift (Dispatch t)’
   |
78 | instance Lift t => Lift (Dispatch t) where
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
```

This is because `DeriveLift` fills in implementations of `liftTyped`,
a method that was introduced to `Lift` in `template-haskell-2.16.0.0`
(bundled with GHC 8.10).
2020-03-31 08:41:00 -04:00
Jezen Thomas
59f601a34c
Add functions for setting description and OG meta (#1663)
* Add functions for setting description and OG meta

It's common that a website author will want to add a specific
description and Open Graph image to a given page in their website. These
functions are simple conveniences to add these meta tags to the document
head.

I decided against simply adding all possible meta tags, because not all
of them are useful, and even in the case of Open Graph tags, many of
them should be set only once and they should use the same value for the
entire website. In those cases, it's probably better for the website
author to add those tags in their layout template.

Closes https://github.com/yesodweb/yesod/issues/1659
2020-03-30 19:00:24 +07:00
Michael Snoyman
9d0c9180b9
unliftio-core 0.2 2020-03-01 11:00:36 +02:00
Michael Snoyman
5943ee527d
Version bump 2020-01-27 17:52:24 +02:00
Simon Michael
dd649bf238 support template-haskell 2.16, build with GHC 8.10 2020-01-27 06:11:48 -08:00
Juan Paucar
6e38a3b99d Bump version properly 2020-01-20 11:06:35 -05:00
Juan Paucar
eb159b6fd5 Bump versions 2020-01-17 14:03:59 -05:00
Juan Paucar
c279547962 Remove unnecesary Typeable deriving 2020-01-17 11:48:58 -05:00
Michael Snoyman
804b114d91
Drop LTS 9 2020-01-07 13:36:58 +02:00
Maximilian Tagher
42d41f77de .. 2019-11-29 10:43:11 -05:00
Maximilian Tagher
0025226af6 Print preview of JSON body in case of parse failure 2019-11-28 22:33:00 -05:00
Michael Snoyman
463fd54c5a
Drop rio dep (fixes #1645) 2019-11-22 09:16:52 +02:00