From 9e0495baa7565737b8f1d66348b45bbed14831e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 26 Jan 2024 16:41:16 +0100 Subject: fix: make deprecation warnings less verbose (#22128) This commit makes deprecation warnings less verbose by default. Only a single warnings is issued per deprecated API use. `DENO_VERBOSE_WARNINGS` env var can be provided to enable more detailed logging for each use of API including a stack trace. https://github.com/denoland/deno/assets/13602871/9c036c84-0044-4cb6-9c8e-deb641f43712 --- cli/tests/integration/run_tests.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'cli/tests/integration/run_tests.rs') diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs index b8acce94d..b4ce77f0c 100644 --- a/cli/tests/integration/run_tests.rs +++ b/cli/tests/integration/run_tests.rs @@ -5099,6 +5099,14 @@ itest!(warn_on_deprecated_api { exit_code: 0, }); +itest!(warn_on_deprecated_api_verbose { + args: "run -A run/warn_on_deprecated_api/main.js", + output: "run/warn_on_deprecated_api/main.verbose.out", + envs: vec![("DENO_VERBOSE_WARNINGS".to_string(), "1".to_string())], + http_server: true, + exit_code: 0, +}); + itest!(warn_on_deprecated_api_with_flag { args: "run -A --quiet run/warn_on_deprecated_api/main.js", output: "run/warn_on_deprecated_api/main_disabled_flag.out", -- cgit v1.2.3