From 830d096b66696ad9f4e67b3ed8460fb1ff7a9170 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 1 Feb 2024 03:16:52 +0100 Subject: fix(publish): rename --no-fast-check to --no-zap (#22214) Also prints an information about the flag when there are `zap` errors. --- cli/tests/integration/publish_tests.rs | 6 +++--- cli/tests/testdata/publish/invalid_fast_check.out | 4 ++++ cli/tests/testdata/publish/no_fast_check.out | 4 ---- cli/tests/testdata/publish/no_zap.out | 4 ++++ 4 files changed, 11 insertions(+), 7 deletions(-) delete mode 100644 cli/tests/testdata/publish/no_fast_check.out create mode 100644 cli/tests/testdata/publish/no_zap.out (limited to 'cli/tests') diff --git a/cli/tests/integration/publish_tests.rs b/cli/tests/integration/publish_tests.rs index 675ceced2..6b6fac70d 100644 --- a/cli/tests/integration/publish_tests.rs +++ b/cli/tests/integration/publish_tests.rs @@ -36,9 +36,9 @@ itest!(invalid_fast_check { exit_code: 1, }); -itest!(no_fast_check { - args: "publish --no-fast-check --token 'sadfasdf'", - output: "publish/no_fast_check.out", +itest!(no_zap { + args: "publish --no-zap --token 'sadfasdf'", + output: "publish/no_zap.out", cwd: Some("publish/invalid_fast_check"), exit_code: 1, }); diff --git a/cli/tests/testdata/publish/invalid_fast_check.out b/cli/tests/testdata/publish/invalid_fast_check.out index f37638b9f..34b9b0314 100644 --- a/cli/tests/testdata/publish/invalid_fast_check.out +++ b/cli/tests/testdata/publish/invalid_fast_check.out @@ -9,4 +9,8 @@ error[zap-missing-explicit-return-type]: missing explicit return type in the pub info: all functions in the public API must have an explicit return type docs: https://jsr.io/go/zap-missing-explicit-return-type +This package contains Zap errors. Although conforming to Zap will +significantly improve the type checking performance of your library, +you can choose to skip it by providing the --no-zap flag. + error: Found 1 problem diff --git a/cli/tests/testdata/publish/no_fast_check.out b/cli/tests/testdata/publish/no_fast_check.out deleted file mode 100644 index ac26c67c2..000000000 --- a/cli/tests/testdata/publish/no_fast_check.out +++ /dev/null @@ -1,4 +0,0 @@ -Ensuring type checks... -Check file:///[WILDCARD]/mod.ts -error: Following packages don't exist, follow the links and create them: - - https://jsr.io/new?scope=foo&package=bar&from=cli diff --git a/cli/tests/testdata/publish/no_zap.out b/cli/tests/testdata/publish/no_zap.out new file mode 100644 index 000000000..ac26c67c2 --- /dev/null +++ b/cli/tests/testdata/publish/no_zap.out @@ -0,0 +1,4 @@ +Ensuring type checks... +Check file:///[WILDCARD]/mod.ts +error: Following packages don't exist, follow the links and create them: + - https://jsr.io/new?scope=foo&package=bar&from=cli -- cgit v1.2.3