Skip to content

Releases: purescript-contrib/purescript-affjax

v13.0.0

28 Apr 00:06
87a8ffc
Compare
Choose a tag to compare

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,
    either XHR or XmlHttpRequest is used. Since ES modules do not allow
    one to call import 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 an AffjaxDriver value. Different environments
    will pass in their implementation for that driver and re-export
    the functionality defined in affjax.

    To fix your code, depend on the corresponding library below and update the imported
    module from Affjax to Affjax.Node/Affjax.Web:

Other improvements:

v12.0.0

26 Feb 21:20
5be197e
Compare
Choose a tag to compare

Breaking changes:

  • Added support for PureScript 0.14 and dropped support for all previous versions (#158)
  • XHRError Exn.Error was removed and split to TimeoutError, RequestFailedError, and XHROtherError Exn.Error (#155, @srghma)

New features:

Bugfixes:

Other improvements:

  • XMLDocument and HTMLDocument are now understood as Document responses (#157)
  • Changed default branch to main from master
  • 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

06 Sep 17:17
8e1bd69
Compare
Choose a tag to compare
  • Adds support for the timeout option in Request (#151)

v10.1.0

07 Jun 15:55
3eb5119
Compare
Choose a tag to compare

Added Newtype instance for StatusCode (@ford-prefect)

v10.0.0

03 Nov 14:08
200bad7
Compare
Choose a tag to compare
  • 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 _ - the Aff error channel is no longer used to capture errors from the XHR object, and the provided Error type captures the various possible error cases that can occur.
  • retry was removed.

v9.0.1

05 Sep 23:01
d5a7a9c
Compare
Choose a tag to compare
  • Ensure version mismatch with purescript-form-urlencoded does not compile, potentially resulting in runtime errors (spotted by @menelaos)
  • Don't override nodejsBaseUrl already set in xhr2 on node (@paul-rouse)

v9.0.0

11 Mar 00:25
ec9c50e
Compare
Choose a tag to compare

Update for latest purescript-argonaut-core

v8.0.0

23 Feb 19:19
7f92b5c
Compare
Choose a tag to compare
  • Updated purescript-web-xhr dependency
  • Renamed functions in the RequestHeader / ResponseHeader modules to no longer prefix values with the module name

v7.0.2

09 Feb 21:12
0af9c29
Compare
Choose a tag to compare

XHR timeouts are now caught and raised through Aff's error channel (@acple)

v7.0.1

31 Jan 20:12
226c80e
Compare
Choose a tag to compare

Fixed an incorrect request example in the doc comments (@jhrcek)