mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 09:31:22 -05:00
test(publish): check specifiers outside fast check module graph (#23369)
Closes #23023
This commit is contained in:
parent
24fa5c784a
commit
25a80bc523
6 changed files with 38 additions and 0 deletions
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"args": "publish --dry-run",
|
||||
"output": "main.out",
|
||||
"exitCode": 1
|
||||
}
|
5
tests/specs/publish/prefer_fast_check_graph/deno.json
Normal file
5
tests/specs/publish/prefer_fast_check_graph/deno.json
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"name": "@example/foo",
|
||||
"version": "1.0.0",
|
||||
"exports": "./mod.ts"
|
||||
}
|
1
tests/specs/publish/prefer_fast_check_graph/deps.ts
Normal file
1
tests/specs/publish/prefer_fast_check_graph/deps.ts
Normal file
|
@ -0,0 +1 @@
|
|||
export * from "https://deno.land/std/assert/assert.ts";
|
17
tests/specs/publish/prefer_fast_check_graph/main.out
Normal file
17
tests/specs/publish/prefer_fast_check_graph/main.out
Normal file
|
@ -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
|
5
tests/specs/publish/prefer_fast_check_graph/mod.ts
Normal file
5
tests/specs/publish/prefer_fast_check_graph/mod.ts
Normal file
|
@ -0,0 +1,5 @@
|
|||
export * from "./subtract.ts";
|
||||
|
||||
export function add(a: number, b: number): number {
|
||||
return a + b;
|
||||
}
|
5
tests/specs/publish/prefer_fast_check_graph/subtract.ts
Normal file
5
tests/specs/publish/prefer_fast_check_graph/subtract.ts
Normal file
|
@ -0,0 +1,5 @@
|
|||
import * as blah from "./deps.ts";
|
||||
|
||||
export function subtract(a: number, b: number): number {
|
||||
return a - b;
|
||||
}
|
Loading…
Add table
Reference in a new issue