Skip to content

module: implement Symbol.dispose in ModuleHooks#63928

Open
remcohaszing wants to merge 1 commit into
nodejs:mainfrom
remcohaszing:module-register-hooks-disposable
Open

module: implement Symbol.dispose in ModuleHooks#63928
remcohaszing wants to merge 1 commit into
nodejs:mainfrom
remcohaszing:module-register-hooks-disposable

Conversation

@remcohaszing

Copy link
Copy Markdown
Contributor

This change implements the Symbol.dispose key in the ModuleHooks class as an alias for deregister. This makes registerHooks work with the using keyword.

Fixes: #63846

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/loaders

@nodejs-github-bot nodejs-github-bot added module Issues and PRs related to the module subsystem. needs-ci PRs that need a full CI run. labels Jun 15, 2026
@remcohaszing remcohaszing changed the title module: import Symbol.dispose in ModuleHooks module: implement Symbol.dispose in ModuleHooks Jun 15, 2026
@remcohaszing remcohaszing force-pushed the module-register-hooks-disposable branch from 5dd9b5d to 73e5743 Compare June 15, 2026 13:53
This change implements the `Symbol.dispose` key in the
`ModuleHooks` class as an alias for deregister. This makes
`registerHooks` work with the `using` keyword.

Fixes: nodejs#63846
Signed-off-by: Remco Haszing <remcohaszing@gmail.com>
@remcohaszing remcohaszing force-pushed the module-register-hooks-disposable branch from 73e5743 to c0c9ee7 Compare June 15, 2026 14:29

@mcollina mcollina 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.

lgtm

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

Labels

module Issues and PRs related to the module subsystem. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Symbol.dispose in registerHooks()

4 participants