Migrate Node.js builtin imports to node: scheme (#57611)

Summary:
Pull Request resolved: https://github.com/react/react-native/pull/57611

Directly follows D112733139 (Metro).

**Motivation**

- New Node builtins are *only* available under the prefix (e.g. `node:sqlite`), as this allows Node to introduce them without ecosystem-breaking changes, so this is the direction of travel and the only choice that'll allow consistency.
- Encouraging them and grouping them separately makes it easier to reason about a module's 3rd party dependencies.

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D112803684

fbshipit-source-id: 40668d746a7151b3aa4800ff8af997902a18d198
This commit is contained in:
Alex Hunt authored and meta-codesync[bot] committed 2026-07-21 09:01:41 -07:00
1 parent 94d208d96f
commit 89300acb9c
271 files changed
+822 -581

No files matched your search

+5 -5
View File
@@ -11,18 +11,18 @@
const {PACKAGES_DIR} = require('../shared/consts');
// $FlowFixMe[untyped-import]: TODO type ansi-styles
const ansiStyles = require('ansi-styles');
const {execSync, spawnSync} = require('child_process');
const {promises: fs} = require('fs');
const {execSync, spawnSync} = require('node:child_process');
const {promises: fs} = require('node:fs');
const {hostname, tmpdir, userInfo} = require('node:os');
const path = require('node:path');
const {parseArgs, styleText} = require('node:util');
const nullthrows = require('nullthrows');
const {hostname, tmpdir, userInfo} = require('os');
const path = require('path');
// $FlowFixMe[untyped-import]: TODO type rimraf
const rimraf = require('rimraf');
// $FlowFixMe[untyped-import]: TODO type signedsource
const SignedSource = require('signedsource');
// $FlowFixMe[untyped-import]: TODO type supports-color
const supportsColor = require('supports-color');
const {parseArgs, styleText} = require('util');
const DEVTOOLS_FRONTEND_REPO_URL =
'https://github.com/react/react-native-devtools-frontend';