Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 171e9fc

Browse filesBrowse files
karan-lrnaduh95
authored andcommitted
esm: update outdated FIXME comment in translators.js
PR-URL: #61715 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
1 parent 687c0ac commit 171e9fc
Copy full SHA for 171e9fc

1 file changed

+2-2Lines changed: 2 additions & 2 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/internal/modules/esm/translators.js‎

Copy file name to clipboardExpand all lines: lib/internal/modules/esm/translators.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ function loadCJSModule(module, source, url, filename, isMain) {
143143
specifier = `${pathToFileURL(path)}`;
144144
}
145145

146-
// FIXME(node:59666) Currently, the ESM loader re-invents require() here for imported CJS and this
147-
// requires a separate cache to be populated as well as introducing several quirks. This is not ideal.
146+
// NOTE: This re-invented require() is only used on the loader-hook worker thread.
147+
// On the main thread, the authentic require() is used instead (fixed by #60380).
148148
const request = { specifier, attributes: importAttributes, phase: kEvaluationPhase, __proto__: null };
149149
const job = cascadedLoader.getOrCreateModuleJob(url, request, kRequireInImportedCJS);
150150
job.runSync();

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.