Skip to content

Commit d633804

Browse files
!fixup: don't force ModuleLoader.load to be async (can via hooks)
1 parent 3a0882a commit d633804

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/internal/modules/esm/loader.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -804,9 +804,9 @@ class ModuleLoader {
804804
* if any.
805805
* @param {string} url The URL of the module to be loaded.
806806
* @param {object} context Metadata about the module
807-
* @returns {Promise<{ format: ModuleFormat, source: ModuleSource }>}
807+
* @returns {Promise<{ format: ModuleFormat, source: ModuleSource }> | { format: ModuleFormat, source: ModuleSource }}
808808
*/
809-
async load(url, context) {
809+
load(url, context) {
810810
if (loadHooks.length) {
811811
// Has module.registerHooks() hooks, use the synchronous variant that can handle both hooks.
812812
return this.#loadSync(url, context);

0 commit comments

Comments
 (0)