Skip to content

src: remove experimental ShadowRealm support - #65650

Open
anonrig wants to merge 1 commit into
nodejs:mainfrom
anonrig:cursor/remove-shadow-realm-09a0
Open

src: remove experimental ShadowRealm support#65650
anonrig wants to merge 1 commit into
nodejs:mainfrom
anonrig:cursor/remove-shadow-realm-09a0

Conversation

@anonrig

@anonrig anonrig commented Aug 29, 2026

Copy link
Copy Markdown
Member

This removes experimental ShadowRealm support from Node.js.

The TC39 ShadowRealm proposal remains unimplemented by browsers. WPT dropped ShadowRealm test coverage in web-platform-tests/wpt#59794 because the tests added significant noise without implementer support.

This PR:

  • Removes the --experimental-shadow-realm flag and the --harmony-shadow-realm V8 option alias
  • Removes the Node.js host integration (node_shadow_realm.*, isolate callback, bootstrap)
  • Removes Node.js ShadowRealm tests and dedicated WPT fixtures that WPT already deleted
  • Leaves V8's own ShadowRealm implementation untouched

--experimental-shadow-realm was never enabled by default and never left experimental status.

Refs: web-platform-tests/wpt#59794
Refs: #42528

This change was prepared with assistance from an AI coding agent.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/config
  • @nodejs/gyp
  • @nodejs/loaders
  • @nodejs/realm
  • @nodejs/startup
  • @nodejs/web-standards

@nodejs-github-bot 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. labels Aug 29, 2026
@cursor
cursor Bot force-pushed the cursor/remove-shadow-realm-09a0 branch from c7993ad to 50ef480 Compare August 29, 2026 20:58
@aduh95 aduh95 added experimental Issues and PRs related to experimental features. dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. dont-land-on-v24.x PRs that should not land on the v24.x-staging branch and should not be released in v24.x. labels Aug 29, 2026
The TC39 ShadowRealm proposal remains unimplemented by browsers,
and WPT removed ShadowRealm test coverage. Remove the Node.js
host integration, the --experimental-shadow-realm CLI flag, and
related tests.

Refs: web-platform-tests/wpt#59794
Refs: nodejs#42528
Signed-off-by: Yagiz Nizipli <yagiz@nizipli.com>
Co-authored-by: Yagiz Nizipli <anonrig@users.noreply.github.com>
@cursor
cursor Bot force-pushed the cursor/remove-shadow-realm-09a0 branch from 50ef480 to 52ba7ce Compare August 29, 2026 22:05

@jasnell jasnell left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While the status is still unclear, and it's not certain at all that'll it will make progress, it is still considered an active TC-39 proposal. Removing entirely may be premature. Won't block but I also don't agree with removing it just yet.

@legendecas

legendecas commented Aug 29, 2026

Copy link
Copy Markdown
Member

Technically the proposal was moved to stage 2.7, and not moved yet stage 3 back again for implementation. We could add it back when it gets promoted to stage 3 again.

@codecov

codecov Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.08%. Comparing base (045ff95) to head (52ba7ce).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #65650      +/-   ##
==========================================
- Coverage   91.79%   90.08%   -1.72%     
==========================================
  Files         402      751     +349     
  Lines      181164   255588   +74424     
  Branches    27776    48292   +20516     
==========================================
+ Hits       166308   230239   +63931     
- Misses      14517    16490    +1973     
- Partials      339     8859    +8520     
Files with missing lines Coverage Δ
lib/internal/bootstrap/realm.js 96.31% <100.00%> (+0.75%) ⬆️
lib/internal/errors.js 98.61% <100.00%> (+1.88%) ⬆️
lib/internal/process/pre_execution.js 97.40% <ø> (+17.80%) ⬆️
src/api/environment.cc 78.71% <ø> (ø)
src/async_wrap.cc 83.28% <ø> (ø)
src/env.cc 85.14% <ø> (ø)
src/env.h 98.21% <ø> (ø)
src/node_context_data.h 85.71% <ø> (ø)
src/node_options.cc 79.51% <ø> (ø)
src/node_options.h 95.34% <ø> (ø)
... and 1 more

... and 472 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.

@anonrig anonrig added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 30, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 30, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. dont-land-on-v24.x PRs that should not land on the v24.x-staging branch and should not be released in v24.x. experimental Issues and PRs related to experimental features. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants