GeezerVison is showing github.com — module: centralize builtin exposure policies by sjungwon03 · Pull Request #66292 · nodejs/node
Conversation
Builtin exposure rules are currently split between realm.js and
separate setup functions in pre_execution.js for each option-gated
builtin.
Move the JavaScript loader's scheme and option-gating policies into one
table, and let pre-execution apply them after option initialization.
This intentionally keeps the policy in the JavaScript loader instead of
deriving it from native option registration. Native options do not
describe which builtins they expose: one option may enable multiple
builtins, while other options are unrelated to builtin exposure.
Code-cache categorization also has a separate responsibility. Adding
exposure metadata there would duplicate loader policy across the native
and JavaScript boundaries.
The policy test validates every declared builtin ID and option, as well
as defaults, --no-experimental-*, NODE_OPTIONS, and command-line
precedence. It also covers CommonJS, ESM, Workers, child processes, and
process.getBuiltinModule().
A builtin omitted entirely from the policy table cannot be detected
automatically because there is no independent native mapping between
options and builtins. Centralizing the loader-owned policy reduces that
risk without introducing a second source of truth in C++.
Refs: #65418
Refs: #65964
Refs: #65920
Refs: #65840
Tests:
make -C out -j4 node
python3 tools/test.py -j4 parallel/test-module-builtin-policies parallel/test-module-builtin-experimental parallel/test-sqlite
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Review requested:
- @nodejs/loaders
- @nodejs/startup
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot
added
lib / src
Issues and PRs involving general changes in the lib/ or src/ directories.
needs-ci
PRs that need a full CI run.
process
Issues and PRs related to the process subsystem.
test
Issues and PRs related to Node.js core tests and test infrastructure.
labels
Sep 25, 2026
codecov
Bot
commented
Sep 25, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.37%. Comparing base (96ee81c) to head (59a764c).
⚠️ Report is 57 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #66292 +/- ##
==========================================
+ Coverage 90.35% 90.37% +0.01%
==========================================
Files 790 790
Lines 273814 274472 +658
Branches 52382 52565 +183
==========================================
+ Hits 247409 248056 +647
+ Misses 16906 16887 -19
- Partials 9499 9529 +30
... and 68 files with indirect coverage changes
🚀 New features to boost your workflow:
- ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Keep scheme-only and option-gated builtin exposure rules in the
JavaScript loader. Leave option registration and code-cache
categorization with their native owners.
Assisted-by: Codex
Signed-off-by: sjungwon03 <[email protected]>
daeyeon
added
author ready
PRs with CI started, the required approvals, and no outstanding review comments.
request-ci
Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review.
labels
Sep 27, 2026
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
panva
added
the
resume-ci
Add this label to resume the latest eligible Jenkins CI run on a PR with an approving review.
label
Sep 27, 2026
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
panva
commented
Sep 27, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
@nodejs/doc-kit PTAL at https://ci.nodejs.org/job/node-test-commit-smartos/nodes=smartos23-x64/68764/console and consider skipping doc-kit on smartos entirely, or maybe this is a bug? I don't know... It's a platform we cannot afford flakes on at the moment given https://redirect.github.com/nodejs/build/issues/4387
09:19:57 [07:19:57.062] DEBUG (caching): Evicted "@node-core/doc-kit-legacy/legacy-json-all" after final consumer
09:19:58 Skipping HTML generation: unable to load lightningcss (Cannot find module '../lightningcss.sunos-x64.node')
09:20:05 terminate called after throwing an instance of 'std::bad_alloc'
09:20:05 what(): std::bad_alloc
09:20:05 /usr/bin/bash: line 4: 73585 Abort PATH='/home/iojs/build/workspace/node-test-commit-smartos/nodes/smartos23-x64/out/Release:$PATH' '/home/iojs/build/workspace/node-test-commit-smartos/nodes/smartos23-x64/node' tools/doc/node_modules/@doc-kit/cli/bin/cli.mjs generate --config-file tools/doc/web.doc-kit.config.mjs -t llms-txt -o out/doc -v v27.0.0
09:20:05 make[1]: *** [Makefile:920: out/doc/llms.txt] Error 134
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
panva
added
the
resume-ci
Add this label to resume the latest eligible Jenkins CI run on a PR with an approving review.
label
Sep 27, 2026
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
aduh95
pushed a commit
that referenced
this pull request
Oct 3, 2026
Keep scheme-only and option-gated builtin exposure rules in the
JavaScript loader. Leave option registration and code-cache
categorization with their native owners.
Assisted-by: Codex
Signed-off-by: sjungwon03 <[email protected]>
PR-URL: #66292
Refs: #65418
Refs: #65964
Refs: #65920
Refs: #65840
Reviewed-By: Daeyeon Jeong <[email protected]>
aduh95
pushed a commit
that referenced
this pull request
Oct 3, 2026
Keep scheme-only and option-gated builtin exposure rules in the
JavaScript loader. Leave option registration and code-cache
categorization with their native owners.
Assisted-by: Codex
Signed-off-by: sjungwon03 <[email protected]>
PR-URL: #66292
Refs: #65418
Refs: #65964
Refs: #65920
Refs: #65840
Reviewed-By: Daeyeon Jeong <[email protected]>
Reviewers
daeyeon
daeyeon approved these changes
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
author ready
PRs with CI started, the required approvals, and no outstanding review comments.
lib / src
Issues and PRs involving general changes in the lib/ or src/ directories.
needs-ci
PRs that need a full CI run.
process
Issues and PRs related to the process subsystem.
test
Issues and PRs related to Node.js core tests and test infrastructure.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|