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 221648a

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 c589b6b commit 221648a
Copy full SHA for 221648a

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
@@ -142,8 +142,8 @@ function loadCJSModule(module, source, url, filename, isMain) {
142142
specifier = `${pathToFileURL(path)}`;
143143
}
144144

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

0 commit comments

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