Skip to content
Closed
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
pr feedback
  • Loading branch information
guybedford committed Nov 10, 2019
commit 04bab86d9830e38dea7de99ad5f7c7c66fcc89df
2 changes: 1 addition & 1 deletion doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ Currently, overriding `Error.prepareStackTrace` is ignored when the
added: v12.0.0
-->

Sets the resolution algorithm for resolving ES modulespecifiers. Valid options
Sets the resolution algorithm for resolving ES module specifiers. Valid options
are `explicit` and `node`.

The default is `explicit`, which requires providing the full path to a
Expand Down
12 changes: 8 additions & 4 deletions doc/api/vm.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ changes:
* `importModuleDynamically` {Function} Called during evaluation of this module
when `import()` is called. If this option is not specified, calls to
`import()` will reject with [`ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING`][].
flag, and should not be considered stable.
This option is part of the experimental modules API, and should not be
considered stable.
* `specifier` {string} specifier passed to `import()`
* `module` {vm.Module}
* Returns: {Module Namespace Object|vm.Module} Returning a `vm.Module` is
Expand Down Expand Up @@ -853,7 +854,8 @@ changes:
* `importModuleDynamically` {Function} Called during evaluation of this module
when `import()` is called. If this option is not specified, calls to
`import()` will reject with [`ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING`][].
flag, and should not be considered stable.
This option is part of the experimental modules API, and should not be
considered stable.
* `specifier` {string} specifier passed to `import()`
* `module` {vm.Module}
* Returns: {Module Namespace Object|vm.Module} Returning a `vm.Module` is
Expand Down Expand Up @@ -949,7 +951,8 @@ changes:
* `importModuleDynamically` {Function} Called during evaluation of this module
when `import()` is called. If this option is not specified, calls to
`import()` will reject with [`ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING`][].
flag, and should not be considered stable.
This option is part of the experimental modules API, and should not be
considered stable.
* `specifier` {string} specifier passed to `import()`
* `module` {vm.Module}
* Returns: {Module Namespace Object|vm.Module} Returning a `vm.Module` is
Expand Down Expand Up @@ -1025,7 +1028,8 @@ changes:
* `importModuleDynamically` {Function} Called during evaluation of this module
when `import()` is called. If this option is not specified, calls to
`import()` will reject with [`ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING`][].
flag, and should not be considered stable.
This option is part of the experimental modules API, and should not be
considered stable.
* `specifier` {string} specifier passed to `import()`
* `module` {vm.Module}
* Returns: {Module Namespace Object|vm.Module} Returning a `vm.Module` is
Expand Down
2 changes: 1 addition & 1 deletion doc/node.1
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ It uses the Chrome DevTools Protocol.
.It Fl -experimental-loader Ns = Ns Ar module
Specify the
.Ar module
as a custom loader, to load
to use as a custom module loader.
.
.It Fl -max-http-header-size Ns = Ns Ar size
Specify the maximum size of HTTP headers in bytes. Defaults to 8KB.
Expand Down
3 changes: 0 additions & 3 deletions lib/internal/bootstrap/pre_execution.js
Original file line number Diff line number Diff line change
Expand Up @@ -465,9 +465,6 @@ function shouldUseESMLoader(mainPath) {
}

function runMainESM(mainPath) {
process.emitWarning(
'The ESM module loader is experimental.',
'ExperimentalWarning', undefined);
const esmLoader = require('internal/process/esm_loader');
const { pathToFileURL } = require('internal/url');
const { hasUncaughtExceptionCaptureCallback } =
Expand Down
3 changes: 3 additions & 0 deletions lib/internal/process/esm_loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ let calledInitialize = false;
exports.initializeLoader = initializeLoader;
async function initializeLoader() {
assert(calledInitialize === false);
process.emitWarning(
'The ESM module loader is experimental.',
'ExperimentalWarning', undefined);
calledInitialize = true;
if (!userLoader)
return;
Expand Down