summaryrefslogtreecommitdiff
path: root/cli/tests/testdata
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2024-01-15 16:07:57 +0100
committerGitHub <noreply@github.com>2024-01-15 15:07:57 +0000
commit72ecfe04198c5e912826663033a8963fbdea4521 (patch)
treedcff63d48db91916bdc8f92b38fd4cccee48f64e /cli/tests/testdata
parentbc8d00c880756a46b0ce4c8bf0c89407a2de669c (diff)
fix(publish): support deno.jsonc file (#21948)
Diffstat (limited to 'cli/tests/testdata')
-rw-r--r--cli/tests/testdata/publish/deno_jsonc.out6
-rw-r--r--cli/tests/testdata/publish/deno_jsonc/deno.jsonc11
-rw-r--r--cli/tests/testdata/publish/deno_jsonc/mod.ts5
-rw-r--r--cli/tests/testdata/publish/deno_jsonc/std_http.ts6
-rw-r--r--cli/tests/testdata/publish/missing_deno_json.out2
5 files changed, 29 insertions, 1 deletions
diff --git a/cli/tests/testdata/publish/deno_jsonc.out b/cli/tests/testdata/publish/deno_jsonc.out
new file mode 100644
index 000000000..2d5e4ffea
--- /dev/null
+++ b/cli/tests/testdata/publish/deno_jsonc.out
@@ -0,0 +1,6 @@
+Checking fast check type graph for errors...
+Ensuring type checks...
+Check file:///[WILDCARD]/publish/deno_jsonc/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/cli/tests/testdata/publish/deno_jsonc/deno.jsonc b/cli/tests/testdata/publish/deno_jsonc/deno.jsonc
new file mode 100644
index 000000000..4c9dfb08c
--- /dev/null
+++ b/cli/tests/testdata/publish/deno_jsonc/deno.jsonc
@@ -0,0 +1,11 @@
+{
+ // It's .jsonc file so it can have comments
+ "name": "@foo/bar",
+ "version": "1.0.0",
+ "exports": {
+ ".": "./mod.ts"
+ },
+ "imports": {
+ "@std/http": "./std_http.ts"
+ }
+}
diff --git a/cli/tests/testdata/publish/deno_jsonc/mod.ts b/cli/tests/testdata/publish/deno_jsonc/mod.ts
new file mode 100644
index 000000000..4bb6da255
--- /dev/null
+++ b/cli/tests/testdata/publish/deno_jsonc/mod.ts
@@ -0,0 +1,5 @@
+import http from "@std/http";
+
+export function foobar(): { fileServer(): void } {
+ return http.fileServer;
+}
diff --git a/cli/tests/testdata/publish/deno_jsonc/std_http.ts b/cli/tests/testdata/publish/deno_jsonc/std_http.ts
new file mode 100644
index 000000000..9d57b36f3
--- /dev/null
+++ b/cli/tests/testdata/publish/deno_jsonc/std_http.ts
@@ -0,0 +1,6 @@
+// temp until we get jsr:@std/http in the test server
+export default {
+ fileServer() {
+ console.log("Hi");
+ },
+};
diff --git a/cli/tests/testdata/publish/missing_deno_json.out b/cli/tests/testdata/publish/missing_deno_json.out
index adaf33ea8..adb472c71 100644
--- a/cli/tests/testdata/publish/missing_deno_json.out
+++ b/cli/tests/testdata/publish/missing_deno_json.out
@@ -1 +1 @@
-error: Failed to read deno.json file at [WILDCARD]missing_deno_json[WILDCARD] \ No newline at end of file
+error: Couldn't find a deno.json or a deno.jsonc configuration file in [WILDCARD] \ No newline at end of file