diff --git a/doc/api/cli.md b/doc/api/cli.md index fc8dfdb80d660d..dd8678d649e4cb 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -1057,12 +1057,13 @@ Modules preloaded with `--require` will run before modules preloaded with `--imp added: v12.0.0 --> -This configures Node.js to interpret string input as CommonJS or as an ES -module. String input is input via `--eval`, `--print`, or `STDIN`. +This configures Node.js to interpret `--eval` or `STDIN` input as CommonJS or +as an ES module. Valid values are `"commonjs"` or `"module"`. The default is +`"commonjs"` unless [`--experimental-default-type=module`][] is used. -Valid values are `"commonjs"` and `"module"`. The default is `"commonjs"`. - -The REPL does not support this option. +The REPL does not support this option. Usage of `--input-type=module` with +[`--print`][] will throw an error, as `--print` does not support ES module +syntax. ### `--insecure-http-parser` @@ -2841,6 +2842,7 @@ done [`--import`]: #--importmodule [`--openssl-config`]: #--openssl-configfile [`--preserve-symlinks`]: #--preserve-symlinks +[`--print`]: #-p---print-script [`--redirect-warnings`]: #--redirect-warningsfile [`--require`]: #-r---require-module [`Atomics.wait()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Atomics/wait