chore(storage): replace node-fetch with native fetch in tests#8337
chore(storage): replace node-fetch with native fetch in tests#8337swseverance wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request removes the node-fetch dependency and its associated types, transitioning the project to the native fetch API. Feedback identifies potential issues resulting from this change, including the shift from Node.js Readable streams to Web ReadableStreams in response bodies and compatibility conflicts between native fetch and the form-data package. Additionally, a correction was requested for an invalid @types/node version in package.json.
f6d4821 to
bb2fd9e
Compare
|
It has come to my attention that the storage library may in fact be running tests in node 14 as well as node 18. If in fact tests are running in node 14 then they will likely fail, as fetch will not be available. Would the project maintainers be open to updating the storage library to no longer support node 14? It seems like many of the other packages require node >= 18 |
bb2fd9e to
c85e474
Compare
The test infrastructure appears to run on Node 18, where native fetch is guaranteed. There is no reason to depend on node-fetch in the testing code — replace the imports with native fetch and remove node-fetch and @types/node-fetch from devDependencies.
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #8336 🦕