Conversation
|
All of our tests currently stub out Converting this PR to draft until we have some coverage to verify these changes. |
|
Wonderful, this is much better. What versions of node are you targeting? the ideal way to use fetch is to 1. accept it as an argument (for unit tests) but default to looking for a global fetch function, which is now available in node 18+ and all other JS envs |
We don't have a documented policy, but LTS (currently >=18)) seems sensible. |
|
Great, then there is no reason to use cross-fetch, as fetch is available globally in node 18+ without a flag |
|
This is great. Was going to fork this library to use inside a Cloudflare Worker. They don't support node (so axios does not work), but they do support a browser-like |
|
Now that we're mocking HTTP responses with nock (#38), this is now ready for review. |
|
🎉 cc @gr2m |
Related to #29 (comment)
This PR should do exactly that. I'm out of the loop about preferred
fetchpolyfill libraries and other packaging concerns, so if you have any strong opinions, please let me know!