purescript / registry-dev

Development work related to the PureScript Registry
https://github.com/purescript/registry
95 stars 80 forks source link

Replace Affjax with Fetch #643

Closed thomashoneyman closed 1 year ago

thomashoneyman commented 1 year ago

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: https://github.com/purescript/registry-dev/blob/8177cd30d7b7cf3379b8b728564def0ed438298c/app/spago.yaml#L10-L11

As well as drop the xhr2 dependency from package.json: https://github.com/purescript/registry-dev/blob/8177cd30d7b7cf3379b8b728564def0ed438298c/app/package.json#L10

CharlesTaylor7 commented 1 year ago

I am volunteering to work on this: https://github.com/purescript/registry-dev/issues/642#issuecomment-1690407659