diff options
Diffstat (limited to 'tests/registry/jsr/@denotest')
53 files changed, 412 insertions, 0 deletions
diff --git a/tests/registry/jsr/@denotest/add/0.2.0/mod.ts b/tests/registry/jsr/@denotest/add/0.2.0/mod.ts new file mode 100644 index 000000000..864e8dd32 --- /dev/null +++ b/tests/registry/jsr/@denotest/add/0.2.0/mod.ts @@ -0,0 +1,4 @@ +// This is renamed to `add()` in 1.0.0. +export function sum(a: number, b: number): number { + return a + b; +} diff --git a/tests/registry/jsr/@denotest/add/0.2.0_meta.json b/tests/registry/jsr/@denotest/add/0.2.0_meta.json new file mode 100644 index 000000000..6eebe2198 --- /dev/null +++ b/tests/registry/jsr/@denotest/add/0.2.0_meta.json @@ -0,0 +1,8 @@ +{ + "exports": { + ".": "./mod.ts" + }, + "moduleGraph1": { + "/mod.ts": {} + } +} diff --git a/tests/registry/jsr/@denotest/add/1.0.0/mod.ts b/tests/registry/jsr/@denotest/add/1.0.0/mod.ts new file mode 100644 index 000000000..8d9b8a22a --- /dev/null +++ b/tests/registry/jsr/@denotest/add/1.0.0/mod.ts @@ -0,0 +1,3 @@ +export function add(a: number, b: number): number { + return a + b; +} diff --git a/tests/registry/jsr/@denotest/add/1.0.0_meta.json b/tests/registry/jsr/@denotest/add/1.0.0_meta.json new file mode 100644 index 000000000..6eebe2198 --- /dev/null +++ b/tests/registry/jsr/@denotest/add/1.0.0_meta.json @@ -0,0 +1,8 @@ +{ + "exports": { + ".": "./mod.ts" + }, + "moduleGraph1": { + "/mod.ts": {} + } +} diff --git a/tests/registry/jsr/@denotest/add/meta.json b/tests/registry/jsr/@denotest/add/meta.json new file mode 100644 index 000000000..72aea80cc --- /dev/null +++ b/tests/registry/jsr/@denotest/add/meta.json @@ -0,0 +1,9 @@ +{ + "versions": { + "2.0.0": { + "yanked": true + }, + "1.0.0": {}, + "0.2.0": {} + } +} diff --git a/tests/registry/jsr/@denotest/bad-manifest-checksum/1.0.0/mod.ts b/tests/registry/jsr/@denotest/bad-manifest-checksum/1.0.0/mod.ts new file mode 100644 index 000000000..8d9b8a22a --- /dev/null +++ b/tests/registry/jsr/@denotest/bad-manifest-checksum/1.0.0/mod.ts @@ -0,0 +1,3 @@ +export function add(a: number, b: number): number { + return a + b; +} diff --git a/tests/registry/jsr/@denotest/bad-manifest-checksum/1.0.0_meta.json b/tests/registry/jsr/@denotest/bad-manifest-checksum/1.0.0_meta.json new file mode 100644 index 000000000..8ef8ab3c3 --- /dev/null +++ b/tests/registry/jsr/@denotest/bad-manifest-checksum/1.0.0_meta.json @@ -0,0 +1,11 @@ +{ + "exports": { + ".": "./mod.ts" + }, + "manifest": { + "/mod.ts": { + "size": 0, + "checksum": "sha256-bad-checksum" + } + } +} diff --git a/tests/registry/jsr/@denotest/bad-manifest-checksum/meta.json b/tests/registry/jsr/@denotest/bad-manifest-checksum/meta.json new file mode 100644 index 000000000..02601e4d0 --- /dev/null +++ b/tests/registry/jsr/@denotest/bad-manifest-checksum/meta.json @@ -0,0 +1,5 @@ +{ + "versions": { + "1.0.0": {} + } +} diff --git a/tests/registry/jsr/@denotest/deps/1.0.0/mod.ts b/tests/registry/jsr/@denotest/deps/1.0.0/mod.ts new file mode 100644 index 000000000..2751698ac --- /dev/null +++ b/tests/registry/jsr/@denotest/deps/1.0.0/mod.ts @@ -0,0 +1,7 @@ +import { Other } from "jsr:@denotest/module-graph@1/other"; +import version from "jsr:@denotest/no-module-graph@^0.1"; + +export default { + version, + other: new Other(), +}; diff --git a/tests/registry/jsr/@denotest/deps/1.0.0_meta.json b/tests/registry/jsr/@denotest/deps/1.0.0_meta.json new file mode 100644 index 000000000..814099af0 --- /dev/null +++ b/tests/registry/jsr/@denotest/deps/1.0.0_meta.json @@ -0,0 +1,22 @@ +{ + "exports": { + ".": "./mod.ts" + }, + "moduleGraph1": { + "/mod.ts": { + "dependencies": [{ + "type": "static", + "kind": "import", + "range": [[0, 0], [0, 59]], + "specifier": "jsr:@denotest/module-graph@1/other", + "specifierRange": [[0, 22], [0, 58]] + }, { + "type": "static", + "kind": "import", + "range": [[1, 0], [1, 57]], + "specifier": "jsr:@denotest/no-module-graph@^0.1", + "specifierRange": [[1, 20], [1, 56]] + }] + } + } +} diff --git a/tests/registry/jsr/@denotest/deps/meta.json b/tests/registry/jsr/@denotest/deps/meta.json new file mode 100644 index 000000000..02601e4d0 --- /dev/null +++ b/tests/registry/jsr/@denotest/deps/meta.json @@ -0,0 +1,5 @@ +{ + "versions": { + "1.0.0": {} + } +} diff --git a/tests/registry/jsr/@denotest/import-https-url/1.0.0/analyzable.ts b/tests/registry/jsr/@denotest/import-https-url/1.0.0/analyzable.ts new file mode 100644 index 000000000..b1b64d82f --- /dev/null +++ b/tests/registry/jsr/@denotest/import-https-url/1.0.0/analyzable.ts @@ -0,0 +1 @@ +await import("http://localhost:4545/welcome.ts"); diff --git a/tests/registry/jsr/@denotest/import-https-url/1.0.0/unanalyzable.ts b/tests/registry/jsr/@denotest/import-https-url/1.0.0/unanalyzable.ts new file mode 100644 index 000000000..63001d15f --- /dev/null +++ b/tests/registry/jsr/@denotest/import-https-url/1.0.0/unanalyzable.ts @@ -0,0 +1,5 @@ +function nonAnalyzableUrl() { + return "http://localhost:4545/" + "welcome.ts"; +} + +await import(nonAnalyzableUrl()); diff --git a/tests/registry/jsr/@denotest/import-https-url/1.0.0_meta.json b/tests/registry/jsr/@denotest/import-https-url/1.0.0_meta.json new file mode 100644 index 000000000..23b877080 --- /dev/null +++ b/tests/registry/jsr/@denotest/import-https-url/1.0.0_meta.json @@ -0,0 +1,6 @@ +{ + "exports": { + "./unanalyzable": "./unanalyzable.ts", + "./analyzable": "./analyzable.ts" + } +} diff --git a/tests/registry/jsr/@denotest/import-https-url/meta.json b/tests/registry/jsr/@denotest/import-https-url/meta.json new file mode 100644 index 000000000..02601e4d0 --- /dev/null +++ b/tests/registry/jsr/@denotest/import-https-url/meta.json @@ -0,0 +1,5 @@ +{ + "versions": { + "1.0.0": {} + } +} diff --git a/tests/registry/jsr/@denotest/jsx-with-no-pragmas/1.0.0/foo.jsx b/tests/registry/jsr/@denotest/jsx-with-no-pragmas/1.0.0/foo.jsx new file mode 100644 index 000000000..ae310a74e --- /dev/null +++ b/tests/registry/jsr/@denotest/jsx-with-no-pragmas/1.0.0/foo.jsx @@ -0,0 +1,5 @@ +import { renderToString } from "npm:preact-render-to-string"; + +export default function render() { + return renderToString(<div>foo.jsx</div>); +} diff --git a/tests/registry/jsr/@denotest/jsx-with-no-pragmas/1.0.0/foo.tsx b/tests/registry/jsr/@denotest/jsx-with-no-pragmas/1.0.0/foo.tsx new file mode 100644 index 000000000..021c2d49e --- /dev/null +++ b/tests/registry/jsr/@denotest/jsx-with-no-pragmas/1.0.0/foo.tsx @@ -0,0 +1,5 @@ +import { renderToString } from "npm:preact-render-to-string"; + +export default function render() { + return renderToString(<div>foo.tsx</div>); +} diff --git a/tests/registry/jsr/@denotest/jsx-with-no-pragmas/1.0.0/mod.ts b/tests/registry/jsr/@denotest/jsx-with-no-pragmas/1.0.0/mod.ts new file mode 100644 index 000000000..05c549f64 --- /dev/null +++ b/tests/registry/jsr/@denotest/jsx-with-no-pragmas/1.0.0/mod.ts @@ -0,0 +1,7 @@ +import renderJsx from "./foo.jsx"; +import renderTsx from "./foo.tsx"; + +export function render() { + console.log(renderJsx()); + console.log(renderTsx()); +} diff --git a/tests/registry/jsr/@denotest/jsx-with-no-pragmas/1.0.0_meta.json b/tests/registry/jsr/@denotest/jsx-with-no-pragmas/1.0.0_meta.json new file mode 100644 index 000000000..417950442 --- /dev/null +++ b/tests/registry/jsr/@denotest/jsx-with-no-pragmas/1.0.0_meta.json @@ -0,0 +1,40 @@ +{ + "exports": { + ".": "./mod.ts" + }, + "moduleGraph1": { + "/mod.ts": { + "dependencies": [{ + "type": "static", + "kind": "import", + "range": [[0, 0], [0, 35]], + "specifier": "./foo.jsx", + "specifierRange": [[0, 22], [0, 33]] + }, { + "type": "static", + "kind": "import", + "range": [[1, 0], [1, 25]], + "specifier": "./foo.tsx", + "specifierRange": [[1, 22], [1, 33]] + }] + }, + "/foo.jsx": { + "dependencies": [{ + "type": "static", + "kind": "import", + "range": [[0, 0], [0, 60]], + "specifier": "npm:preact-render-to-string", + "specifierRange": [[0, 32], [0, 60]] + }] + }, + "/foo.tsx": { + "dependencies": [{ + "type": "static", + "kind": "import", + "range": [[0, 0], [0, 60]], + "specifier": "npm:preact-render-to-string", + "specifierRange": [[0, 32], [0, 60]] + }] + } + } +} diff --git a/tests/registry/jsr/@denotest/jsx-with-no-pragmas/meta.json b/tests/registry/jsr/@denotest/jsx-with-no-pragmas/meta.json new file mode 100644 index 000000000..02601e4d0 --- /dev/null +++ b/tests/registry/jsr/@denotest/jsx-with-no-pragmas/meta.json @@ -0,0 +1,5 @@ +{ + "versions": { + "1.0.0": {} + } +} diff --git a/tests/registry/jsr/@denotest/jsx-with-pragmas/1.0.0/foo.jsx b/tests/registry/jsr/@denotest/jsx-with-pragmas/1.0.0/foo.jsx new file mode 100644 index 000000000..463fdb015 --- /dev/null +++ b/tests/registry/jsr/@denotest/jsx-with-pragmas/1.0.0/foo.jsx @@ -0,0 +1,7 @@ +/** @jsxRuntime automatic *//** @jsxImportSource npm:preact */ +// deno-fmt-ignore-file +import { renderToString } from "npm:preact-render-to-string"; + +export default function render() { + return renderToString(<div>foo.jsx</div>); +} diff --git a/tests/registry/jsr/@denotest/jsx-with-pragmas/1.0.0/foo.tsx b/tests/registry/jsr/@denotest/jsx-with-pragmas/1.0.0/foo.tsx new file mode 100644 index 000000000..b34f2952e --- /dev/null +++ b/tests/registry/jsr/@denotest/jsx-with-pragmas/1.0.0/foo.tsx @@ -0,0 +1,7 @@ +/** @jsxRuntime automatic *//** @jsxImportSource npm:preact */ +// deno-fmt-ignore-file +import { renderToString } from "npm:preact-render-to-string"; + +export default function render() { + return renderToString(<div>foo.tsx</div>); +} diff --git a/tests/registry/jsr/@denotest/jsx-with-pragmas/1.0.0/mod.ts b/tests/registry/jsr/@denotest/jsx-with-pragmas/1.0.0/mod.ts new file mode 100644 index 000000000..05c549f64 --- /dev/null +++ b/tests/registry/jsr/@denotest/jsx-with-pragmas/1.0.0/mod.ts @@ -0,0 +1,7 @@ +import renderJsx from "./foo.jsx"; +import renderTsx from "./foo.tsx"; + +export function render() { + console.log(renderJsx()); + console.log(renderTsx()); +} diff --git a/tests/registry/jsr/@denotest/jsx-with-pragmas/1.0.0_meta.json b/tests/registry/jsr/@denotest/jsx-with-pragmas/1.0.0_meta.json new file mode 100644 index 000000000..fd1a63e60 --- /dev/null +++ b/tests/registry/jsr/@denotest/jsx-with-pragmas/1.0.0_meta.json @@ -0,0 +1,52 @@ +{ + "exports": { + ".": "./mod.ts" + }, + "moduleGraph1": { + "/mod.ts": { + "dependencies": [{ + "type": "static", + "kind": "import", + "range": [[0, 0], [0, 35]], + "specifier": "./foo.jsx", + "specifierRange": [[0, 22], [0, 33]] + }, { + "type": "static", + "kind": "import", + "range": [[1, 0], [1, 25]], + "specifier": "./foo.tsx", + "specifierRange": [[1, 22], [1, 33]] + }] + }, + "/foo.jsx": { + "dependencies": [{ + "type": "static", + "kind": "import", + "range": [[0, 0], [0, 60]], + "specifier": "npm:preact/jsx-runtime", + "specifierRange": [[0, 32], [0, 60]] + }, { + "type": "static", + "kind": "import", + "range": [[2, 0], [2, 60]], + "specifier": "npm:preact-render-to-string", + "specifierRange": [[2, 32], [2, 60]] + }] + }, + "/foo.tsx": { + "dependencies": [{ + "type": "static", + "kind": "import", + "range": [[0, 0], [0, 60]], + "specifier": "npm:preact/jsx-runtime", + "specifierRange": [[0, 32], [0, 60]] + }, { + "type": "static", + "kind": "import", + "range": [[2, 0], [2, 60]], + "specifier": "npm:preact-render-to-string", + "specifierRange": [[2, 32], [2, 60]] + }] + } + } +} diff --git a/tests/registry/jsr/@denotest/jsx-with-pragmas/meta.json b/tests/registry/jsr/@denotest/jsx-with-pragmas/meta.json new file mode 100644 index 000000000..02601e4d0 --- /dev/null +++ b/tests/registry/jsr/@denotest/jsx-with-pragmas/meta.json @@ -0,0 +1,5 @@ +{ + "versions": { + "1.0.0": {} + } +} diff --git a/tests/registry/jsr/@denotest/module-graph/1.4.0/mod.ts b/tests/registry/jsr/@denotest/module-graph/1.4.0/mod.ts new file mode 100644 index 000000000..cb3c4a5e0 --- /dev/null +++ b/tests/registry/jsr/@denotest/module-graph/1.4.0/mod.ts @@ -0,0 +1,5 @@ +import { Other } from "./other.ts"; + +export class Test { + other = new Other(); +} diff --git a/tests/registry/jsr/@denotest/module-graph/1.4.0/other.ts b/tests/registry/jsr/@denotest/module-graph/1.4.0/other.ts new file mode 100644 index 000000000..57e436cf8 --- /dev/null +++ b/tests/registry/jsr/@denotest/module-graph/1.4.0/other.ts @@ -0,0 +1,2 @@ +export class Other { +} diff --git a/tests/registry/jsr/@denotest/module-graph/1.4.0_meta.json b/tests/registry/jsr/@denotest/module-graph/1.4.0_meta.json new file mode 100644 index 000000000..6cd99b42b --- /dev/null +++ b/tests/registry/jsr/@denotest/module-graph/1.4.0_meta.json @@ -0,0 +1,17 @@ +{ + "exports": { + ".": "./mod.ts", + "./other": "./other.ts" + }, + "moduleGraph1": { + "/mod.ts": { + "dependencies": [{ + "kind": "import", + "type": "static", + "specifier": "./other.ts", + "specifierRange": [[0, 22], [0, 34]] + }] + }, + "/other.ts": {} + } +} diff --git a/tests/registry/jsr/@denotest/module-graph/meta.json b/tests/registry/jsr/@denotest/module-graph/meta.json new file mode 100644 index 000000000..9a450c08b --- /dev/null +++ b/tests/registry/jsr/@denotest/module-graph/meta.json @@ -0,0 +1,6 @@ +{ + "versions": { + "1.0.0": {}, + "1.4.0": {} + } +} diff --git a/tests/registry/jsr/@denotest/module-graph2/1.4.0/mod.ts b/tests/registry/jsr/@denotest/module-graph2/1.4.0/mod.ts new file mode 100644 index 000000000..cb3c4a5e0 --- /dev/null +++ b/tests/registry/jsr/@denotest/module-graph2/1.4.0/mod.ts @@ -0,0 +1,5 @@ +import { Other } from "./other.ts"; + +export class Test { + other = new Other(); +} diff --git a/tests/registry/jsr/@denotest/module-graph2/1.4.0/other.ts b/tests/registry/jsr/@denotest/module-graph2/1.4.0/other.ts new file mode 100644 index 000000000..57e436cf8 --- /dev/null +++ b/tests/registry/jsr/@denotest/module-graph2/1.4.0/other.ts @@ -0,0 +1,2 @@ +export class Other { +} diff --git a/tests/registry/jsr/@denotest/module-graph2/1.4.0_meta.json b/tests/registry/jsr/@denotest/module-graph2/1.4.0_meta.json new file mode 100644 index 000000000..ce1d3782d --- /dev/null +++ b/tests/registry/jsr/@denotest/module-graph2/1.4.0_meta.json @@ -0,0 +1,17 @@ +{ + "exports": { + ".": "./mod.ts", + "./other": "./other.ts" + }, + "moduleGraph2": { + "/mod.ts": { + "dependencies": [{ + "kind": "import", + "type": "static", + "specifier": "./other.ts", + "specifierRange": [[0, 22], [0, 34]] + }] + }, + "/other.ts": {} + } +} diff --git a/tests/registry/jsr/@denotest/module-graph2/meta.json b/tests/registry/jsr/@denotest/module-graph2/meta.json new file mode 100644 index 000000000..9a450c08b --- /dev/null +++ b/tests/registry/jsr/@denotest/module-graph2/meta.json @@ -0,0 +1,6 @@ +{ + "versions": { + "1.0.0": {}, + "1.4.0": {} + } +} diff --git a/tests/registry/jsr/@denotest/no-module-graph/0.1.0/TestClass.ts b/tests/registry/jsr/@denotest/no-module-graph/0.1.0/TestClass.ts new file mode 100644 index 000000000..88ac04c12 --- /dev/null +++ b/tests/registry/jsr/@denotest/no-module-graph/0.1.0/TestClass.ts @@ -0,0 +1 @@ +export default class TestClass {} diff --git a/tests/registry/jsr/@denotest/no-module-graph/0.1.0/mod.ts b/tests/registry/jsr/@denotest/no-module-graph/0.1.0/mod.ts new file mode 100644 index 000000000..57600eb4b --- /dev/null +++ b/tests/registry/jsr/@denotest/no-module-graph/0.1.0/mod.ts @@ -0,0 +1,3 @@ +export default "0.1.0"; + +export { default as TestClass } from "./TestClass.ts"; diff --git a/tests/registry/jsr/@denotest/no-module-graph/0.1.0_meta.json b/tests/registry/jsr/@denotest/no-module-graph/0.1.0_meta.json new file mode 100644 index 000000000..631a18d0e --- /dev/null +++ b/tests/registry/jsr/@denotest/no-module-graph/0.1.0_meta.json @@ -0,0 +1,5 @@ +{ + "exports": { + ".": "./mod.ts" + } +} diff --git a/tests/registry/jsr/@denotest/no-module-graph/0.1.1/TestClass.ts b/tests/registry/jsr/@denotest/no-module-graph/0.1.1/TestClass.ts new file mode 100644 index 000000000..88ac04c12 --- /dev/null +++ b/tests/registry/jsr/@denotest/no-module-graph/0.1.1/TestClass.ts @@ -0,0 +1 @@ +export default class TestClass {} diff --git a/tests/registry/jsr/@denotest/no-module-graph/0.1.1/mod.ts b/tests/registry/jsr/@denotest/no-module-graph/0.1.1/mod.ts new file mode 100644 index 000000000..5e1fd9435 --- /dev/null +++ b/tests/registry/jsr/@denotest/no-module-graph/0.1.1/mod.ts @@ -0,0 +1,3 @@ +export default "0.1.1"; + +export { default as TestClass } from "./TestClass.ts"; diff --git a/tests/registry/jsr/@denotest/no-module-graph/0.1.1_meta.json b/tests/registry/jsr/@denotest/no-module-graph/0.1.1_meta.json new file mode 100644 index 000000000..631a18d0e --- /dev/null +++ b/tests/registry/jsr/@denotest/no-module-graph/0.1.1_meta.json @@ -0,0 +1,5 @@ +{ + "exports": { + ".": "./mod.ts" + } +} diff --git a/tests/registry/jsr/@denotest/no-module-graph/0.2.0/TestClass.ts b/tests/registry/jsr/@denotest/no-module-graph/0.2.0/TestClass.ts new file mode 100644 index 000000000..88ac04c12 --- /dev/null +++ b/tests/registry/jsr/@denotest/no-module-graph/0.2.0/TestClass.ts @@ -0,0 +1 @@ +export default class TestClass {} diff --git a/tests/registry/jsr/@denotest/no-module-graph/0.2.0/mod.ts b/tests/registry/jsr/@denotest/no-module-graph/0.2.0/mod.ts new file mode 100644 index 000000000..edf9622fb --- /dev/null +++ b/tests/registry/jsr/@denotest/no-module-graph/0.2.0/mod.ts @@ -0,0 +1,3 @@ +export default "0.2.0"; + +export { default as TestClass } from "./TestClass.ts"; diff --git a/tests/registry/jsr/@denotest/no-module-graph/0.2.0_meta.json b/tests/registry/jsr/@denotest/no-module-graph/0.2.0_meta.json new file mode 100644 index 000000000..631a18d0e --- /dev/null +++ b/tests/registry/jsr/@denotest/no-module-graph/0.2.0_meta.json @@ -0,0 +1,5 @@ +{ + "exports": { + ".": "./mod.ts" + } +} diff --git a/tests/registry/jsr/@denotest/no-module-graph/meta.json b/tests/registry/jsr/@denotest/no-module-graph/meta.json new file mode 100644 index 000000000..0268b6c8a --- /dev/null +++ b/tests/registry/jsr/@denotest/no-module-graph/meta.json @@ -0,0 +1,7 @@ +{ + "versions": { + "0.1.0": {}, + "0.1.1": {}, + "0.2.0": {} + } +} diff --git a/tests/registry/jsr/@denotest/subset-type-graph-invalid/0.1.0/mod.ts b/tests/registry/jsr/@denotest/subset-type-graph-invalid/0.1.0/mod.ts new file mode 100644 index 000000000..6a5036bf5 --- /dev/null +++ b/tests/registry/jsr/@denotest/subset-type-graph-invalid/0.1.0/mod.ts @@ -0,0 +1,12 @@ +export class Foo { + method() { + return Math.random(); + } +} + +// This will be analyzed because the method above is missing an +// explicit type which is required for the subset type graph to take +// effect. So the entire source file will be type checked against, +// causing a type error here. +const invalidTypeCheck: number = ""; +console.log(invalidTypeCheck); diff --git a/tests/registry/jsr/@denotest/subset-type-graph-invalid/0.1.0_meta.json b/tests/registry/jsr/@denotest/subset-type-graph-invalid/0.1.0_meta.json new file mode 100644 index 000000000..631a18d0e --- /dev/null +++ b/tests/registry/jsr/@denotest/subset-type-graph-invalid/0.1.0_meta.json @@ -0,0 +1,5 @@ +{ + "exports": { + ".": "./mod.ts" + } +} diff --git a/tests/registry/jsr/@denotest/subset-type-graph-invalid/meta.json b/tests/registry/jsr/@denotest/subset-type-graph-invalid/meta.json new file mode 100644 index 000000000..d10aa5c3a --- /dev/null +++ b/tests/registry/jsr/@denotest/subset-type-graph-invalid/meta.json @@ -0,0 +1,5 @@ +{ + "versions": { + "0.1.0": {} + } +} diff --git a/tests/registry/jsr/@denotest/subset-type-graph/0.1.0/mod.ts b/tests/registry/jsr/@denotest/subset-type-graph/0.1.0/mod.ts new file mode 100644 index 000000000..e81b2309a --- /dev/null +++ b/tests/registry/jsr/@denotest/subset-type-graph/0.1.0/mod.ts @@ -0,0 +1,17 @@ +// add some statements that will be removed by the subset +// type graph so that we can test that the source map works +console.log(1); +console.log(2); +console.log(3); + +export class Foo { + method(): number { + return Math.random(); + } +} + +// this won't be type checked against because the subset +// type graph omit this code because it's not part of the +// public API. +const invalidTypeCheck: number = ""; +console.log(invalidTypeCheck); diff --git a/tests/registry/jsr/@denotest/subset-type-graph/0.1.0_meta.json b/tests/registry/jsr/@denotest/subset-type-graph/0.1.0_meta.json new file mode 100644 index 000000000..631a18d0e --- /dev/null +++ b/tests/registry/jsr/@denotest/subset-type-graph/0.1.0_meta.json @@ -0,0 +1,5 @@ +{ + "exports": { + ".": "./mod.ts" + } +} diff --git a/tests/registry/jsr/@denotest/subset-type-graph/meta.json b/tests/registry/jsr/@denotest/subset-type-graph/meta.json new file mode 100644 index 000000000..d10aa5c3a --- /dev/null +++ b/tests/registry/jsr/@denotest/subset-type-graph/meta.json @@ -0,0 +1,5 @@ +{ + "versions": { + "0.1.0": {} + } +} diff --git a/tests/registry/jsr/@denotest/worker/0.1.0/mod.ts b/tests/registry/jsr/@denotest/worker/0.1.0/mod.ts new file mode 100644 index 000000000..356df2c24 --- /dev/null +++ b/tests/registry/jsr/@denotest/worker/0.1.0/mod.ts @@ -0,0 +1,13 @@ +export function addAsync(a: number, b: number): Promise<number> { + const worker = new Worker(import.meta.resolve("./worker.ts"), { + type: "module", + }); + + return new Promise((resolve) => { + worker.addEventListener("message", (event) => { + resolve(event.data); + }); + + worker.postMessage({ a, b }); + }); +} diff --git a/tests/registry/jsr/@denotest/worker/0.1.0/worker.ts b/tests/registry/jsr/@denotest/worker/0.1.0/worker.ts new file mode 100644 index 000000000..95b40c758 --- /dev/null +++ b/tests/registry/jsr/@denotest/worker/0.1.0/worker.ts @@ -0,0 +1,4 @@ +self.onmessage = (evt) => { + self.postMessage(evt.data.a + evt.data.b); + self.close(); +}; diff --git a/tests/registry/jsr/@denotest/worker/0.1.0_meta.json b/tests/registry/jsr/@denotest/worker/0.1.0_meta.json new file mode 100644 index 000000000..631a18d0e --- /dev/null +++ b/tests/registry/jsr/@denotest/worker/0.1.0_meta.json @@ -0,0 +1,5 @@ +{ + "exports": { + ".": "./mod.ts" + } +} diff --git a/tests/registry/jsr/@denotest/worker/meta.json b/tests/registry/jsr/@denotest/worker/meta.json new file mode 100644 index 000000000..d10aa5c3a --- /dev/null +++ b/tests/registry/jsr/@denotest/worker/meta.json @@ -0,0 +1,5 @@ +{ + "versions": { + "0.1.0": {} + } +} |