Skip to content

Commit 6cbb5cb

Browse files
committed
esm: remove unnecessary toNamespacedPath calls
nodejs/node#53656
1 parent c7ef768 commit 6cbb5cb

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

patches/node/fix_revert_src_lb_reducing_c_calls_of_esm_legacy_main_resolve.patch

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,15 @@ to recognize asar files.
1515
This reverts commit 9cf2e1f55b8446a7cde23699d00a3be73aa0c8f1.
1616

1717
diff --git a/lib/internal/modules/esm/resolve.js b/lib/internal/modules/esm/resolve.js
18-
index f3dad958b2ec275992554477b9344214c8c1e2c8..870af88c7dfb3174816a933912fee7379dae4085 100644
18+
index f3dad958b2ec275992554477b9344214c8c1e2c8..a086217046fd5ed7cfb09cfd2ed62f3987eb1f31 100644
1919
--- a/lib/internal/modules/esm/resolve.js
2020
+++ b/lib/internal/modules/esm/resolve.js
21-
@@ -31,10 +31,9 @@ const { sep, posix: { relative: relativePosixPath }, resolve } = require('path')
21+
@@ -27,14 +27,13 @@ const { BuiltinModule } = require('internal/bootstrap/realm');
22+
const fs = require('fs');
23+
const { getOptionValue } = require('internal/options');
24+
// Do not eagerly grab .manifest, it may be in TDZ
25+
-const { sep, posix: { relative: relativePosixPath }, resolve } = require('path');
26+
+const { sep, posix: { relative: relativePosixPath }, toNamespacedPath, resolve } = require('path');
2227
const preserveSymlinks = getOptionValue('--preserve-symlinks');
2328
const preserveSymlinksMain = getOptionValue('--preserve-symlinks-main');
2429
const inputTypeFlag = getOptionValue('--input-type');

0 commit comments

Comments
 (0)