summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/specs/publish/prefer_fast_check_graph/__test__.jsonc5
-rw-r--r--tests/specs/publish/prefer_fast_check_graph/deno.json5
-rw-r--r--tests/specs/publish/prefer_fast_check_graph/deps.ts1
-rw-r--r--tests/specs/publish/prefer_fast_check_graph/main.out17
-rw-r--r--tests/specs/publish/prefer_fast_check_graph/mod.ts5
-rw-r--r--tests/specs/publish/prefer_fast_check_graph/subtract.ts5
6 files changed, 38 insertions, 0 deletions
diff --git a/tests/specs/publish/prefer_fast_check_graph/__test__.jsonc b/tests/specs/publish/prefer_fast_check_graph/__test__.jsonc
new file mode 100644
index 000000000..4aa5a62d0
--- /dev/null
+++ b/tests/specs/publish/prefer_fast_check_graph/__test__.jsonc
@@ -0,0 +1,5 @@
+{
+ "args": "publish --dry-run",
+ "output": "main.out",
+ "exitCode": 1
+}
diff --git a/tests/specs/publish/prefer_fast_check_graph/deno.json b/tests/specs/publish/prefer_fast_check_graph/deno.json
new file mode 100644
index 000000000..e022b2d1b
--- /dev/null
+++ b/tests/specs/publish/prefer_fast_check_graph/deno.json
@@ -0,0 +1,5 @@
+{
+ "name": "@example/foo",
+ "version": "1.0.0",
+ "exports": "./mod.ts"
+}
diff --git a/tests/specs/publish/prefer_fast_check_graph/deps.ts b/tests/specs/publish/prefer_fast_check_graph/deps.ts
new file mode 100644
index 000000000..5fd04621c
--- /dev/null
+++ b/tests/specs/publish/prefer_fast_check_graph/deps.ts
@@ -0,0 +1 @@
+export * from "https://deno.land/std/assert/assert.ts";
diff --git a/tests/specs/publish/prefer_fast_check_graph/main.out b/tests/specs/publish/prefer_fast_check_graph/main.out
new file mode 100644
index 000000000..a68fac83a
--- /dev/null
+++ b/tests/specs/publish/prefer_fast_check_graph/main.out
@@ -0,0 +1,17 @@
+[WILDCARD]
+Check [WILDLINE]/tests/specs/publish/prefer_fast_check_graph/mod.ts
+Checking for slow types in the public API...
+Check [WILDLINE]/tests/specs/publish/prefer_fast_check_graph/mod.ts
+error[invalid-external-import]: invalid import to a non-JSR 'https' specifier
+ --> [WILDLINE]deps.ts:1:15
+ |
+1 | export * from "https://deno.land/std/assert/assert.ts";
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the specifier
+ = hint: replace this import with one from jsr or npm, or vendor the dependency into your package
+
+ info: the import was resolved to 'https://deno.land/std/assert/assert.ts'
+ info: this specifier is not allowed to be imported on jsr
+ info: jsr only supports importing `jsr:`, `npm:`, and `data:` specifiers
+ docs: https://jsr.io/go/invalid-external-import
+
+error: Found 1 problem
diff --git a/tests/specs/publish/prefer_fast_check_graph/mod.ts b/tests/specs/publish/prefer_fast_check_graph/mod.ts
new file mode 100644
index 000000000..195730f3e
--- /dev/null
+++ b/tests/specs/publish/prefer_fast_check_graph/mod.ts
@@ -0,0 +1,5 @@
+export * from "./subtract.ts";
+
+export function add(a: number, b: number): number {
+ return a + b;
+}
diff --git a/tests/specs/publish/prefer_fast_check_graph/subtract.ts b/tests/specs/publish/prefer_fast_check_graph/subtract.ts
new file mode 100644
index 000000000..a127ebea9
--- /dev/null
+++ b/tests/specs/publish/prefer_fast_check_graph/subtract.ts
@@ -0,0 +1,5 @@
+import * as blah from "./deps.ts";
+
+export function subtract(a: number, b: number): number {
+ return a - b;
+}