Skip to content

Commit 9a56ed4

Browse files
authored
esm: syncify default path of ModuleLoader\.load
nodejs/node#57419
1 parent 4ec6bff commit 9a56ed4

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

‎patches/node/fix_lazyload_fs_in_esm_loaders_to_apply_asar_patches.patch‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,6 @@ index 09a332c0999086b30fd952d9456f788925240e27..910ac85cdc86e7fb3f850f7edf0b95ea
1818

1919
const defaultType =
2020
getOptionValue('--experimental-default-type');
21-
@@ -38,8 +38,7 @@ async function getSource(url, context) {
22-
const responseURL = href;
23-
let source;
24-
if (protocol === 'file:') {
25-
- const { readFile: readFileAsync } = require('internal/fs/promises').exports;
26-
- source = await readFileAsync(url);
27-
+ source = await fs.promises.readFile(url);
28-
} else if (protocol === 'data:') {
29-
const result = dataURLProcessor(url);
30-
if (result === 'failure') {
3121
@@ -63,7 +62,7 @@ function getSourceSync(url, context) {
3222
const responseURL = href;
3323
let source;

0 commit comments

Comments
 (0)