summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/publish_tests.rs2
-rw-r--r--tests/specs/jsr/excluded_export_module/LICENSE0
-rw-r--r--tests/specs/jsr/no_unused_params/LICENSE0
-rw-r--r--tests/specs/jsr/no_unused_params/publish.out1
-rw-r--r--tests/specs/publish/allow_slow_types/LICENSE0
-rw-r--r--tests/specs/publish/banned_triple_slash_directives/LICENSE0
-rw-r--r--tests/specs/publish/bare_node_builtins/LICENSE0
-rw-r--r--tests/specs/publish/bare_node_builtins/bare_node_builtins.out1
-rw-r--r--tests/specs/publish/bare_node_builtins/no_warnings.out1
-rw-r--r--tests/specs/publish/byonm_dep/LICENSE0
-rw-r--r--tests/specs/publish/byonm_dep/deno.jsonc2
-rw-r--r--tests/specs/publish/byonm_dep/publish.out1
-rw-r--r--tests/specs/publish/byonm_with_package_json/LICENSE0
-rw-r--r--tests/specs/publish/config_file_jsonc/LICENSE0
-rw-r--r--tests/specs/publish/config_flag/successful/LICENSE0
-rw-r--r--tests/specs/publish/dry_run/LICENSE0
-rw-r--r--tests/specs/publish/dry_run_gitignored/LICENSE0
-rw-r--r--tests/specs/publish/excluded_deno_jsonc/LICENSE0
-rw-r--r--tests/specs/publish/excluded_deno_jsonc/mod.out1
-rw-r--r--tests/specs/publish/has_slow_types/LICENSE0
-rw-r--r--tests/specs/publish/invalid_import/LICENSE0
-rw-r--r--tests/specs/publish/invalid_import_esm_sh_suggestion/LICENSE0
-rw-r--r--tests/specs/publish/invalid_path/LICENSE0
-rw-r--r--tests/specs/publish/javascript_decl_file/LICENSE0
-rw-r--r--tests/specs/publish/javascript_missing_decl_file/LICENSE0
-rw-r--r--tests/specs/publish/jsr_jsonc/LICENSE0
-rw-r--r--tests/specs/publish/missing_constraint/LICENSE0
-rw-r--r--tests/specs/publish/missing_constraint_jsx_import_source/LICENSE0
-rw-r--r--tests/specs/publish/missing_license/__test__.jsonc4
-rw-r--r--tests/specs/publish/missing_license/deno.json5
-rw-r--r--tests/specs/publish/missing_license/mod.out12
-rw-r--r--tests/specs/publish/missing_license/mod.ts3
-rw-r--r--tests/specs/publish/no_check/LICENSE0
-rw-r--r--tests/specs/publish/no_check_surfaces_syntax_error/LICENSE0
-rw-r--r--tests/specs/publish/no_token/LICENSE0
-rw-r--r--tests/specs/publish/node_specifier/LICENSE0
-rw-r--r--tests/specs/publish/npm_workspace/add/LICENSE0
-rw-r--r--tests/specs/publish/npm_workspace/publish.out2
-rw-r--r--tests/specs/publish/npm_workspace/subtract/LICENSE0
-rw-r--r--tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/LICENSE0
-rw-r--r--tests/specs/publish/package_json/LICENSE0
-rw-r--r--tests/specs/publish/prefer_fast_check_graph/LICENSE0
-rw-r--r--tests/specs/publish/sloppy_imports/LICENSE0
-rw-r--r--tests/specs/publish/successful/LICENSE0
-rw-r--r--tests/specs/publish/symlink/LICENSE0
-rw-r--r--tests/specs/publish/unanalyzable_dynamic_import/LICENSE0
-rw-r--r--tests/specs/publish/unsupported_jsx_tsx/LICENSE0
-rw-r--r--tests/specs/publish/workspace/bar/LICENSE0
-rw-r--r--tests/specs/publish/workspace/foo/LICENSE0
-rw-r--r--tests/testdata/publish/successful/LICENSE0
50 files changed, 34 insertions, 1 deletions
diff --git a/tests/integration/publish_tests.rs b/tests/integration/publish_tests.rs
index 1bff2094d..013bf3973 100644
--- a/tests/integration/publish_tests.rs
+++ b/tests/integration/publish_tests.rs
@@ -398,6 +398,7 @@ fn allow_dirty() {
}));
temp_dir.join("main.ts").write("");
+ temp_dir.join("LICENSE").write("");
let cmd = Command::new("git")
.arg("init")
@@ -418,6 +419,7 @@ Checking for slow types in the public API...
Uncommitted changes:
+?? LICENSE
?? deno.json
?? main.ts
diff --git a/tests/specs/jsr/excluded_export_module/LICENSE b/tests/specs/jsr/excluded_export_module/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/jsr/excluded_export_module/LICENSE
diff --git a/tests/specs/jsr/no_unused_params/LICENSE b/tests/specs/jsr/no_unused_params/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/jsr/no_unused_params/LICENSE
diff --git a/tests/specs/jsr/no_unused_params/publish.out b/tests/specs/jsr/no_unused_params/publish.out
index a8eff6eb3..4eeb6059c 100644
--- a/tests/specs/jsr/no_unused_params/publish.out
+++ b/tests/specs/jsr/no_unused_params/publish.out
@@ -2,6 +2,7 @@ Check file:///[WILDLINE]/main.ts
Checking for slow types in the public API...
Check file:///[WILDLINE]/main.ts
Simulating publish of @scope/package@0.0.0 with files:
+ file:///[WILDLINE]/LICENSE ([WILDLINE])
file:///[WILDLINE]/__test__.jsonc ([WILDLINE])
file:///[WILDLINE]/deno.json ([WILDLINE])
file:///[WILDLINE]/main.out ([WILDLINE])
diff --git a/tests/specs/publish/allow_slow_types/LICENSE b/tests/specs/publish/allow_slow_types/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/publish/allow_slow_types/LICENSE
diff --git a/tests/specs/publish/banned_triple_slash_directives/LICENSE b/tests/specs/publish/banned_triple_slash_directives/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/publish/banned_triple_slash_directives/LICENSE
diff --git a/tests/specs/publish/bare_node_builtins/LICENSE b/tests/specs/publish/bare_node_builtins/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/publish/bare_node_builtins/LICENSE
diff --git a/tests/specs/publish/bare_node_builtins/bare_node_builtins.out b/tests/specs/publish/bare_node_builtins/bare_node_builtins.out
index d512918af..27b771031 100644
--- a/tests/specs/publish/bare_node_builtins/bare_node_builtins.out
+++ b/tests/specs/publish/bare_node_builtins/bare_node_builtins.out
@@ -6,6 +6,7 @@ Check file:///[WILDLINE]/mod.ts
Checking for slow types in the public API...
Check file:///[WILDLINE]/mod.ts
Simulating publish of @foo/bar@1.0.0 with files:
+ file:///[WILDLINE]/LICENSE ([WILDLINE])
file:///[WILDLINE]/deno.json (87B)
file:///[WILDLINE]/mod.ts (121B)
Warning Aborting due to --dry-run
diff --git a/tests/specs/publish/bare_node_builtins/no_warnings.out b/tests/specs/publish/bare_node_builtins/no_warnings.out
index f9a11f37c..0351a2cb8 100644
--- a/tests/specs/publish/bare_node_builtins/no_warnings.out
+++ b/tests/specs/publish/bare_node_builtins/no_warnings.out
@@ -1,5 +1,6 @@
Checking for slow types in the public API...
Simulating publish of @foo/bar@1.0.0 with files:
+ file:///[WILDLINE]/LICENSE ([WILDLINE])
file:///[WILDLINE]/deno.json (87B)
file:///[WILDLINE]/mod.ts (121B)
Warning Aborting due to --dry-run
diff --git a/tests/specs/publish/byonm_dep/LICENSE b/tests/specs/publish/byonm_dep/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/publish/byonm_dep/LICENSE
diff --git a/tests/specs/publish/byonm_dep/deno.jsonc b/tests/specs/publish/byonm_dep/deno.jsonc
index 37a237730..b561d5652 100644
--- a/tests/specs/publish/byonm_dep/deno.jsonc
+++ b/tests/specs/publish/byonm_dep/deno.jsonc
@@ -5,7 +5,7 @@
"publish": {
// this was previously causing issues because it would cause
// external modules in the node_modules directory to be ignored
- "include": ["mod.ts"]
+ "include": ["LICENSE", "mod.ts"]
},
"unstable": ["byonm", "sloppy-imports"]
}
diff --git a/tests/specs/publish/byonm_dep/publish.out b/tests/specs/publish/byonm_dep/publish.out
index 64cf90921..9cf76aacf 100644
--- a/tests/specs/publish/byonm_dep/publish.out
+++ b/tests/specs/publish/byonm_dep/publish.out
@@ -2,6 +2,7 @@ Check file:///[WILDLINE]/mod.ts
Checking for slow types in the public API...
Check file:///[WILDLINE]/mod.ts
Simulating publish of @scope/package@0.0.0 with files:
+ file:///[WILDLINE]/LICENSE ([WILDLINE])
file:///[WILDLINE]/deno.jsonc ([WILDLINE])
file:///[WILDLINE]/mod.ts ([WILDLINE])
Warning Aborting due to --dry-run
diff --git a/tests/specs/publish/byonm_with_package_json/LICENSE b/tests/specs/publish/byonm_with_package_json/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/publish/byonm_with_package_json/LICENSE
diff --git a/tests/specs/publish/config_file_jsonc/LICENSE b/tests/specs/publish/config_file_jsonc/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/publish/config_file_jsonc/LICENSE
diff --git a/tests/specs/publish/config_flag/successful/LICENSE b/tests/specs/publish/config_flag/successful/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/publish/config_flag/successful/LICENSE
diff --git a/tests/specs/publish/dry_run/LICENSE b/tests/specs/publish/dry_run/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/publish/dry_run/LICENSE
diff --git a/tests/specs/publish/dry_run_gitignored/LICENSE b/tests/specs/publish/dry_run_gitignored/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/publish/dry_run_gitignored/LICENSE
diff --git a/tests/specs/publish/excluded_deno_jsonc/LICENSE b/tests/specs/publish/excluded_deno_jsonc/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/publish/excluded_deno_jsonc/LICENSE
diff --git a/tests/specs/publish/excluded_deno_jsonc/mod.out b/tests/specs/publish/excluded_deno_jsonc/mod.out
index 7c8db25a2..2cac3a6f6 100644
--- a/tests/specs/publish/excluded_deno_jsonc/mod.out
+++ b/tests/specs/publish/excluded_deno_jsonc/mod.out
@@ -1,6 +1,7 @@
Check file:///[WILDLINE]mod.ts
Checking for slow types in the public API...
Simulating publish of @scope/pkg@1.0.0 with files:
+ file:///[WILDLINE]/LICENSE ([WILDLINE])
file:///[WILDLINE]/deno.jsonc (74B)
file:///[WILDLINE]/mod.ts (22B)
Warning Aborting due to --dry-run
diff --git a/tests/specs/publish/has_slow_types/LICENSE b/tests/specs/publish/has_slow_types/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/publish/has_slow_types/LICENSE
diff --git a/tests/specs/publish/invalid_import/LICENSE b/tests/specs/publish/invalid_import/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/publish/invalid_import/LICENSE
diff --git a/tests/specs/publish/invalid_import_esm_sh_suggestion/LICENSE b/tests/specs/publish/invalid_import_esm_sh_suggestion/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/publish/invalid_import_esm_sh_suggestion/LICENSE
diff --git a/tests/specs/publish/invalid_path/LICENSE b/tests/specs/publish/invalid_path/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/publish/invalid_path/LICENSE
diff --git a/tests/specs/publish/javascript_decl_file/LICENSE b/tests/specs/publish/javascript_decl_file/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/publish/javascript_decl_file/LICENSE
diff --git a/tests/specs/publish/javascript_missing_decl_file/LICENSE b/tests/specs/publish/javascript_missing_decl_file/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/publish/javascript_missing_decl_file/LICENSE
diff --git a/tests/specs/publish/jsr_jsonc/LICENSE b/tests/specs/publish/jsr_jsonc/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/publish/jsr_jsonc/LICENSE
diff --git a/tests/specs/publish/missing_constraint/LICENSE b/tests/specs/publish/missing_constraint/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/publish/missing_constraint/LICENSE
diff --git a/tests/specs/publish/missing_constraint_jsx_import_source/LICENSE b/tests/specs/publish/missing_constraint_jsx_import_source/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/publish/missing_constraint_jsx_import_source/LICENSE
diff --git a/tests/specs/publish/missing_license/__test__.jsonc b/tests/specs/publish/missing_license/__test__.jsonc
new file mode 100644
index 000000000..774d5a534
--- /dev/null
+++ b/tests/specs/publish/missing_license/__test__.jsonc
@@ -0,0 +1,4 @@
+{
+ "args": "publish --token 'sadfasdf'",
+ "output": "mod.out"
+}
diff --git a/tests/specs/publish/missing_license/deno.json b/tests/specs/publish/missing_license/deno.json
new file mode 100644
index 000000000..fe4300ad6
--- /dev/null
+++ b/tests/specs/publish/missing_license/deno.json
@@ -0,0 +1,5 @@
+{
+ "name": "@scope/pkg",
+ "version": "1.0.0",
+ "exports": "./mod.ts"
+}
diff --git a/tests/specs/publish/missing_license/mod.out b/tests/specs/publish/missing_license/mod.out
new file mode 100644
index 000000000..721fefd9c
--- /dev/null
+++ b/tests/specs/publish/missing_license/mod.out
@@ -0,0 +1,12 @@
+Check file:///[WILDLINE]/missing_license/mod.ts
+Checking for slow types in the public API...
+Check file:///[WILDLINE]/missing_license/mod.ts
+warning[missing-license]: missing license file
+ --> [WILDLINE]LICENSE
+ = hint: add a LICENSE file to the package and ensure it is not ignored from being published
+
+ docs: https://jsr.io/go/missing-license
+
+Publishing @scope/pkg@1.0.0 ...
+Successfully published @scope/pkg@1.0.0
+Visit http://127.0.0.1:4250/@scope/pkg@1.0.0 for details
diff --git a/tests/specs/publish/missing_license/mod.ts b/tests/specs/publish/missing_license/mod.ts
new file mode 100644
index 000000000..8d9b8a22a
--- /dev/null
+++ b/tests/specs/publish/missing_license/mod.ts
@@ -0,0 +1,3 @@
+export function add(a: number, b: number): number {
+ return a + b;
+}
diff --git a/tests/specs/publish/no_check/LICENSE b/tests/specs/publish/no_check/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/publish/no_check/LICENSE
diff --git a/tests/specs/publish/no_check_surfaces_syntax_error/LICENSE b/tests/specs/publish/no_check_surfaces_syntax_error/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/publish/no_check_surfaces_syntax_error/LICENSE
diff --git a/tests/specs/publish/no_token/LICENSE b/tests/specs/publish/no_token/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/publish/no_token/LICENSE
diff --git a/tests/specs/publish/node_specifier/LICENSE b/tests/specs/publish/node_specifier/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/publish/node_specifier/LICENSE
diff --git a/tests/specs/publish/npm_workspace/add/LICENSE b/tests/specs/publish/npm_workspace/add/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/publish/npm_workspace/add/LICENSE
diff --git a/tests/specs/publish/npm_workspace/publish.out b/tests/specs/publish/npm_workspace/publish.out
index 25f81a7e9..87394cafc 100644
--- a/tests/specs/publish/npm_workspace/publish.out
+++ b/tests/specs/publish/npm_workspace/publish.out
@@ -6,10 +6,12 @@ Check file:///[WILDLINE]/npm_workspace/add/index.ts
Check file:///[WILDLINE]/npm_workspace/subtract/index.ts
[UNORDERED_START]
Simulating publish of @scope/add@1.0.0 with files:
+ file:///[WILDLINE]/npm_workspace/add/LICENSE ([WILDLINE])
file:///[WILDLINE]/npm_workspace/add/index.ts ([WILDLINE])
file:///[WILDLINE]/npm_workspace/add/jsr.json ([WILDLINE])
file:///[WILDLINE]/npm_workspace/add/package.json ([WILDLINE])
Simulating publish of @scope/subtract@1.0.0 with files:
+ file:///[WILDLINE]/npm_workspace/subtract/LICENSE ([WILDLINE])
file:///[WILDLINE]/npm_workspace/subtract/index.ts ([WILDLINE])
file:///[WILDLINE]/npm_workspace/subtract/jsr.json ([WILDLINE])
file:///[WILDLINE]/npm_workspace/subtract/package.json ([WILDLINE])
diff --git a/tests/specs/publish/npm_workspace/subtract/LICENSE b/tests/specs/publish/npm_workspace/subtract/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/publish/npm_workspace/subtract/LICENSE
diff --git a/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/LICENSE b/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/LICENSE
diff --git a/tests/specs/publish/package_json/LICENSE b/tests/specs/publish/package_json/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/publish/package_json/LICENSE
diff --git a/tests/specs/publish/prefer_fast_check_graph/LICENSE b/tests/specs/publish/prefer_fast_check_graph/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/publish/prefer_fast_check_graph/LICENSE
diff --git a/tests/specs/publish/sloppy_imports/LICENSE b/tests/specs/publish/sloppy_imports/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/publish/sloppy_imports/LICENSE
diff --git a/tests/specs/publish/successful/LICENSE b/tests/specs/publish/successful/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/publish/successful/LICENSE
diff --git a/tests/specs/publish/symlink/LICENSE b/tests/specs/publish/symlink/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/publish/symlink/LICENSE
diff --git a/tests/specs/publish/unanalyzable_dynamic_import/LICENSE b/tests/specs/publish/unanalyzable_dynamic_import/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/publish/unanalyzable_dynamic_import/LICENSE
diff --git a/tests/specs/publish/unsupported_jsx_tsx/LICENSE b/tests/specs/publish/unsupported_jsx_tsx/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/publish/unsupported_jsx_tsx/LICENSE
diff --git a/tests/specs/publish/workspace/bar/LICENSE b/tests/specs/publish/workspace/bar/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/publish/workspace/bar/LICENSE
diff --git a/tests/specs/publish/workspace/foo/LICENSE b/tests/specs/publish/workspace/foo/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/specs/publish/workspace/foo/LICENSE
diff --git a/tests/testdata/publish/successful/LICENSE b/tests/testdata/publish/successful/LICENSE
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/testdata/publish/successful/LICENSE