Releases: purescript-contrib/purescript-affjax
v13.0.0
Breaking changes:
-
Update project and deps to PureScript v0.15.0 (#171 by @JordanMartinez)
-
Update all request functions to take a driver arg (#171 by @JordanMartinez)
Affjax works on the Node.js and browser environments by relying on a
require
statement within a function. Depending on the environment detected,
eitherXHR
orXmlHttpRequest
is used. Since ES modules do not allow
one to callimport
within a function in a synchronous way,
we cannot continue to use this approach.Rather, all request-related functions (e.g.
request
,get
, etc.) now take
as their first argument anAffjaxDriver
value. Different environments
will pass in their implementation for that driver and re-export
the functionality defined inaffjax
.To fix your code, depend on the corresponding library below and update the imported
module fromAffjax
toAffjax.Node
/Affjax.Web
:- If on Node.js, use
purescript-affjax-node
. - If on the brower, use
purescript-affjax-web
.
- If on Node.js, use
Other improvements:
- Added
purs-tidy
formatter (#167 by @thomashoneyman)
v12.0.0
Breaking changes:
- Added support for PureScript 0.14 and dropped support for all previous versions (#158)
XHRError Exn.Error
was removed and split toTimeoutError
,RequestFailedError
, andXHROtherError Exn.Error
(#155, @srghma)
New features:
Bugfixes:
Other improvements:
XMLDocument
andHTMLDocument
are now understood asDocument
responses (#157)- Changed default branch to
main
frommaster
- Updated to comply with Contributors library guidelines by adding new issue and pull request templates, updating documentation, and migrating to Spago for local development and CI (#153)
v11.0.0
v10.1.0
Added Newtype
instance for StatusCode
(@ford-prefect)
v10.0.0
- Updated for latest
purescript-form-urlencoded
. - Some helper functions were combined to accept
Maybe RequestBody
rather than having two variations of each. - All request functions now return
Either Error _
- theAff
error channel is no longer used to capture errors from theXHR
object, and the providedError
type captures the various possible error cases that can occur. retry
was removed.