module: runtime deprecate module.register()#62401
Open
GeoffreyBooth wants to merge 2 commits intonodejs:mainfrom
Open
module: runtime deprecate module.register()#62401GeoffreyBooth wants to merge 2 commits intonodejs:mainfrom
module.register()#62401GeoffreyBooth wants to merge 2 commits intonodejs:mainfrom
Conversation
Collaborator
|
Review requested:
|
c5ce15e to
77638cb
Compare
77638cb to
1a08254
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #62401 +/- ##
==========================================
- Coverage 89.69% 89.67% -0.03%
==========================================
Files 676 676
Lines 206693 206704 +11
Branches 39577 39582 +5
==========================================
- Hits 185402 185361 -41
- Misses 13435 13489 +54
+ Partials 7856 7854 -2
🚀 New features to boost your workflow:
|
Member
AugustinMauroy
left a comment
There was a problem hiding this comment.
In general that seem good.
| ); | ||
|
|
||
| function register(specifier, parentURL = undefined, options) { | ||
| emitRegisterDeprecation(); |
Member
There was a problem hiding this comment.
Suggested change
| emitRegisterDeprecation(); | |
| emitRegisterDeprecation(); | |
separate core logic & deprecation by space
|
|
||
| [`module.register()`][] is deprecated. Use [`module.registerHooks()`][] | ||
| instead. | ||
|
|
Member
There was a problem hiding this comment.
we should add small paragraph that exaplain why and what is the gap between theses api mainly one is only async and the other can do both
mcollina
approved these changes
Mar 23, 2026
Member
mcollina
left a comment
There was a problem hiding this comment.
lgtm
I think we should aim for 26.x, so we can actually drop in 27
aduh95
reviewed
Mar 23, 2026
himself65
approved these changes
Mar 23, 2026
jsumners-nr
approved these changes
Mar 24, 2026
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.
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:
module.registerHooks()goes stable, hopefully sometime before 26 goes LTS; module: doc-deprecatemodule.register()#62395 (comment)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