Compare commits

...

1 Commits

Author SHA1 Message Date
David Sanders
26a43df51a feat: support no-warnings and disable-warning Node.js cli flags 2025-05-08 22:19:37 -07:00
2 changed files with 13 additions and 0 deletions

View File

@@ -272,6 +272,13 @@ Set the `host:port` to be used when the inspector is activated. Useful when acti
Aliased to `--debug-port=[host:]port`.
### `--disable-warning=code-or-type`
Disable specific process warnings by `code` or `type`.
Warnings emitted from [`process.emitWarning()`](https://nodejs.org/api/process.html#processemitwarningwarning-options)
may contain a `code` and a `type`. This option will not-emit warnings that have a matching `code` or `type`.
### `--inspect\[=\[host:]port]`
Activate inspector on `host:port`. Default is `127.0.0.1:9229`.
@@ -292,6 +299,10 @@ By default inspector websocket url is available in stderr and under /json/list e
Silence deprecation warnings.
### `--no-warnings`
Silence all process warnings (including deprecations).
### `--throw-deprecation`
Throw errors for deprecations.

View File

@@ -353,8 +353,10 @@ bool IsAllowedOption(const std::string_view option) {
// This should be aligned with what's possible to set via the process object.
static constexpr auto options = base::MakeFixedFlatSet<std::string_view>({
"--diagnostic-dir",
"--disable-warning",
"--dns-result-order",
"--no-deprecation",
"--no-warnings",
"--throw-deprecation",
"--trace-deprecation",
"--trace-warnings",