Skip to content

Commit 4afedea

Browse files
committed
chore(compartment-mapper): do not call moduleSourceHook for "error"-type module sources
1 parent d764dcc commit 4afedea

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

packages/compartment-mapper/src/import-hook.js

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -518,18 +518,12 @@ function* chooseModuleDescriptor(
518518
* @param {StrictlyRequiredFn} strictlyRequiredForCompartment
519519
* @param {string} packageLocation
520520
* @param {CompartmentSources} packageSources
521-
* @param {import('./types.js').ModuleSourceHook | undefined} moduleSourceHook
522-
* @param {string} canonicalName
523-
* @param {import('./types.js').LogFn} log
524521
* @returns {DeferErrorFn}
525522
*/
526523
const makeDeferError = (
527524
strictlyRequiredForCompartment,
528525
packageLocation,
529526
packageSources,
530-
moduleSourceHook,
531-
canonicalName,
532-
log,
533527
) => {
534528
/**
535529
* @type {DeferErrorFn}
@@ -560,14 +554,6 @@ const makeDeferError = (
560554
};
561555
packageSources[specifier] = moduleSource;
562556

563-
if (moduleSourceHook) {
564-
moduleSourceHook({
565-
moduleSource: { error: moduleSource.deferredError },
566-
canonicalName,
567-
log,
568-
});
569-
}
570-
571557
return record;
572558
};
573559
return deferError;
@@ -638,9 +624,6 @@ export const makeImportHookMaker = (
638624
strictlyRequiredForCompartment,
639625
packageLocation,
640626
packageSources,
641-
moduleSourceHook,
642-
compartmentDescriptor.label,
643-
log,
644627
);
645628

646629
/** @type {ImportHook} */
@@ -812,9 +795,6 @@ export function makeImportNowHookMaker(
812795
strictlyRequiredForCompartment,
813796
packageLocation,
814797
packageSources,
815-
moduleSourceHook,
816-
'', // no canonicalName for now
817-
noop, // no-op log
818798
);
819799

820800
/**

0 commit comments

Comments
 (0)