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/testdata/publish/bare_node_builtins_no_warnings.out | 9 +++++++++ tests/testdata/publish/sloppy_imports_no_warnings.out | 8 ++++++++ 2 files changed, 17 insertions(+) create mode 100644 tests/testdata/publish/bare_node_builtins_no_warnings.out create mode 100644 tests/testdata/publish/sloppy_imports_no_warnings.out (limited to 'tests/testdata') diff --git a/tests/testdata/publish/bare_node_builtins_no_warnings.out b/tests/testdata/publish/bare_node_builtins_no_warnings.out new file mode 100644 index 000000000..c45c357ce --- /dev/null +++ b/tests/testdata/publish/bare_node_builtins_no_warnings.out @@ -0,0 +1,9 @@ +Download http://localhost:4545/npm/registry/@types/node +Download http://localhost:4545/npm/registry/@types/node/node-18.8.2.tgz +Check file:///[WILDCARD]/publish/bare_node_builtins/mod.ts +Checking for slow types in the public API... +Check file:///[WILDCARD]/publish/bare_node_builtins/mod.ts +Simulating publish of @foo/bar@1.0.0 with files: + file:///[WILDCARD]/publish/bare_node_builtins/deno.json (87B) + file:///[WILDCARD]/publish/bare_node_builtins/mod.ts (121B) +Warning Aborting due to --dry-run diff --git a/tests/testdata/publish/sloppy_imports_no_warnings.out b/tests/testdata/publish/sloppy_imports_no_warnings.out new file mode 100644 index 000000000..8659010b7 --- /dev/null +++ b/tests/testdata/publish/sloppy_imports_no_warnings.out @@ -0,0 +1,8 @@ +Check file:///[WILDCARD]/publish/sloppy_imports/mod.ts +Checking for slow types in the public API... +Check file:///[WILDCARD]/publish/sloppy_imports/mod.ts +Simulating publish of @foo/bar@1.0.0 with files: + file:///[WILDCARD]/publish/sloppy_imports/b/index.ts (27B) + file:///[WILDCARD]/publish/sloppy_imports/deno.json (87B) + file:///[WILDCARD]/publish/sloppy_imports/mod.ts (35B) +Warning Aborting due to --dry-run -- cgit v1.2.3