undici collaboration
See original GitHub issueWe are currently working with implementing fetch in https://github.com/nodejs/undici which is being considered for inclusion in Node core.
I was hoping that maybe we could combine some of our efforts with node-fetch. We are already using some of the tests from node-fetch (thank you and we have of course added reference and LICENSE from node-fetch).
undici is looking for what I believe is a more strict interpretation of the spec at the cost of ergonomics. I was thinking about whether it would be an idea to suggest whether node-fetch would consider using undici/fetch as it’s base implementation while providing a more node friendly interface? e.g. support for more FormData
, Headers
, Blob
, File
implementations, better node stream support etc… while keeping the fetch spec parts in undici?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:7
- Comments:10 (1 by maintainers)
Top GitHub Comments
if you break out some stuff to separate packages that can be shared across node-fetch and undici (and is still compatible with node v12.20) then we could use the same stuff.
Would be grate to agree upon some packages so there isn’t duplicated code for two similar things For instance, you implemented FormData yourself instead of depending on a existing userland package
Whether fetch does get implemented Node.js or more strictly in undici, the goal of node-fetch would change to backporting it to the oldest Node version still in maintenance until that becomes one that doesn’t require a ponyfill. At that point, if the community still relied on the now-legacy streams and buffers, then node-fetch may want to backport that too like suggested above.