From f0ec4fe1b89215ce9e62ebf47d8907dd6336f35e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 7 Mar 2024 13:59:57 +0000 Subject: fix(publish): silence warnings for sloppy imports and node builtins with env var (#22760) An undocumented "DENO_DISABLE_PEDANTIC_NODE_WARNINGS" env var can be used to silence warnings for sloppy imports and node builtins without `node:` prefix. --- tests/integration/publish_tests.rs | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'tests/integration') diff --git a/tests/integration/publish_tests.rs b/tests/integration/publish_tests.rs index ec5345553..ce93ccda3 100644 --- a/tests/integration/publish_tests.rs +++ b/tests/integration/publish_tests.rs @@ -250,6 +250,23 @@ itest!(bare_node_builtins { http_server: true, }); +itest!(bare_node_builtins_warning_no_warnings { + args: "publish --token 'sadfasdf' --dry-run --unstable-bare-node-builtins", + output: "publish/bare_node_builtins_no_warnings.out", + cwd: Some("publish/bare_node_builtins"), + envs: env_vars_for_jsr_npm_tests() + .into_iter() + .chain( + vec![( + "DENO_DISABLE_PEDANTIC_NODE_WARNINGS".to_string(), + "1".to_string() + )] + .into_iter() + ) + .collect(), + http_server: true, +}); + itest!(sloppy_imports { args: "publish --token 'sadfasdf' --dry-run --unstable-sloppy-imports", output: "publish/sloppy_imports.out", @@ -258,6 +275,23 @@ itest!(sloppy_imports { http_server: true, }); +itest!(sloppy_imports_no_warnings { + args: "publish --token 'sadfasdf' --dry-run --unstable-sloppy-imports", + output: "publish/sloppy_imports_no_warnings.out", + cwd: Some("publish/sloppy_imports"), + envs: env_vars_for_jsr_tests() + .into_iter() + .chain( + vec![( + "DENO_DISABLE_PEDANTIC_NODE_WARNINGS".to_string(), + "1".to_string() + )] + .into_iter() + ) + .collect(), + http_server: true, +}); + itest!(jsr_jsonc { args: "publish --token 'sadfasdf'", cwd: Some("publish/jsr_jsonc"), -- cgit v1.2.3