diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/integration/publish_tests.rs | 9 | ||||
-rw-r--r-- | tests/testdata/publish/allow_slow_types.out | 1 | ||||
-rw-r--r-- | tests/testdata/publish/deno_jsonc.out | 1 | ||||
-rw-r--r-- | tests/testdata/publish/deno_jsonc/mod.ts | 4 | ||||
-rw-r--r-- | tests/testdata/publish/dry_run.out | 5 | ||||
-rw-r--r-- | tests/testdata/publish/has_slow_types.out | 1 | ||||
-rw-r--r-- | tests/testdata/publish/invalid_import.out | 1 | ||||
-rw-r--r-- | tests/testdata/publish/invalid_path.out | 1 | ||||
-rw-r--r-- | tests/testdata/publish/javascript_decl_file.out | 2 | ||||
-rw-r--r-- | tests/testdata/publish/node_specifier.out | 3 | ||||
-rw-r--r-- | tests/testdata/publish/successful.out | 1 | ||||
-rw-r--r-- | tests/testdata/publish/successful/mod.ts | 4 | ||||
-rw-r--r-- | tests/testdata/publish/successful_no_check.out | 5 | ||||
-rw-r--r-- | tests/testdata/publish/symlink.out | 1 | ||||
-rw-r--r-- | tests/testdata/publish/unanalyzable_dynamic_import.out | 5 | ||||
-rw-r--r-- | tests/testdata/publish/unanalyzable_dynamic_import/mod.ts | 1 | ||||
-rw-r--r-- | tests/testdata/publish/workspace.out | 2 | ||||
-rw-r--r-- | tests/testdata/publish/workspace_individual.out | 1 |
18 files changed, 40 insertions, 8 deletions
diff --git a/tests/integration/publish_tests.rs b/tests/integration/publish_tests.rs index 48e62e905..61cb40fba 100644 --- a/tests/integration/publish_tests.rs +++ b/tests/integration/publish_tests.rs @@ -155,6 +155,15 @@ itest!(successful { http_server: true, }); +itest!(no_check { + args: "publish --token 'sadfasdf' --no-check", + // still type checks the slow types output though + output: "publish/successful_no_check.out", + cwd: Some("publish/successful"), + envs: env_vars_for_jsr_tests(), + http_server: true, +}); + itest!(node_specifier { args: "publish --token 'sadfasdf'", output: "publish/node_specifier.out", diff --git a/tests/testdata/publish/allow_slow_types.out b/tests/testdata/publish/allow_slow_types.out index fe3788021..cd22c0ce7 100644 --- a/tests/testdata/publish/allow_slow_types.out +++ b/tests/testdata/publish/allow_slow_types.out @@ -1,3 +1,4 @@ +Check file:///[WILDCARD]mod.ts Warning Publishing a library with slow types is not recommended. This may lead to poor type checking performance for users of your package, may affect the quality of automatic documentation generation, and your package will not be shipped with a .d.ts file for Node.js users. Publishing @foo/bar@1.1.0 ... Successfully published @foo/bar@1.1.0 diff --git a/tests/testdata/publish/deno_jsonc.out b/tests/testdata/publish/deno_jsonc.out index aae82c339..820554943 100644 --- a/tests/testdata/publish/deno_jsonc.out +++ b/tests/testdata/publish/deno_jsonc.out @@ -1,3 +1,4 @@ +Check file:///[WILDCARD]/publish/deno_jsonc/mod.ts Checking for slow types in the public API... Check file:///[WILDCARD]/publish/deno_jsonc/mod.ts Publishing @foo/bar@1.0.0 ... diff --git a/tests/testdata/publish/deno_jsonc/mod.ts b/tests/testdata/publish/deno_jsonc/mod.ts index 4bb6da255..6e8a61bae 100644 --- a/tests/testdata/publish/deno_jsonc/mod.ts +++ b/tests/testdata/publish/deno_jsonc/mod.ts @@ -1,5 +1,7 @@ import http from "@std/http"; export function foobar(): { fileServer(): void } { - return http.fileServer; + return { + fileServer: http.fileServer, + }; } diff --git a/tests/testdata/publish/dry_run.out b/tests/testdata/publish/dry_run.out index 679aa8f39..afc2ba66a 100644 --- a/tests/testdata/publish/dry_run.out +++ b/tests/testdata/publish/dry_run.out @@ -1,7 +1,8 @@ +Check file:///[WILDCARD]/mod.ts Checking for slow types in the public API... -Check [WILDCARD] +Check file:///[WILDCARD]/mod.ts Simulating publish of @foo/bar@1.0.0 with files: [WILDCARD]deno.json (140B) - [WILDCARD]mod.ts (114B) + [WILDCARD]mod.ts (137B) [WILDCARD]std_http.ts (119B) Warning Aborting due to --dry-run diff --git a/tests/testdata/publish/has_slow_types.out b/tests/testdata/publish/has_slow_types.out index 06e042145..43ac86658 100644 --- a/tests/testdata/publish/has_slow_types.out +++ b/tests/testdata/publish/has_slow_types.out @@ -1,3 +1,4 @@ +Check file:///[WILDCARD]/mod.ts Checking for slow types in the public API... error[missing-explicit-return-type]: missing explicit return type in the public API --> [WILDCARD]mod.ts:2:17 diff --git a/tests/testdata/publish/invalid_import.out b/tests/testdata/publish/invalid_import.out index f123a341b..f6742de95 100644 --- a/tests/testdata/publish/invalid_import.out +++ b/tests/testdata/publish/invalid_import.out @@ -2,6 +2,7 @@ Download http://localhost:4545/welcome.ts Download http://localhost:4545/echo.ts Download http://localhost:4545/npm/registry/chalk Download http://localhost:4545/npm/registry/chalk/chalk-5.0.1.tgz +Check file:///[WILDCARD]/mod.ts Checking for slow types in the public API... Check file://[WILDCARD]mod.ts error[invalid-external-import]: invalid import to a non-JSR 'http' specifier diff --git a/tests/testdata/publish/invalid_path.out b/tests/testdata/publish/invalid_path.out index bad1a6495..d47cb01de 100644 --- a/tests/testdata/publish/invalid_path.out +++ b/tests/testdata/publish/invalid_path.out @@ -1,3 +1,4 @@ +Check file://[WILDCARD]mod.ts Checking for slow types in the public API... Check file://[WILDCARD]mod.ts error[invalid-path]: package path must not contain whitespace (found ' ') diff --git a/tests/testdata/publish/javascript_decl_file.out b/tests/testdata/publish/javascript_decl_file.out index 2eda47cb4..48128e82f 100644 --- a/tests/testdata/publish/javascript_decl_file.out +++ b/tests/testdata/publish/javascript_decl_file.out @@ -1,5 +1,5 @@ -Checking for slow types in the public API... Check file:///[WILDCARD]/javascript_decl_file/mod.js +Checking for slow types in the public API... 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 diff --git a/tests/testdata/publish/node_specifier.out b/tests/testdata/publish/node_specifier.out index 9ba10c75b..d3e4a367b 100644 --- a/tests/testdata/publish/node_specifier.out +++ b/tests/testdata/publish/node_specifier.out @@ -1,6 +1,7 @@ -Checking for slow types in the public API... Download http://localhost:4545/npm/registry/@types/node Download http://localhost:4545/npm/registry/@types/node/node-[WILDCARD].tgz +Check file:///[WILDCARD]/mod.ts +Checking for slow types in the public API... Check file:///[WILDCARD]/publish/node_specifier/mod.ts Publishing @foo/bar@1.0.0 ... Successfully published @foo/bar@1.0.0 diff --git a/tests/testdata/publish/successful.out b/tests/testdata/publish/successful.out index 1dd6168eb..a3da4290d 100644 --- a/tests/testdata/publish/successful.out +++ b/tests/testdata/publish/successful.out @@ -1,3 +1,4 @@ +Check file:///[WILDCARD]/publish/successful/mod.ts Checking for slow types in the public API... Check file:///[WILDCARD]/publish/successful/mod.ts Publishing @foo/bar@1.0.0 ... diff --git a/tests/testdata/publish/successful/mod.ts b/tests/testdata/publish/successful/mod.ts index 4bb6da255..6e8a61bae 100644 --- a/tests/testdata/publish/successful/mod.ts +++ b/tests/testdata/publish/successful/mod.ts @@ -1,5 +1,7 @@ import http from "@std/http"; export function foobar(): { fileServer(): void } { - return http.fileServer; + return { + fileServer: http.fileServer, + }; } diff --git a/tests/testdata/publish/successful_no_check.out b/tests/testdata/publish/successful_no_check.out new file mode 100644 index 000000000..1dd6168eb --- /dev/null +++ b/tests/testdata/publish/successful_no_check.out @@ -0,0 +1,5 @@ +Checking for slow types in the public API... +Check file:///[WILDCARD]/publish/successful/mod.ts +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 diff --git a/tests/testdata/publish/symlink.out b/tests/testdata/publish/symlink.out index e7fc0c2a2..9f89f5b7c 100644 --- a/tests/testdata/publish/symlink.out +++ b/tests/testdata/publish/symlink.out @@ -1,3 +1,4 @@ +Check [WILDCARD]mod.ts Checking for slow types in the public API... Check [WILDCARD]mod.ts warning[unsupported-file-type]: unsupported file type 'symlink' diff --git a/tests/testdata/publish/unanalyzable_dynamic_import.out b/tests/testdata/publish/unanalyzable_dynamic_import.out index 97306c079..a68b29932 100644 --- a/tests/testdata/publish/unanalyzable_dynamic_import.out +++ b/tests/testdata/publish/unanalyzable_dynamic_import.out @@ -1,9 +1,10 @@ +Check file://[WILDCARD]/mod.ts Checking for slow types in the public API... Check file://[WILDCARD]/mod.ts warning[unanalyzable-dynamic-import]: unable to analyze dynamic import - --> [WILDCARD]mod.ts:1:7 + --> [WILDCARD]mod.ts:2:7 | -1 | await import("asd " + asd); +2 | await import("asd " + asd); | ^^^^^^^^^^^^^^^^^^^^ the unanalyzable dynamic import info: after publishing this package, imports from the local import map do not work diff --git a/tests/testdata/publish/unanalyzable_dynamic_import/mod.ts b/tests/testdata/publish/unanalyzable_dynamic_import/mod.ts index fd53cb2c8..291311385 100644 --- a/tests/testdata/publish/unanalyzable_dynamic_import/mod.ts +++ b/tests/testdata/publish/unanalyzable_dynamic_import/mod.ts @@ -1 +1,2 @@ +const asd = "asd"; await import("asd " + asd); diff --git a/tests/testdata/publish/workspace.out b/tests/testdata/publish/workspace.out index ceffc48cf..17f2dab3b 100644 --- a/tests/testdata/publish/workspace.out +++ b/tests/testdata/publish/workspace.out @@ -1,4 +1,6 @@ Publishing a workspace... +Check file:///[WILDCARD]/workspace/foo/mod.ts +Check file:///[WILDCARD]/workspace/bar/mod.ts Checking for slow types in the public API... Check file:///[WILDCARD]/workspace/foo/mod.ts Check file:///[WILDCARD]/workspace/bar/mod.ts diff --git a/tests/testdata/publish/workspace_individual.out b/tests/testdata/publish/workspace_individual.out index 61fac206b..e734ae06e 100644 --- a/tests/testdata/publish/workspace_individual.out +++ b/tests/testdata/publish/workspace_individual.out @@ -1,3 +1,4 @@ +Check file:///[WILDCARD]/workspace/bar/mod.ts Checking for slow types in the public API... Check file:///[WILDCARD]/workspace/bar/mod.ts Publishing @foo/bar@1.0.0 ... |