node/lib/internal/main
Michaël Zasso 3c7a7d9ee4
src: allow to negate boolean CLI flags
This change allows all boolean flags to be negated using the `--no-`
prefix.
Flags that are `true` by default (for example `--deprecation`) are
still documented as negations.
With this change, it becomes possible to easily flip the default
value of a boolean flag and to override the value of a flag passed
in the NODE_OPTIONS environment variable.
`process.allowedNodeEnvironmentFlags` contains both the negated and
non-negated versions of boolean flags.

Co-authored-by: Anna Henningsen <anna@addaleax.net>

PR-URL: https://github.com/nodejs/node/pull/39023
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2021-06-21 18:30:42 -04:00
..
.eslintrc.yaml
check_syntax.js module: loader getSource, getFormat, transform hooks 2020-01-07 01:31:05 +02:00
eval_stdin.js lib: use getOptionValue instead of process underscore aliases 2019-04-20 00:20:37 +08:00
eval_string.js lib: enforce using primordials.globalThis instead of global 2021-04-17 15:30:58 +02:00
inspect.js debugger: rename internal library for clarity 2021-06-21 11:08:09 -04:00
print_help.js src: allow to negate boolean CLI flags 2021-06-21 18:30:42 -04:00
prof_process.js process: call prepareMainThreadExecution in all main thread scripts 2019-03-08 13:57:36 +01:00
repl.js repl: support --loader option in builtin REPL 2020-07-14 15:21:26 +02:00
run_main_module.js module: reduce circular dependency of internal/modules/cjs/loader 2019-11-19 13:43:59 +01:00
worker_thread.js lib: harden lint checks for globals 2021-04-29 13:45:43 +02:00