summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/publish
diff options
context:
space:
mode:
authorLuca Casonato <hello@lcas.dev>2024-01-23 16:37:43 +0100
committerGitHub <noreply@github.com>2024-01-23 16:37:43 +0100
commit137f1a0c6836b50292c53e15aa85bd56ad14a943 (patch)
treec0bf018dbacee30ca80817ffc82751b6f9870fa0 /cli/tests/testdata/publish
parent427b73c3ec1e01ca8c670d403a85fcf31777d253 (diff)
feat(cli): improved diagnostics printing (#22049)
This initially uses the new diagnostic printer in `deno lint`, `deno doc` and `deno publish`. In the limit we should also update `deno check` to use this printer.
Diffstat (limited to 'cli/tests/testdata/publish')
-rw-r--r--cli/tests/testdata/publish/invalid_fast_check.out13
-rw-r--r--cli/tests/testdata/publish/javascript_missing_decl_file.out11
2 files changed, 18 insertions, 6 deletions
diff --git a/cli/tests/testdata/publish/invalid_fast_check.out b/cli/tests/testdata/publish/invalid_fast_check.out
index e34cfecdf..37e25e269 100644
--- a/cli/tests/testdata/publish/invalid_fast_check.out
+++ b/cli/tests/testdata/publish/invalid_fast_check.out
@@ -1,8 +1,13 @@
Checking fast check type graph for errors...
+error[zap-missing-explicit-return-type]: missing explicit return type in the public API
+ --> [WILDCARD]mod.ts:2:17
+ |
+2 | export function getRandom() {
+ | ^^^^^^^^^ this function is missing an explicit return type
+ = hint: add an explit return type to the function
-missing explicit return type in the public API
- at file:///[WILDCARD]/publish/invalid_fast_check/mod.ts@68
+ info: all functions in the public API must have an explicit return type
+ docs: https://jsr.io/go/zap-missing-explicit-return-type
-Fixing these fast check errors is required to make the code fast check compatible which enables type checking your package's TypeScript code with the same performance as if you had distributed declaration files. Do any of these errors seem too restrictive or incorrect? Please open an issue if so to help us improve: https://github.com/denoland/deno/issues
-error: Had 1 fast check error.
+error: Found 1 problem
diff --git a/cli/tests/testdata/publish/javascript_missing_decl_file.out b/cli/tests/testdata/publish/javascript_missing_decl_file.out
index 02478a5b5..bf7797c09 100644
--- a/cli/tests/testdata/publish/javascript_missing_decl_file.out
+++ b/cli/tests/testdata/publish/javascript_missing_decl_file.out
@@ -1,6 +1,13 @@
Checking fast check type graph for errors...
-Warning Package '@foo/bar' is a JavaScript package without a corresponding declaration file. This may lead to a non-optimal experience for users of your package. For performance reasons, it's recommended to ship a corresponding TypeScript declaration file or to convert to TypeScript.
-Ensuring type checks...
+warning[zap-unsupported-javascript-entrypoint]: used a JavaScript module without type declarations as an entrypoints
+ --> [WILDCARD]mod.js
+ = hint: add a type declaration (d.ts) for the JavaScript module, or rewrite it to TypeScript
+
+ info: JavaScript files with no corresponding declaration require type inference to be type checked
+ info: fast check avoids type inference, so JavaScript entrypoints should be avoided
+ docs: https://jsr.io/go/zap-unsupported-javascript-entrypoint
+
+
Publishing @foo/bar@1.0.0 ...
Successfully published @foo/bar@1.0.0
Visit http://127.0.0.1:4250/@foo/bar@1.0.0 for details