Skip to content

Commit 1e57cb6

Browse files
committed
doc: add history entries to --input-type section
PR-URL: #58175 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 0b54f06 commit 1e57cb6

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

doc/api/cli.md

Lines changed: 10 additions & 1 deletion
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)