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 1e57cb6

Browse filesBrowse files
committed
doc: add history entries to --input-type section
PR-URL: #58175 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 0b54f06 commit 1e57cb6
Copy full SHA for 1e57cb6

File tree

Expand file treeCollapse file tree

1 file changed

+10
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+10
-1
lines changed
Open diff view settings
Collapse file

‎doc/api/cli.md‎

Copy file name to clipboardExpand all lines: doc/api/cli.md
+10-1Lines changed: 10 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1457,12 +1457,21 @@ forked processes, or clustered processes.
14571457

14581458
<!-- YAML
14591459
added: v12.0.0
1460+
changes:
1461+
- version: v23.6.0
1462+
pr-url: https://github.com/nodejs/node/pull/56350
1463+
description: Add support for `-typescript` values.
1464+
- version:
1465+
- v22.7.0
1466+
- v20.19.0
1467+
pr-url: https://github.com/nodejs/node/pull/53619
1468+
description: ESM syntax detection is enabled by default.
14601469
-->
14611470

14621471
This configures Node.js to interpret `--eval` or `STDIN` input as CommonJS or
14631472
as an ES module. Valid values are `"commonjs"`, `"module"`, `"module-typescript"` and `"commonjs-typescript"`.
14641473
The `"-typescript"` values are not available with the flag `--no-experimental-strip-types`.
1465-
The default is `"commonjs"`.
1474+
The default is no value, or `"commonjs"` if `--no-experimental-detect-module` is passed.
14661475

14671476
If `--input-type` is not provided,
14681477
Node.js will try to detect the syntax with the following steps:

0 commit comments

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