mirror of
https://github.com/nodejs/node.git
synced 2026-10-28 18:25:13 +08:00
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: https://github.com/nodejs/node/issues/66767 Refs: https://github.com/nodejs/node/pull/62530 Signed-off-by: Matteo Collina <hello@matteocollina.com> PR-URL: https://github.com/nodejs/node/pull/66770 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>