Skip to content

Commit 184da89

Browse files
jbromarobhogan
authored andcommitted
refactor(community-cli-plugin): use node builtin fetch (#47397)
Summary: Removed `node-fetch` in favour of node builtin fetch to get rid of the deprecated `punycode` warning when using Node 22. `react-native/community-cli-plugin` already requires Node >= 18 where it was made available by default (without `--experimental-fetch` flag). This change is similar to the one made in #45227 ## Changelog: [GENERAL] [CHANGED] - Drop node-fetch in favor of Node's built-in fetch from undici in `react-native/community-cli-plugin` Pull Request resolved: #47397 Test Plan: tests pass Reviewed By: blakef Differential Revision: D66512595 Pulled By: NickGerleman fbshipit-source-id: c4e01baf388f9fae8cea7b4bfe25034bff28b461
1 parent abfa3a2 commit 184da89

File tree

3 files changed

+0
-3
lines changed

3 files changed

+0
-3
lines changed

packages/community-cli-plugin/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
"metro": "^0.81.0",
3131
"metro-config": "^0.81.0",
3232
"metro-core": "^0.81.0",
33-
"node-fetch": "^2.2.0",
3433
"readline": "^1.3.0",
3534
"semver": "^7.1.3"
3635
},

packages/community-cli-plugin/src/commands/start/OpenDebuggerKeyboardHandler.js

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import type TerminalReporter from 'metro/src/lib/TerminalReporter';
1313

1414
import chalk from 'chalk';
15-
import fetch from 'node-fetch';
1615

1716
type PageDescription = $ReadOnly<{
1817
id: string,

packages/community-cli-plugin/src/utils/isDevServerRunning.js

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
*/
1111

1212
import net from 'net';
13-
import fetch from 'node-fetch';
1413

1514
/**
1615
* Determine whether we can run the dev server.

0 commit comments

Comments
 (0)