Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
lint
  • Loading branch information
GeoffreyBooth authored and aduh95 committed Sep 16, 2023
commit 27c14d7ef62e3ac53e9aab9c10ca15cd3477df4a
3 changes: 2 additions & 1 deletion lib/internal/modules/esm/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ require('internal/modules/cjs/loader');
const {
ArrayPrototypeJoin,
ArrayPrototypeMap,
encodeURI,
FunctionPrototypeCall,
JSONStringify,
ObjectSetPrototypeOf,
Expand Down Expand Up @@ -523,7 +524,7 @@ function createModuleLoader(useCustomLoadersIfPresent = true) {
'`--experimental-loader` may be removed in the future; instead use `register()`:\n' +
`--import 'data:text/javascript,import { register } from "node:module"; import { pathToFileURL } from "node:url"; ${ArrayPrototypeJoin(
ArrayPrototypeMap(userLoaderPaths, (loader) => `register(${JSONStringify(encodeURI(loader))}, pathToFileurl("https://github.com/nodejs/node/pull/49633/commits/"./""))`),
Comment thread
aduh95 marked this conversation as resolved.
Outdated
"; ",
'; ',
)};'`,
'ExperimentalWarning',
);
Expand Down
2 changes: 1 addition & 1 deletion test/es-module/test-esm-experimental-warnings.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe('ESM: warn for obsolete hooks provided', { concurrency: true }, () => {
) {
it(`should print for ${experiment.toString().replaceAll('/', '')}`, async () => {
const { code, signal, stderr } = await spawnPromisified(execPath, [
arg,
...args,
'--input-type=module',
'--eval',
`import ${JSON.stringify(fileurl("https://github.com/nodejs/node/pull/49633/commits/'es-module-loaders',%20'module-named-exports.mjs'"))}`,
Expand Down