From 594d8397ad46a90389bec9a76afde1bc7f1fa35b Mon Sep 17 00:00:00 2001 From: David Sherret Date: Thu, 7 Mar 2024 11:30:30 -0500 Subject: fix(publish): properly display graph validation errors (#22775) The graph validation errors were displaying cryptically during publish. This fixes that. --- tests/integration/publish_tests.rs | 9 +++++++++ tests/testdata/publish/sloppy_imports_not_enabled.out | 2 ++ 2 files changed, 11 insertions(+) create mode 100644 tests/testdata/publish/sloppy_imports_not_enabled.out (limited to 'tests') diff --git a/tests/integration/publish_tests.rs b/tests/integration/publish_tests.rs index ce93ccda3..cb1072bc0 100644 --- a/tests/integration/publish_tests.rs +++ b/tests/integration/publish_tests.rs @@ -275,6 +275,15 @@ itest!(sloppy_imports { http_server: true, }); +itest!(sloppy_imports_not_enabled { + args: "publish --token 'sadfasdf' --dry-run", + output: "publish/sloppy_imports_not_enabled.out", + cwd: Some("publish/sloppy_imports"), + envs: env_vars_for_jsr_tests(), + http_server: true, + exit_code: 1, +}); + itest!(sloppy_imports_no_warnings { args: "publish --token 'sadfasdf' --dry-run --unstable-sloppy-imports", output: "publish/sloppy_imports_no_warnings.out", diff --git a/tests/testdata/publish/sloppy_imports_not_enabled.out b/tests/testdata/publish/sloppy_imports_not_enabled.out new file mode 100644 index 000000000..c2f74ad2c --- /dev/null +++ b/tests/testdata/publish/sloppy_imports_not_enabled.out @@ -0,0 +1,2 @@ +error: [WILDCARD] Maybe specify path to 'index.ts' file in directory instead or run with --unstable-sloppy-imports + at file:///[WILDCARD]/sloppy_imports/mod.ts:1:20 -- cgit v1.2.3