runeh / typical-fetch

Apache License 2.0
4 stars 0 forks source link

feat!: Replace node-fetch with undici #21

Closed simenandre closed 1 year ago

simenandre commented 2 years ago

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.