| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -553,6 +553,18 @@ Affects the default output directory of: | |||
| 553 | 553 | * [`--heap-prof-dir`][] | |
| 554 | 554 | * [`--redirect-warnings`][] | |
| 555 | 555 | ||
| 556 | + ### `--disable-proto=mode` | ||
| 557 | + | ||
| 558 | + <!-- YAML | ||
| 559 | + added: | ||
| 560 | + - v13.12.0 | ||
| 561 | + - v12.17.0 | ||
| 562 | + --> | ||
| 563 | + | ||
| 564 | + Disable the `Object.prototype.__proto__` property. If `mode` is `delete`, the | ||
| 565 | + property is removed entirely. If `mode` is `throw`, accesses to the | ||
| 566 | + property throw an exception with the code `ERR_PROTO_ACCESS`. | ||
| 567 | + | ||
| 556 | 568 | ### `--disable-warning=code-or-type` | |
| 557 | 569 | ||
| 558 | 570 | > Stability: 1.1 - Active development | |
@@ -647,18 +659,6 @@ users can at least run WebAssembly (with less optimal performance) | |||
| 647 | 659 | when the virtual memory address space available to their Node.js | |
| 648 | 660 | process is lower than what the V8 WebAssembly memory cage needs. | |
| 649 | 661 | ||
| 650 | - ### `--disable-proto=mode` | ||
| 651 | - | ||
| 652 | - <!-- YAML | ||
| 653 | - added: | ||
| 654 | - - v13.12.0 | ||
| 655 | - - v12.17.0 | ||
| 656 | - --> | ||
| 657 | - | ||
| 658 | - Disable the `Object.prototype.__proto__` property. If `mode` is `delete`, the | ||
| 659 | - property is removed entirely. If `mode` is `throw`, accesses to the | ||
| 660 | - property throw an exception with the code `ERR_PROTO_ACCESS`. | ||
| 661 | - | ||
| 662 | 662 | ### `--disallow-code-generation-from-strings` | |
| 663 | 663 | ||
| 664 | 664 | <!-- YAML | |
@@ -669,25 +669,6 @@ Make built-in language features like `eval` and `new Function` that generate | |||
| 669 | 669 | code from strings throw an exception instead. This does not affect the Node.js | |
| 670 | 670 | `node:vm` module. | |
| 671 | 671 | ||
| 672 | - ### `--expose-gc` | ||
| 673 | - | ||
| 674 | - <!-- YAML | ||
| 675 | - added: | ||
| 676 | - - v22.3.0 | ||
| 677 | - - v20.18.0 | ||
| 678 | - --> | ||
| 679 | - | ||
| 680 | - > Stability: 1 - Experimental. This flag is inherited from V8 and is subject to | ||
| 681 | - > change upstream. | ||
| 682 | - | ||
| 683 | - This flag will expose the gc extension from V8. | ||
| 684 | - | ||
| 685 | - ```js | ||
| 686 | - if (globalThis.gc) { | ||
| 687 | - globalThis.gc(); | ||
| 688 | - } | ||
| 689 | - ``` | ||
| 690 | - | ||
| 691 | 672 | ### `--dns-result-order=order` | |
| 692 | 673 | ||
| 693 | 674 | <!-- YAML | |
@@ -793,6 +774,15 @@ node --entry-url --experimental-strip-types 'file.ts?query#hash' | |||
| 793 | 774 | node --entry-url 'data:text/javascript,console.log("Hello")' | |
| 794 | 775 | ``` | |
| 795 | 776 | ||
| 777 | + ### `--env-file-if-exists=config` | ||
| 778 | + | ||
| 779 | + <!-- YAML | ||
| 780 | + added: v22.9.0 | ||
| 781 | + --> | ||
| 782 | + | ||
| 783 | + Behavior is the same as [`--env-file`][], but an error is not thrown if the file | ||
| 784 | + does not exist. | ||
| 785 | + | ||
| 796 | 786 | ### `--env-file=config` | |
| 797 | 787 | ||
| 798 | 788 | > Stability: 1.1 - Active development | |
@@ -860,15 +850,6 @@ export USERNAME="nodejs" # will result in `nodejs` as the value. | |||
| 860 | 850 | If you want to load environment variables from a file that may not exist, you | |
| 861 | 851 | can use the [`--env-file-if-exists`][] flag instead. | |
| 862 | 852 | ||
| 863 | - ### `--env-file-if-exists=config` | ||
| 864 | - | ||
| 865 | - <!-- YAML | ||
| 866 | - added: v22.9.0 | ||
| 867 | - --> | ||
| 868 | - | ||
| 869 | - Behavior is the same as [`--env-file`][], but an error is not thrown if the file | ||
| 870 | - does not exist. | ||
| 871 | - | ||
| 872 | 853 | ### `-e`, `--eval "script"` | |
| 873 | 854 | ||
| 874 | 855 | <!-- YAML | |
@@ -907,17 +888,6 @@ flows within the application. As such, it is presently recommended to be sure | |||
| 907 | 888 | your application behaviour is unaffected by this change before using it in | |
| 908 | 889 | production. | |
| 909 | 890 | ||
| 910 | - ### `--experimental-transform-types` | ||
| 911 | - | ||
| 912 | - <!-- YAML | ||
| 913 | - added: v22.7.0 | ||
| 914 | - --> | ||
| 915 | - | ||
| 916 | - > Stability: 1.1 - Active development | ||
| 917 | - | ||
| 918 | - Enables the transformation of TypeScript-only syntax into JavaScript code. | ||
| 919 | - Implies `--experimental-strip-types` and `--enable-source-maps`. | ||
| 920 | - | ||
| 921 | 891 | ### `--experimental-eventsource` | |
| 922 | 892 | ||
| 923 | 893 | <!-- YAML | |
@@ -997,6 +967,18 @@ following permissions are restricted: | |||
| 997 | 967 | * WASI - manageable through [`--allow-wasi`][] flag | |
| 998 | 968 | * Addons - manageable through [`--allow-addons`][] flag | |
| 999 | 969 | ||
| 970 | + ### `--experimental-print-required-tla` | ||
| 971 | + | ||
| 972 | + <!-- YAML | ||
| 973 | + added: | ||
| 974 | + - v22.0.0 | ||
| 975 | + - v20.17.0 | ||
| 976 | + --> | ||
| 977 | + | ||
| 978 | + If the ES module being `require()`'d contains top-level `await`, this flag | ||
| 979 | + allows Node.js to evaluate the module, try to locate the | ||
| 980 | + top-level awaits, and print their location to help users find them. | ||
| 981 | + | ||
| 1000 | 982 | ### `--experimental-require-module` | |
| 1001 | 983 | ||
| 1002 | 984 | <!-- YAML | |
@@ -1093,6 +1075,17 @@ added: | |||
| 1093 | 1075 | ||
| 1094 | 1076 | Enable module mocking in the test runner. | |
| 1095 | 1077 | ||
| 1078 | + ### `--experimental-transform-types` | ||
| 1079 | + | ||
| 1080 | + <!-- YAML | ||
| 1081 | + added: v22.7.0 | ||
| 1082 | + --> | ||
| 1083 | + | ||
| 1084 | + > Stability: 1.1 - Active development | ||
| 1085 | + | ||
| 1086 | + Enables the transformation of TypeScript-only syntax into JavaScript code. | ||
| 1087 | + Implies `--experimental-strip-types` and `--enable-source-maps`. | ||
| 1088 | + | ||
| 1096 | 1089 | ### `--experimental-vm-modules` | |
| 1097 | 1090 | ||
| 1098 | 1091 | <!-- YAML | |
@@ -1138,6 +1131,25 @@ added: v22.4.0 | |||
| 1138 | 1131 | ||
| 1139 | 1132 | Enable experimental [`Web Storage`][] support. | |
| 1140 | 1133 | ||
| 1134 | + ### `--expose-gc` | ||
| 1135 | + | ||
| 1136 | + <!-- YAML | ||
| 1137 | + added: | ||
| 1138 | + - v22.3.0 | ||
| 1139 | + - v20.18.0 | ||
| 1140 | + --> | ||
| 1141 | + | ||
| 1142 | + > Stability: 1 - Experimental. This flag is inherited from V8 and is subject to | ||
| 1143 | + > change upstream. | ||
| 1144 | + | ||
| 1145 | + This flag will expose the gc extension from V8. | ||
| 1146 | + | ||
| 1147 | + ```js | ||
| 1148 | + if (globalThis.gc) { | ||
| 1149 | + globalThis.gc(); | ||
| 1150 | + } | ||
| 1151 | + ``` | ||
| 1152 | + | ||
| 1141 | 1153 | ### `--force-context-aware` | |
| 1142 | 1154 | ||
| 1143 | 1155 | <!-- YAML | |
@@ -1416,20 +1428,6 @@ When enabled, the parser will accept the following: | |||
| 1416 | 1428 | All the above will expose your application to request smuggling | |
| 1417 | 1429 | or poisoning attack. Avoid using this option. | |
| 1418 | 1430 | ||
| 1419 | - ### `--inspect[=[host:]port]` | ||
| 1420 | - | ||
| 1421 | - <!-- YAML | ||
| 1422 | - added: v6.3.0 | ||
| 1423 | - --> | ||
| 1424 | - | ||
| 1425 | - Activate inspector on `host:port`. Default is `127.0.0.1:9229`. If port `0` is | ||
| 1426 | - specified, a random available port will be used. | ||
| 1427 | - | ||
| 1428 | - V8 inspector integration allows tools such as Chrome DevTools and IDEs to debug | ||
| 1429 | - and profile Node.js instances. The tools attach to Node.js instances via a | ||
| 1430 | - tcp port and communicate using the [Chrome DevTools Protocol][]. | ||
| 1431 | - See [V8 Inspector integration for Node.js][] for further explanation on Node.js debugger. | ||
| 1432 | - | ||
| 1433 | 1431 | <!-- Anchor to make sure old links find a target --> | |
| 1434 | 1432 | ||
| 1435 | 1433 | <a id="inspector_security"></a> | |
@@ -1498,6 +1496,20 @@ a random available port will be used. | |||
| 1498 | 1496 | ||
| 1499 | 1497 | See [V8 Inspector integration for Node.js][] for further explanation on Node.js debugger. | |
| 1500 | 1498 | ||
| 1499 | + ### `--inspect[=[host:]port]` | ||
| 1500 | + | ||
| 1501 | + <!-- YAML | ||
| 1502 | + added: v6.3.0 | ||
| 1503 | + --> | ||
| 1504 | + | ||
| 1505 | + Activate inspector on `host:port`. Default is `127.0.0.1:9229`. If port `0` is | ||
| 1506 | + specified, a random available port will be used. | ||
| 1507 | + | ||
| 1508 | + V8 inspector integration allows tools such as Chrome DevTools and IDEs to debug | ||
| 1509 | + and profile Node.js instances. The tools attach to Node.js instances via a | ||
| 1510 | + tcp port and communicate using the [Chrome DevTools Protocol][]. | ||
| 1511 | + See [V8 Inspector integration for Node.js][] for further explanation on Node.js debugger. | ||
| 1512 | + | ||
| 1501 | 1513 | ### `-i`, `--interactive` | |
| 1502 | 1514 | ||
| 1503 | 1515 | <!-- YAML | |
@@ -1845,18 +1857,6 @@ changes: | |||
| 1845 | 1857 | ||
| 1846 | 1858 | Identical to `-e` but prints the result. | |
| 1847 | 1859 | ||
| 1848 | - ### `--experimental-print-required-tla` | ||
| 1849 | - | ||
| 1850 | - <!-- YAML | ||
| 1851 | - added: | ||
| 1852 | - - v22.0.0 | ||
| 1853 | - - v20.17.0 | ||
| 1854 | - --> | ||
| 1855 | - | ||
| 1856 | - If the ES module being `require()`'d contains top-level `await`, this flag | ||
| 1857 | - allows Node.js to evaluate the module, try to locate the | ||
| 1858 | - top-level awaits, and print their location to help users find them. | ||
| 1859 | - | ||
| 1860 | 1860 | ### `--prof` | |
| 1861 | 1861 | ||
| 1862 | 1862 | <!-- YAML | |
@@ -2132,6 +2132,17 @@ The following environment variables are set when running a script with `--run`: | |||
| 2132 | 2132 | * `NODE_RUN_PACKAGE_JSON_PATH`: The path to the `package.json` that is being | |
| 2133 | 2133 | processed. | |
| 2134 | 2134 | ||
| 2135 | + ### `--secure-heap-min=n` | ||
| 2136 | + | ||
| 2137 | + <!-- YAML | ||
| 2138 | + added: v15.6.0 | ||
| 2139 | + --> | ||
| 2140 | + | ||
| 2141 | + When using `--secure-heap`, the `--secure-heap-min` flag specifies the | ||
| 2142 | + minimum allocation from the secure heap. The minimum value is `2`. | ||
| 2143 | + The maximum value is the lesser of `--secure-heap` or `2147483647`. | ||
| 2144 | + The value given must be a power of two. | ||
| 2145 | + | ||
| 2135 | 2146 | ### `--secure-heap=n` | |
| 2136 | 2147 | ||
| 2137 | 2148 | <!-- YAML | |
@@ -2157,17 +2168,6 @@ The secure heap is not available on Windows. | |||
| 2157 | 2168 | ||
| 2158 | 2169 | See [`CRYPTO_secure_malloc_init`][] for more details. | |
| 2159 | 2170 | ||
| 2160 | - ### `--secure-heap-min=n` | ||
| 2161 | - | ||
| 2162 | - <!-- YAML | ||
| 2163 | - added: v15.6.0 | ||
| 2164 | - --> | ||
| 2165 | - | ||
| 2166 | - When using `--secure-heap`, the `--secure-heap-min` flag specifies the | ||
| 2167 | - minimum allocation from the secure heap. The minimum value is `2`. | ||
| 2168 | - The maximum value is the lesser of `--secure-heap` or `2147483647`. | ||
| 2169 | - The value given must be a power of two. | ||
| 2170 | - | ||
| 2171 | 2171 | ### `--snapshot-blob=path` | |
| 2172 | 2172 | ||
| 2173 | 2173 | <!-- YAML | |
@@ -2878,11 +2878,6 @@ and `NODE_DISABLE_COLORS` environment variables are ignored. | |||
| 2878 | 2878 | ||
| 2879 | 2879 | Any other value will result in colorized output being disabled. | |
| 2880 | 2880 | ||
| 2881 | - ### `NO_COLOR=<any>` | ||
| 2882 | - | ||
| 2883 | - [`NO_COLOR`][] is an alias for `NODE_DISABLE_COLORS`. The value of the | ||
| 2884 | - environment variable is arbitrary. | ||
| 2885 | - | ||
| 2886 | 2881 | ### `NODE_COMPILE_CACHE=dir` | |
| 2887 | 2882 | ||
| 2888 | 2883 | <!-- YAML | |
@@ -3288,6 +3283,11 @@ easier to instrument applications that call the `child_process.spawn()` family | |||
| 3288 | 3283 | of functions. `NODE_V8_COVERAGE` can be set to an empty string, to prevent | |
| 3289 | 3284 | propagation. | |
| 3290 | 3285 | ||
| 3286 | + ### `NO_COLOR=<any>` | ||
| 3287 | + | ||
| 3288 | + [`NO_COLOR`][] is an alias for `NODE_DISABLE_COLORS`. The value of the | ||
| 3289 | + environment variable is arbitrary. | ||
| 3290 | + | ||
| 3291 | 3291 | #### Coverage output | |
| 3292 | 3292 | ||
| 3293 | 3293 | Coverage is output as an array of [ScriptCoverage][] objects on the top-level | |
@@ -3472,19 +3472,9 @@ documented here: | |||
| 3472 | 3472 | ||
| 3473 | 3473 | ### `--harmony-shadow-realm` | |
| 3474 | 3474 | ||
| 3475 | - ### `--jitless` | ||
| 3476 | - | ||
| 3477 | 3475 | ### `--interpreted-frames-native-stack` | |
| 3478 | 3476 | ||
| 3479 | - ### `--prof` | ||
| 3480 | - | ||
| 3481 | - ### `--perf-basic-prof` | ||
| 3482 | - | ||
| 3483 | - ### `--perf-basic-prof-only-functions` | ||
| 3484 | - | ||
| 3485 | - ### `--perf-prof` | ||
| 3486 | - | ||
| 3487 | - ### `--perf-prof-unwinding-info` | ||
| 3477 | + ### `--jitless` | ||
| 3488 | 3478 | ||
| 3489 | 3479 | <!-- Anchor to make sure old links find a target --> | |
| 3490 | 3480 | ||
@@ -3536,6 +3526,16 @@ for MiB in 16 32 64 128; do | |||
| 3536 | 3526 | done | |
| 3537 | 3527 | ``` | |
| 3538 | 3528 | ||
| 3529 | + ### `--perf-basic-prof` | ||
| 3530 | + | ||
| 3531 | + ### `--perf-basic-prof-only-functions` | ||
| 3532 | + | ||
| 3533 | + ### `--perf-prof` | ||
| 3534 | + | ||
| 3535 | + ### `--perf-prof-unwinding-info` | ||
| 3536 | + | ||
| 3537 | + ### `--prof` | ||
| 3538 | + | ||
| 3539 | 3539 | ### `--security-revert` | |
| 3540 | 3540 | ||
| 3541 | 3541 | ### `--stack-trace-limit=limit` | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -123,6 +123,21 @@ for (const [, envVar, config] of nodeOptionsCC.matchAll(addOptionRE)) { | |||
| 123 | 123 | } | |
| 124 | 124 | } | |
| 125 | 125 | ||
| 126 | + { | ||
| 127 | + const sections = /^## (.+)$/mg; | ||
| 128 | + const cliOptionPattern = /^### (?:`-\w.*`, )?`([^`]+)`/mg; | ||
| 129 | + let match; | ||
| 130 | + let previousIndex = 0; | ||
| 131 | + do { | ||
| 132 | + const sectionTitle = match?.[1]; | ||
| 133 | + match = sections.exec(cliText); | ||
| 134 | + const filteredCLIText = cliText.slice(previousIndex, match?.index); | ||
| 135 | + const options = Array.from(filteredCLIText.matchAll(cliOptionPattern), (match) => match[1]); | ||
| 136 | + assert.deepStrictEqual(options, options.toSorted(), `doc/api/cli.md ${sectionTitle} subsections are not in alphabetical order`); | ||
| 137 | + previousIndex = match?.index; | ||
| 138 | + } while (match); | ||
| 139 | + } | ||
| 140 | + | ||
| 126 | 141 | // add alias handling | |
| 127 | 142 | manPagesOptions.delete('-trace-events-enabled'); | |
| 128 | 143 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments