-
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.
- Loading branch information
1 parent
e221559
commit 2eae8a6
Showing
2 changed files
with
234 additions
and
0 deletions.
There are no files selected for viewing
115 changes: 115 additions & 0 deletions
115
tests/specs/graph/JsrSpecifiers_FastCheck_VarArrowLeavable.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,115 @@ | ||
# 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/mod.ts | ||
import type { Foo, Bar } from "./b.ts"; | ||
|
||
export const foo = (foo: Foo): string => "test"; | ||
export const bar = (): Bar => new Bar(); | ||
|
||
# https://jsr.io/@scope/a/1.0.0/b.ts | ||
export type Foo = string; | ||
export class Bar {} | ||
|
||
# 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": 46, | ||
"mediaType": "TypeScript", | ||
"specifier": "https://jsr.io/@scope/a/1.0.0/b.ts" | ||
}, | ||
{ | ||
"kind": "esm", | ||
"dependencies": [ | ||
{ | ||
"specifier": "./b.ts", | ||
"type": { | ||
"specifier": "https://jsr.io/@scope/a/1.0.0/b.ts", | ||
"span": { | ||
"start": { | ||
"line": 0, | ||
"character": 30 | ||
}, | ||
"end": { | ||
"line": 0, | ||
"character": 38 | ||
} | ||
} | ||
} | ||
} | ||
], | ||
"size": 131, | ||
"mediaType": "TypeScript", | ||
"specifier": "https://jsr.io/@scope/a/1.0.0/mod.ts" | ||
} | ||
], | ||
"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/b.ts: | ||
{} | ||
export type Foo = string; | ||
export class Bar { | ||
} | ||
|
||
Fast check https://jsr.io/@scope/a/1.0.0/mod.ts: | ||
{ | ||
"./b.ts": { | ||
"type": { | ||
"specifier": "https://jsr.io/@scope/a/1.0.0/b.ts", | ||
"span": { | ||
"start": { | ||
"line": 0, | ||
"character": 30 | ||
}, | ||
"end": { | ||
"line": 0, | ||
"character": 38 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
import type { Foo, Bar } from "./b.ts"; | ||
export const foo = (foo: Foo): string =>({} as any); | ||
export const bar = (): Bar =>({} as any); |
119 changes: 119 additions & 0 deletions
119
tests/specs/graph/JsrSpecifiers_FastCheck_VarFunctionLeavable.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,119 @@ | ||
# 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/mod.ts | ||
import type { Foo, Bar } from "./b.ts"; | ||
|
||
export const foo = function(foo: Foo): string { return "test" }; | ||
export const bar = function (): Bar { return new Bar() }; | ||
|
||
# https://jsr.io/@scope/a/1.0.0/b.ts | ||
export type Foo = string; | ||
export class Bar {} | ||
|
||
# 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": 46, | ||
"mediaType": "TypeScript", | ||
"specifier": "https://jsr.io/@scope/a/1.0.0/b.ts" | ||
}, | ||
{ | ||
"kind": "esm", | ||
"dependencies": [ | ||
{ | ||
"specifier": "./b.ts", | ||
"type": { | ||
"specifier": "https://jsr.io/@scope/a/1.0.0/b.ts", | ||
"span": { | ||
"start": { | ||
"line": 0, | ||
"character": 30 | ||
}, | ||
"end": { | ||
"line": 0, | ||
"character": 38 | ||
} | ||
} | ||
} | ||
} | ||
], | ||
"size": 164, | ||
"mediaType": "TypeScript", | ||
"specifier": "https://jsr.io/@scope/a/1.0.0/mod.ts" | ||
} | ||
], | ||
"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/b.ts: | ||
{} | ||
export type Foo = string; | ||
export class Bar { | ||
} | ||
|
||
Fast check https://jsr.io/@scope/a/1.0.0/mod.ts: | ||
{ | ||
"./b.ts": { | ||
"type": { | ||
"specifier": "https://jsr.io/@scope/a/1.0.0/b.ts", | ||
"span": { | ||
"start": { | ||
"line": 0, | ||
"character": 30 | ||
}, | ||
"end": { | ||
"line": 0, | ||
"character": 38 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
import type { Foo, Bar } from "./b.ts"; | ||
export const foo = function(foo: Foo): string { | ||
return {} as any; | ||
}; | ||
export const bar = function(): Bar { | ||
return {} as any; | ||
}; |