From d192cc264020a8eeeafbdde4f06bb9b1cae9a5d2 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Thu, 7 Dec 2023 22:35:53 -0500 Subject: fix: add more warnings when using sloppy imports (#21503) One warning for when using it with `deno compile` and another when using it with `deno run`. --- cli/tests/integration/run_tests.rs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (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 03de97ee7..058f92572 100644 --- a/cli/tests/integration/run_tests.rs +++ b/cli/tests/integration/run_tests.rs @@ -4787,21 +4787,22 @@ console.log(g.G); .args("run main.ts") .run() .assert_matches_text( - "Warning Sloppy import resolution (hint: update .js extension to .ts) + "Warning Sloppy imports are not recommended and have a negative impact on performance. +Warning Sloppy module resolution (hint: update .js extension to .ts) at file:///[WILDCARD]/main.ts:1:20 -Warning Sloppy import resolution (hint: add .js extension) +Warning Sloppy module resolution (hint: add .js extension) at file:///[WILDCARD]/main.ts:2:20 -Warning Sloppy import resolution (hint: add .mts extension) +Warning Sloppy module resolution (hint: add .mts extension) at file:///[WILDCARD]/main.ts:3:20 -Warning Sloppy import resolution (hint: add .mjs extension) +Warning Sloppy module resolution (hint: add .mjs extension) at file:///[WILDCARD]/main.ts:4:20 -Warning Sloppy import resolution (hint: add .tsx extension) +Warning Sloppy module resolution (hint: add .tsx extension) at file:///[WILDCARD]/main.ts:5:20 -Warning Sloppy import resolution (hint: update .js extension to .tsx) +Warning Sloppy module resolution (hint: update .js extension to .tsx) at file:///[WILDCARD]/main.ts:6:21 -Warning Sloppy import resolution (hint: add .jsx extension) +Warning Sloppy module resolution (hint: add .jsx extension) at file:///[WILDCARD]/main.ts:7:20 -Warning Sloppy import resolution (hint: specify path to index.tsx file in directory instead) +Warning Sloppy module resolution (hint: specify path to index.tsx file in directory instead) at file:///[WILDCARD]/main.ts:8:20 [class A] [class B] -- cgit v1.2.3