-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(fast-check): do not add warning diagnostic for js entrypoint with…
… types (#386)
- Loading branch information
Showing
6 changed files
with
480 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
88 changes: 88 additions & 0 deletions
88
tests/specs/graph/JsrSpecifiers_FastCheck_EntrypointJsWithTsDecl.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# https://jsr.io/@scope/a/meta.json | ||
{"versions": { "1.0.0": {} } } | ||
|
||
# https://jsr.io/@scope/a/1.0.0_meta.json | ||
{ "exports": { ".": "./mod.js" } } | ||
|
||
# https://jsr.io/@scope/a/1.0.0/mod.d.ts | ||
export function getRandom(): number; | ||
|
||
# https://jsr.io/@scope/a/1.0.0/mod.js | ||
/// <reference types="./mod.d.ts" /> | ||
export function getRandom() { | ||
return Math.random(); | ||
} | ||
|
||
# mod.ts | ||
import 'jsr:@scope/a' | ||
|
||
# output | ||
{ | ||
"roots": [ | ||
"file:///mod.ts" | ||
], | ||
"modules": [ | ||
{ | ||
"kind": "esm", | ||
"dependencies": [ | ||
{ | ||
"specifier": "jsr:@scope/a", | ||
"code": { | ||
"specifier": "jsr:@scope/a", | ||
"span": { | ||
"start": { | ||
"line": 0, | ||
"character": 7 | ||
}, | ||
"end": { | ||
"line": 0, | ||
"character": 21 | ||
} | ||
} | ||
} | ||
} | ||
], | ||
"size": 22, | ||
"mediaType": "TypeScript", | ||
"specifier": "file:///mod.ts" | ||
}, | ||
{ | ||
"kind": "esm", | ||
"size": 37, | ||
"mediaType": "Dts", | ||
"specifier": "https://jsr.io/@scope/a/1.0.0/mod.d.ts" | ||
}, | ||
{ | ||
"kind": "esm", | ||
"size": 93, | ||
"typesDependency": { | ||
"specifier": "./mod.d.ts", | ||
"dependency": { | ||
"specifier": "https://jsr.io/@scope/a/1.0.0/mod.d.ts", | ||
"span": { | ||
"start": { | ||
"line": 0, | ||
"character": 21 | ||
}, | ||
"end": { | ||
"line": 0, | ||
"character": 33 | ||
} | ||
} | ||
} | ||
}, | ||
"mediaType": "JavaScript", | ||
"specifier": "https://jsr.io/@scope/a/1.0.0/mod.js" | ||
} | ||
], | ||
"redirects": { | ||
"jsr:@scope/a": "https://jsr.io/@scope/a/1.0.0/mod.js" | ||
}, | ||
"packages": { | ||
"@scope/a": "@scope/a@1.0.0" | ||
} | ||
} | ||
|
||
Fast check https://jsr.io/@scope/a/1.0.0/mod.d.ts: | ||
{} | ||
export function getRandom(): number; |
135 changes: 135 additions & 0 deletions
135
tests/specs/graph/JsrSpecifiers_FastCheck_JsWithTsDecl.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
# https://jsr.io/@scope/a/meta.json | ||
{"versions": { "1.0.0": {} } } | ||
|
||
# https://jsr.io/@scope/a/1.0.0_meta.json | ||
{ "exports": { ".": "./mod.ts" } } | ||
|
||
# https://jsr.io/@scope/a/1.0.0/random.d.ts | ||
export function getRandom(): number; | ||
|
||
# https://jsr.io/@scope/a/1.0.0/random.js | ||
/// <reference types="./random.d.ts" /> | ||
export function getRandom() { | ||
return Math.random(); | ||
} | ||
|
||
# https://jsr.io/@scope/a/1.0.0/mod.ts | ||
export * from "./random.js"; | ||
|
||
# mod.ts | ||
import 'jsr:@scope/a' | ||
|
||
# output | ||
{ | ||
"roots": [ | ||
"file:///mod.ts" | ||
], | ||
"modules": [ | ||
{ | ||
"kind": "esm", | ||
"dependencies": [ | ||
{ | ||
"specifier": "jsr:@scope/a", | ||
"code": { | ||
"specifier": "jsr:@scope/a", | ||
"span": { | ||
"start": { | ||
"line": 0, | ||
"character": 7 | ||
}, | ||
"end": { | ||
"line": 0, | ||
"character": 21 | ||
} | ||
} | ||
} | ||
} | ||
], | ||
"size": 22, | ||
"mediaType": "TypeScript", | ||
"specifier": "file:///mod.ts" | ||
}, | ||
{ | ||
"kind": "esm", | ||
"dependencies": [ | ||
{ | ||
"specifier": "./random.js", | ||
"code": { | ||
"specifier": "https://jsr.io/@scope/a/1.0.0/random.js", | ||
"span": { | ||
"start": { | ||
"line": 0, | ||
"character": 14 | ||
}, | ||
"end": { | ||
"line": 0, | ||
"character": 27 | ||
} | ||
} | ||
} | ||
} | ||
], | ||
"size": 29, | ||
"mediaType": "TypeScript", | ||
"specifier": "https://jsr.io/@scope/a/1.0.0/mod.ts" | ||
}, | ||
{ | ||
"kind": "esm", | ||
"size": 37, | ||
"mediaType": "Dts", | ||
"specifier": "https://jsr.io/@scope/a/1.0.0/random.d.ts" | ||
}, | ||
{ | ||
"kind": "esm", | ||
"size": 96, | ||
"typesDependency": { | ||
"specifier": "./random.d.ts", | ||
"dependency": { | ||
"specifier": "https://jsr.io/@scope/a/1.0.0/random.d.ts", | ||
"span": { | ||
"start": { | ||
"line": 0, | ||
"character": 21 | ||
}, | ||
"end": { | ||
"line": 0, | ||
"character": 36 | ||
} | ||
} | ||
} | ||
}, | ||
"mediaType": "JavaScript", | ||
"specifier": "https://jsr.io/@scope/a/1.0.0/random.js" | ||
} | ||
], | ||
"redirects": { | ||
"jsr:@scope/a": "https://jsr.io/@scope/a/1.0.0/mod.ts" | ||
}, | ||
"packages": { | ||
"@scope/a": "@scope/a@1.0.0" | ||
} | ||
} | ||
|
||
Fast check https://jsr.io/@scope/a/1.0.0/mod.ts: | ||
{ | ||
"./random.d.ts": { | ||
"code": { | ||
"specifier": "https://jsr.io/@scope/a/1.0.0/random.d.ts", | ||
"span": { | ||
"start": { | ||
"line": 0, | ||
"character": 14 | ||
}, | ||
"end": { | ||
"line": 0, | ||
"character": 27 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
export * from "./random.d.ts"; | ||
|
||
Fast check https://jsr.io/@scope/a/1.0.0/random.d.ts: | ||
{} | ||
export function getRandom(): number; |
Oops, something went wrong.