datasource-rest
datasource-rest copied to clipboard
Dropping node-fetch
What's the way ahead for this lib and node-fetch?
Should datasource-rest@v7 come, what would be the minimal supported node version?
Since node 21, the global fetch (undici-based) is stable. Should the global fetch be used as the default for HTTPCache, the node-fetch dependency could be dropped.
Users could still provide their own fetch impl as they do know, but the library would be less prone to more and more issues related to the outdated node-fetch v2 (e.g. #331). Caring about v3 (ESM only) will also become a non-issue.
Known obstacles:
nockneeds to upgraded to v14 (currently in beta)nockneeds to have https://github.com/nock/nock/issues/2821 fixed