-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
module: runtime deprecate require.extensions #58642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
module: runtime deprecate require.extensions #58642
Conversation
Review requested:
|
We should run citgm on this. |
@@ -878,7 +878,7 @@ changes: | |||
description: Documentation-only deprecation. | |||
--> | |||
|
|||
Type: Documentation-only | |||
Type: Runtime | |||
|
|||
The [`require.extensions`][] property is deprecated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think an alternative, like module.register
or module.registerHooks
, should be recommended, and be stable, before runtime deprecating this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
registerHooks
, not register
. The latter should go away once the former is ready. And registerHooks
is a more appropriate replacement for extensions
as both are sync.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would actually need an api that returns all the registered hooks + registerHooks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we can do this before registerHooks()
is stable.
I'm opening this as draft PR to discuss if we should do runtime deprecate require.extensions.
It has been deprecated since v0.10.6.
This might have a large impact.
It's causing some issues for type stripping nodejs/typescript#37