GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||
GeezerVison is showing github.com — module: fix require(esm) on the module.register() hooks thread by mcollina · Pull Request #66770 · nodejs/node Conversation
|
|
Review requested:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@ ## main #66770 +/- ## ========================================== + Coverage 90.49% 90.51% +0.01% ========================================== Files 797 797 Lines 277598 277602 +4 Branches 53336 53346 +10 ========================================== + Hits 251220 251271 +51 + Misses 16790 16733 -57 - Partials 9588 9598 +10
🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
RSLGTM.
I've been thinking it's time to remove the async hooks.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Also +1 for removing module.register() soon-ish. module.registerHooks() has been adopted by several popular packages and it's been a while since we see bug reports. Although I think module.register() is only doc-deprecated currently, so maybe the next step is to runtime deprecate it first before removing it.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Landed in c526694 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
On the async loader hooks thread, resolve kImportInRequiredESM and kRequireInImportedCJS requests synchronously again, and always use ModuleJobSync for kImportInRequiredESM. Otherwise require() of an ES module with imports from a hooks module hit an internal assertion in ModuleJobSync.syncLink(). Fixes: #66767 Refs: #62530 Signed-off-by: Matteo Collina <[email protected]> PR-URL: #66770 Reviewed-By: Geoffrey Booth <[email protected]> Reviewed-By: Paolo Insogna <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
On the async loader hooks thread, resolve kImportInRequiredESM and kRequireInImportedCJS requests synchronously again, and always use ModuleJobSync for kImportInRequiredESM. Otherwise require() of an ES module with imports from a hooks module hit an internal assertion in ModuleJobSync.syncLink(). Fixes: nodejs#66767 Refs: nodejs#62530 Signed-off-by: Matteo Collina <[email protected]> PR-URL: nodejs#66770 Reviewed-By: Geoffrey Booth <[email protected]> Reviewed-By: Paolo Insogna <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
require(esm) inside a module.register() hook module fails with ERR_INTERNAL_ASSERTION in 26.12.0
There was an error while loading. Please reload this page.