GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: add additional details about `--input-type` · nodejs/node@b281e98

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc/api
    • cli.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/cli.md‎

Copy file name to clipboardExpand all lines: doc/api/cli.md
+7-5Lines changed: 7 additions & 5 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1072,12 +1072,13 @@ Modules preloaded with `--require` will run before modules preloaded with `--imp
10721072
added: v12.0.0
10731073
-->
10741074

1075-
This configures Node.js to interpret string input as CommonJS or as an ES
1076-
module. String input is input via `--eval`, `--print`, or `STDIN`.
1075+
This configures Node.js to interpret `--eval` or `STDIN` input as CommonJS or
1076+
as an ES module. Valid values are `"commonjs"` or `"module"`. The default is
1077+
`"commonjs"` unless [`--experimental-default-type=module`][] is used.
10771078

1078-
Valid values are `"commonjs"` and `"module"`. The default is `"commonjs"`.
1079-
1080-
The REPL does not support this option.
1079+
The REPL does not support this option. Usage of `--input-type=module` with
1080+
[`--print`][] will throw an error, as `--print` does not support ES module
1081+
syntax.
10811082

10821083
### `--insecure-http-parser`
10831084

@@ -2864,6 +2865,7 @@ done
28642865
[`--import`]: #--importmodule
28652866
[`--openssl-config`]: #--openssl-configfile
28662867
[`--preserve-symlinks`]: #--preserve-symlinks
2868+
[`--print`]: #-p---print-script
28672869
[`--redirect-warnings`]: #--redirect-warningsfile
28682870
[`--require`]: #-r---require-module
28692871
[`Atomics.wait()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Atomics/wait

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.