Replace Affjax with Fetch
thomashoneyman opened this issue · 1 comments
thomashoneyman commented
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:
- App.Prelude, used in the
withRetryRequest
helper - App.Effect.Source, used to download tarballs from GitHub into a buffer
- App.Effect.Storage, used to download tarballs from the registry backend into a buffer
- App.Effect.Pursuit, used to POST json data to Pursuit to upload packages
We'll also want to drop the dependencies in spago.yaml
:
Lines 10 to 11 in 8177cd3
As well as drop the xhr2
dependency from package.json
:
Line 10 in 8177cd3
CharlesTaylor7 commented
I am volunteering to work on this: #642 (comment)