fix: do not require node-fetch for Node 18+#644
fix: do not require node-fetch for Node 18+#644gr2m wants to merge 2 commits intowheresrhys:mainfrom
node-fetch for Node 18+#644Conversation
Node 18 comes with a built-in `fetch` function now. This simple change makes it compatible to use with Node 18, without requiring the install of `node-fetch`
|
If anyone would like to use this fork: you can temporarily set an alias in your package.json dependencies I'm using it in https://github.com/octokit/octokit-next.js for the time being |
|
@wheresrhys could you please merge this one? Thanks! And regarding the patch above ^^ the correct version is |
Fixed my comment, thanks! |
|
Can this be merged asap? |
|
The last commit in the default branch is from Sep 23, 2021, don't expect it to be merged any time soon. I'd recommend to use my fork for the time being. This is an independent open source project, we are not entitled to anything, we can just offer to help. I'd recommend to avoid things like "asap", I'm sure you mean well, but nobody is paid to work on this project. Best to ask kindly, or not at all, in this case. |
|
In case anyone else stumbles across this, you can patch Node’s global import fetchMock from 'fetch-mock'
globalThis.fetch = fetchMock.sandbox() |
|
fetch-mock 10 is now out with support for native fetch. Apologies for the delay |
|
Wonderful, thank you!! |
Node 18 comes with a built-in
fetchfunction now. This simple change makes it compatible to use with Node 18, without requiring the install ofnode-fetch