Use node: schema to import Node.js builtins (#1782)#1782
Closed
robhogan wants to merge 1 commit into
Closed
Conversation
robhogan
force-pushed
the
robhogan/prefer-node-protocol
branch
from
July 19, 2026 13:59
0cea1d2 to
4fc92a7
Compare
robhogan
changed the base branch from
main
to
robhogan/flow-node-protocol-aliases
July 19, 2026 13:59
robhogan
force-pushed
the
robhogan/prefer-node-protocol
branch
from
July 19, 2026 14:13
4fc92a7 to
6f637c3
Compare
robhogan
changed the base branch from
robhogan/flow-node-protocol-aliases
to
main
July 19, 2026 14:15
Contributor
|
@robhogan has imported this pull request. If you are a Meta employee, you can view this in D112733139. |
Summary: A stylistic choice to unify on `node:`-prefixed imports, eg `fs` -> `node:fs`. Reasoning: - New Node builtins are *only* available under the prefix (eg `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. Change: - ESLint warn when Node.js builtin modules are imported without the `node:` scheme - Migrate existing imports, exports, and requires to `node:` specifiers - Update Jest mocks to match the new module specifiers Changelog: Internal Pull Request resolved: #1782 Test Plan: - `yarn lint` - 29 affected Jest suites (950 tests, 94 snapshots) Reviewed By: huntie Differential Revision: D112733139 Pulled By: robhogan
robhogan
force-pushed
the
robhogan/prefer-node-protocol
branch
from
July 20, 2026 10:41
6f637c3 to
7a625a3
Compare
Contributor
|
@robhogan has exported this pull request. If you are a Meta employee, you can view the originating Diff in D112733139. |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
A stylistic choice to unify on
node:-prefixed imports, egfs->node:fs.Reasoning:
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.Change:
node:schemenode:specifiersChangelog: Internal
Test Plan:
yarn lintReviewed By: huntie
Differential Revision: D112733139
Pulled By: robhogan