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

+4 -4
View File
@@ -18,15 +18,15 @@ const {
getTypeScriptCompilerOptions,
} = require('./config');
const babel = require('@babel/core');
const {spawn} = require('child_process');
const translate = require('flow-api-translator');
const {promises: fs} = require('fs');
const micromatch = require('micromatch');
const path = require('path');
const {spawn} = require('node:child_process');
const {promises: fs} = require('node:fs');
const path = require('node:path');
const {parseArgs, styleText} = require('node:util');
const prettier = require('prettier');
const {globSync} = require('tinyglobby');
const ts = require('typescript');
const {parseArgs, styleText} = require('util');
const SRC_DIR = 'src';
const BUILD_DIR = 'dist';
+3 -3
View File
@@ -12,9 +12,9 @@ require('../shared/babelRegister').registerForScript();
const {BUILD_DIR, PACKAGES_DIR} = require('./build');
const {buildConfig} = require('./config');
const fs = require('fs');
const path = require('path');
const {parseArgs} = require('util');
const fs = require('node:fs');
const path = require('node:path');
const {parseArgs} = require('node:util');
const config = {
options: {
+2 -2
View File
@@ -10,8 +10,8 @@
require('../shared/babelRegister').registerForScript();
const {promises: fs} = require('fs');
const path = require('path');
const {promises: fs} = require('node:fs');
const path = require('node:path');
// "prepack" script to prepare JavaScript packages for publishing.
//