I was initially thinking of using native fetch, but changed to undici since native fetch is still experimental. @types/node still does not include types for it either.
The native fetch is based on undici anyway, so migrating later will probably not be much work. However, this is not ready to land. Since nock not yet supports undici (https://github.com/nock/nock/issues/2183) we need to either use undici's mock support or wait until that lands.
This change should probably be released as a breaking change: undici requires at least node@v16.
I was initially thinking of using native fetch, but changed to
undici
since native fetch is still experimental.@types/node
still does not include types for it either.The native fetch is based on
undici
anyway, so migrating later will probably not be much work. However, this is not ready to land. Sincenock
not yet supportsundici
(https://github.com/nock/nock/issues/2183) we need to either useundici
's mock support or wait until that lands.This change should probably be released as a breaking change: undici requires at least node@v16.