Skip to content

module: runtime deprecate module.register()#62401

Open
GeoffreyBooth wants to merge 1 commit intonodejs:mainfrom
GeoffreyBooth:runtime-deprecate-module-register
Open

module: runtime deprecate module.register()#62401
GeoffreyBooth wants to merge 1 commit intonodejs:mainfrom
GeoffreyBooth:runtime-deprecate-module-register

Conversation

@GeoffreyBooth
Copy link
Copy Markdown
Member

Building on #62395, this runtime-deprecates module.register().

I’m not sure when we want to land and release this; I think the options are basically either:

  1. When module.registerHooks() goes stable, hopefully sometime before 26 goes LTS; module: doc-deprecate module.register() #62395 (comment)
  2. In 26.0.0; the doc-deprecation is backported to the 25.x line, and the runtime deprecation is 26+; module: doc-deprecate module.register() #62395 (comment)

I’m opening this now in case the team wants to do the second option. cc @nodejs/loaders @nodejs/userland-migrations

@GeoffreyBooth GeoffreyBooth added the loaders Issues and PRs related to ES module loaders label Mar 23, 2026
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/loaders
  • @nodejs/userland-migrations

@nodejs-github-bot nodejs-github-bot added esm Issues and PRs related to the ECMAScript Modules implementation. needs-ci PRs that need a full CI run. labels Mar 23, 2026
@GeoffreyBooth GeoffreyBooth force-pushed the runtime-deprecate-module-register branch from c5ce15e to 77638cb Compare March 23, 2026 03:18
@GeoffreyBooth GeoffreyBooth added dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. 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. dont-land-on-v25.x PRs that should not land on the v25.x-staging branch and should not be released in v25.x. labels Mar 23, 2026
@GeoffreyBooth GeoffreyBooth force-pushed the runtime-deprecate-module-register branch from 77638cb to 1a08254 Compare March 23, 2026 03:51
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.77%. Comparing base (7ffbb76) to head (a0e36fb).
⚠️ Report is 14 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #62401      +/-   ##
==========================================
+ Coverage   89.70%   89.77%   +0.06%     
==========================================
  Files         692      692              
  Lines      214039   214563     +524     
  Branches    41064    41510     +446     
==========================================
+ Hits       192010   192615     +605     
+ Misses      14091    14050      -41     
+ Partials     7938     7898      -40     
Files with missing lines Coverage Δ
lib/internal/modules/esm/loader.js 98.78% <100.00%> (+0.01%) ⬆️

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

Copy link
Copy Markdown
Member

@AugustinMauroy AugustinMauroy left a comment

Choose a reason for hiding this comment

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

In general that seem good.

Copy link
Copy Markdown
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

I think we should aim for 26.x, so we can actually drop in 27

@GeoffreyBooth GeoffreyBooth added the tsc-agenda Issues and PRs to discuss during the meetings of the TSC. label Mar 23, 2026
Copy link
Copy Markdown
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Copy Markdown
Member

@gurgunday gurgunday left a comment

Choose a reason for hiding this comment

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

lgtm

@GeoffreyBooth GeoffreyBooth force-pushed the runtime-deprecate-module-register branch from 1a08254 to 2124d8a Compare March 29, 2026 16:47
@GeoffreyBooth GeoffreyBooth force-pushed the runtime-deprecate-module-register branch from 2124d8a to a0e36fb Compare March 29, 2026 16:56
@GeoffreyBooth GeoffreyBooth added the request-ci Add this label to start a Jenkins CI on a PR. label Mar 29, 2026
@github-actions github-actions bot added request-ci-failed An error occurred while starting CI via request-ci label, and manual interventon is needed. and removed request-ci Add this label to start a Jenkins CI on a PR. labels Mar 29, 2026
@github-actions

This comment was marked as outdated.

Copy link
Copy Markdown
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@mcollina
Copy link
Copy Markdown
Member

@nodejs/tsc ptal. this should land for v26

@GeoffreyBooth GeoffreyBooth added request-ci Add this label to start a Jenkins CI on a PR. and removed request-ci-failed An error occurred while starting CI via request-ci label, and manual interventon is needed. labels Mar 29, 2026
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Mar 29, 2026
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@aduh95 aduh95 added the blocked PRs that are blocked by other issues or PRs. label Mar 29, 2026
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Contributor

@aduh95 aduh95 left a comment

Choose a reason for hiding this comment

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

It doesn't look like we have consensus on what should be the policy for deprecating experimental APIs in #62456. Let's not land this until we're in alignment (also the doc-only should probably land first: #62395)

@GeoffreyBooth
Copy link
Copy Markdown
Member Author

If landing the doc deprecation means that we can’t land the runtime deprecation until 27, drawing out removal until 28, then I’d rather skip the doc deprecation. The goal is to remove the API in 27, while giving users as much warning as possible.

I don’t think it’s reasonable to block PRs based on other PRs. I asked the @nodejs/tsc to discuss this in last week’s meeting and reach a consensus so that one or the other of these PRs could be unblocked, and I’m disappointed that that didn’t happen. I’m concerned that this is getting dragged out to the point that nothing will be able to land in time for 26.0.0.

Copy link
Copy Markdown
Member

@panva panva left a comment

Choose a reason for hiding this comment

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

there is precedent on deprecating experimental features and this needs to get done in time for 26

GeoffreyBooth added a commit to GeoffreyBooth/node that referenced this pull request Mar 31, 2026
@GeoffreyBooth GeoffreyBooth force-pushed the runtime-deprecate-module-register branch 2 times, most recently from d61da45 to a0e36fb Compare March 31, 2026 01:40
@GeoffreyBooth GeoffreyBooth force-pushed the runtime-deprecate-module-register branch 2 times, most recently from d61da45 to a0e36fb Compare March 31, 2026 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked PRs that are blocked by other issues or PRs. dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. 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. dont-land-on-v25.x PRs that should not land on the v25.x-staging branch and should not be released in v25.x. esm Issues and PRs related to the ECMAScript Modules implementation. loaders Issues and PRs related to ES module loaders needs-ci PRs that need a full CI run. tsc-agenda Issues and PRs to discuss during the meetings of the TSC.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants