From 0693a7959ba8ea64927fc2bf34e9f5b7fcf5f201 Mon Sep 17 00:00:00 2001 From: Cody Deckard Date: Tue, 17 Dec 2019 00:33:23 +0000 Subject: [PATCH] process: add CLI opt to hide experimental warnings Adds a command line option to supress experimental warnings. Currently this cannot be accomplished without supressing all warnings (by using the --no-warnings option). However, once this option is enabled, a user can miss out on essential warnings as this supresses all warnings. This commit adds the --no-experimental-warnings command line option to allow users to ignore warnings they will expect while still being able to monitor unexpected warnings. Fixes: https://github.com/nodejs/node/issues/30810 --- doc/api/cli.md | 9 +++++++++ lib/internal/util.js | 2 ++ src/node_options.cc | 4 ++++ src/node_options.h | 1 + ...test-process-no-emit-experimental-warnings.js | 16 ++++++++++++++++ 5 files changed, 32 insertions(+) create mode 100644 test/parallel/test-process-no-emit-experimental-warnings.js diff --git a/doc/api/cli.md b/doc/api/cli.md index d098a199e055e6..0654b991a6fcd2 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -455,6 +455,14 @@ added: v0.8.0 Silence deprecation warnings. +### `--no-experimental-warnings` + + +Silence all experimental process warnings. These are emitted when using +features which are considered experimental. + ### `--no-force-async-hooks-checks`