Skip to content

Commit

Permalink
Don't re-export Network.Wai.Parse.ParseRequestBodyOptions (#394)
Browse files Browse the repository at this point in the history
* Remove export of `ParseRequestBodyOptions` from `Web.Scotty` and `Web.Scotty.Trans`

* Add changelog entry

* Move changelog line to breaking changes
  • Loading branch information
pbrinkmeier authored Apr 7, 2024
1 parent ab5b6b5 commit 8a55318
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Web/Scotty.hs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module Web.Scotty
, pathParamMaybe, captureParamMaybe, formParamMaybe, queryParamMaybe
, pathParams, captureParams, formParams, queryParams
-- *** Files
, files, filesOpts, Trans.ParseRequestBodyOptions
, files, filesOpts
-- ** Modifying the Response and Redirecting
, status, addHeader, setHeader, redirect
-- ** Setting Response Body
Expand Down Expand Up @@ -67,7 +67,7 @@ import Network.HTTP.Types (Status, StdMethod, ResponseHeaders)
import Network.Socket (Socket)
import Network.Wai (Application, Middleware, Request, StreamingBody)
import Network.Wai.Handler.Warp (Port)
import qualified Network.Wai.Parse as W (defaultParseRequestBodyOptions)
import qualified Network.Wai.Parse as W

import Web.Scotty.Internal.Types (ScottyT, ActionT, ErrorHandler, Param, RoutePattern, Options, defaultOptions, File, Kilobytes, ScottyState, defaultScottyState, ScottyException, StatusError(..), Content(..))
import UnliftIO.Exception (Handler(..), catch)
Expand Down Expand Up @@ -242,7 +242,7 @@ files = Trans.files
-- | Get list of temp files and form parameters decoded from multipart payloads.
--
-- NB the temp files are deleted when the continuation exits
filesOpts :: Trans.ParseRequestBodyOptions
filesOpts :: W.ParseRequestBodyOptions
-> ([Param] -> [File FilePath] -> ActionM a) -- ^ temp files validation, storage etc
-> ActionM a
filesOpts = Trans.filesOpts
Expand Down
2 changes: 1 addition & 1 deletion Web/Scotty/Trans.hs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module Web.Scotty.Trans
, pathParamMaybe, captureParamMaybe, formParamMaybe, queryParamMaybe
, pathParams, captureParams, formParams, queryParams
-- *** Files
, files, filesOpts, ParseRequestBodyOptions
, files, filesOpts
-- ** Modifying the Response and Redirecting
, status, Lazy.addHeader, Lazy.setHeader, Lazy.redirect
-- ** Setting Response Body
Expand Down
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
## next [????.??.??]

* Fixed cookie example from `Cookie` module documentation. `getCookie` Function would return strict variant of `Text`. Will convert it into lazy variant using `fromStrict`.

### Breaking changes
* Remove dependency on data-default class (#386). We have been exporting constants for default config values since 0.20, and this dependency was simply unnecessary.
* Remove re-export of `Network.Wai.Parse.ParseRequestBodyOptions` from `Web.Scotty` and `Web.Scotty.Trans`. This is a type from `wai-extra` so exporting it is unnecessary.



Expand Down

0 comments on commit 8a55318

Please sign in to comment.