-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(dev-middleware): drop node-fetch
in favor of Node built-in fetch
#45227
refactor(dev-middleware): drop node-fetch
in favor of Node built-in fetch
#45227
Conversation
node-fetch
in favor of Node fetchnode-fetch
in favor of Node built-in fetch
Why would it fail on |
Base commit: c7988c9 |
@robhogan has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@byCedric if we use this with Node 18, or Node 20, do we get experimental API warnings? |
@NickGerleman No, there should not be any experimental warnings around
That warning was removed in Node 18.13.0, through PR 45287 |
This pull request was successfully merged by @byCedric in 30a3e6e. When will my fix make it into a release? | How to file a pick request? |
Summary:
Node 22 doesn't work well with
node-fetch@2
, as one of their polyfills is using the deprecatedpunycode
module. This causes unnecessary warnings like:Instead of upgrading to the much larger
node-fetch@3
, this change dropsnode-fetch
in favor of Node's own built-infetch
implementation (using undici).Changelog:
[GENERAL] [CHANGED] - Drop
node-fetch
in favor of Node's built-in fetch fromundici
in@react-native/dev-middleware
Test Plan:
See CI for passing tests