purescript/registry-dev

Replace Affjax with Fetch

thomashoneyman opened this issue · 1 comments

The fetch library by @sigma-andex and @i-am-the-slime takes advantage of Node's support of the fetch API since Node 18. It's a little more comfortable for sending buffer data in Node (see #642), and it has no JS library dependencies — Affjax relies on the elderly xhr2 library.

This issue tracks replacing our use of Affjax with Fetch. Fortunately we don't make many requests; they're all in the following modules:

We'll also want to drop the dependencies in spago.yaml:

- affjax
- affjax-node

As well as drop the xhr2 dependency from package.json:

"xhr2": "^0.2.1",

I am volunteering to work on this: #642 (comment)