summaryrefslogtreecommitdiff
path: root/cli/tests/testdata
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/testdata')
-rw-r--r--cli/tests/testdata/jsr/deps/main.out13
-rw-r--r--cli/tests/testdata/jsr/deps/main.ts3
-rw-r--r--cli/tests/testdata/jsr/deps/main_info.out22
-rw-r--r--cli/tests/testdata/jsr/module_graph/main.out7
-rw-r--r--cli/tests/testdata/jsr/module_graph/main.ts3
-rw-r--r--cli/tests/testdata/jsr/module_graph/main_info.out14
-rw-r--r--cli/tests/testdata/jsr/no_module_graph/main.out6
-rw-r--r--cli/tests/testdata/jsr/no_module_graph/main.ts4
-rw-r--r--cli/tests/testdata/jsr/no_module_graph/main_info.out12
-rw-r--r--cli/tests/testdata/jsr/no_module_graph/multiple.out2
-rw-r--r--cli/tests/testdata/jsr/no_module_graph/multiple.ts5
-rw-r--r--cli/tests/testdata/jsr/registry/@denotest/deps/1.0.0/mod.ts7
-rw-r--r--cli/tests/testdata/jsr/registry/@denotest/deps/1.0.0_meta.json17
-rw-r--r--cli/tests/testdata/jsr/registry/@denotest/deps/meta.json5
-rw-r--r--cli/tests/testdata/jsr/registry/@denotest/module_graph/1.4.0/mod.ts5
-rw-r--r--cli/tests/testdata/jsr/registry/@denotest/module_graph/1.4.0/other.ts2
-rw-r--r--cli/tests/testdata/jsr/registry/@denotest/module_graph/1.4.0_meta.json13
-rw-r--r--cli/tests/testdata/jsr/registry/@denotest/module_graph/meta.json6
-rw-r--r--cli/tests/testdata/jsr/registry/@denotest/no_module_graph/0.1.0/TestClass.ts1
-rw-r--r--cli/tests/testdata/jsr/registry/@denotest/no_module_graph/0.1.0/mod.ts3
-rw-r--r--cli/tests/testdata/jsr/registry/@denotest/no_module_graph/0.1.0_meta.json1
-rw-r--r--cli/tests/testdata/jsr/registry/@denotest/no_module_graph/0.1.1/TestClass.ts1
-rw-r--r--cli/tests/testdata/jsr/registry/@denotest/no_module_graph/0.1.1/mod.ts3
-rw-r--r--cli/tests/testdata/jsr/registry/@denotest/no_module_graph/0.1.1_meta.json1
-rw-r--r--cli/tests/testdata/jsr/registry/@denotest/no_module_graph/0.2.0/TestClass.ts1
-rw-r--r--cli/tests/testdata/jsr/registry/@denotest/no_module_graph/0.2.0/mod.ts3
-rw-r--r--cli/tests/testdata/jsr/registry/@denotest/no_module_graph/0.2.0_meta.json1
-rw-r--r--cli/tests/testdata/jsr/registry/@denotest/no_module_graph/meta.json7
-rw-r--r--cli/tests/testdata/jsr/version_not_found/main.out4
-rw-r--r--cli/tests/testdata/jsr/version_not_found/main.ts2
30 files changed, 174 insertions, 0 deletions
diff --git a/cli/tests/testdata/jsr/deps/main.out b/cli/tests/testdata/jsr/deps/main.out
new file mode 100644
index 000000000..388e1a6d5
--- /dev/null
+++ b/cli/tests/testdata/jsr/deps/main.out
@@ -0,0 +1,13 @@
+Download http://localhost:4545/jsr/registry/@denotest/deps/meta.json
+Download http://localhost:4545/jsr/registry/@denotest/deps/1.0.0_meta.json
+Download http://localhost:4545/jsr/registry/@denotest/module_graph/meta.json
+Download http://localhost:4545/jsr/registry/@denotest/no_module_graph/meta.json
+Download http://localhost:4545/jsr/registry/@denotest/module_graph/1.4.0_meta.json
+Download http://localhost:4545/jsr/registry/@denotest/no_module_graph/0.1.1_meta.json
+[UNORDERED_START]
+Download http://localhost:4545/jsr/registry/@denotest/deps/1.0.0/mod.ts
+Download http://localhost:4545/jsr/registry/@denotest/module_graph/1.4.0/other.ts
+Download http://localhost:4545/jsr/registry/@denotest/no_module_graph/0.1.1/mod.ts
+Download http://localhost:4545/jsr/registry/@denotest/no_module_graph/0.1.1/TestClass.ts
+[UNORDERED_END]
+{ version: "0.1.1", other: Other {} }
diff --git a/cli/tests/testdata/jsr/deps/main.ts b/cli/tests/testdata/jsr/deps/main.ts
new file mode 100644
index 000000000..25b13a681
--- /dev/null
+++ b/cli/tests/testdata/jsr/deps/main.ts
@@ -0,0 +1,3 @@
+import value from "jsr:@denotest/deps/mod.ts";
+
+console.log(value);
diff --git a/cli/tests/testdata/jsr/deps/main_info.out b/cli/tests/testdata/jsr/deps/main_info.out
new file mode 100644
index 000000000..c100e1363
--- /dev/null
+++ b/cli/tests/testdata/jsr/deps/main_info.out
@@ -0,0 +1,22 @@
+Download http://localhost:4545/jsr/registry/@denotest/deps/meta.json
+Download http://localhost:4545/jsr/registry/@denotest/deps/1.0.0_meta.json
+Download http://localhost:4545/jsr/registry/@denotest/module_graph/meta.json
+Download http://localhost:4545/jsr/registry/@denotest/no_module_graph/meta.json
+Download http://localhost:4545/jsr/registry/@denotest/module_graph/1.4.0_meta.json
+Download http://localhost:4545/jsr/registry/@denotest/no_module_graph/0.1.1_meta.json
+[UNORDERED_START]
+Download http://localhost:4545/jsr/registry/@denotest/deps/1.0.0/mod.ts
+Download http://localhost:4545/jsr/registry/@denotest/module_graph/1.4.0/other.ts
+Download http://localhost:4545/jsr/registry/@denotest/no_module_graph/0.1.1/mod.ts
+Download http://localhost:4545/jsr/registry/@denotest/no_module_graph/0.1.1/TestClass.ts
+[UNORDERED_END]
+local: [WILDCARD]main.ts
+type: TypeScript
+dependencies: 4 unique
+size: [WILDCARD]
+
+file:///[WILDCARD]main.ts ([WILDCARD])
+└─┬ http://localhost:4545/jsr/registry/@denotest/deps/1.0.0/mod.ts ([WILDCARD])
+ ├── http://localhost:4545/jsr/registry/@denotest/module_graph/1.4.0/other.ts ([WILDCARD])
+ └─┬ http://localhost:4545/jsr/registry/@denotest/no_module_graph/0.1.1/mod.ts ([WILDCARD])
+ └── http://localhost:4545/jsr/registry/@denotest/no_module_graph/0.1.1/TestClass.ts ([WILDCARD])
diff --git a/cli/tests/testdata/jsr/module_graph/main.out b/cli/tests/testdata/jsr/module_graph/main.out
new file mode 100644
index 000000000..c1c8d039d
--- /dev/null
+++ b/cli/tests/testdata/jsr/module_graph/main.out
@@ -0,0 +1,7 @@
+Download http://localhost:4545/jsr/registry/@denotest/module_graph/meta.json
+Download http://localhost:4545/jsr/registry/@denotest/module_graph/1.4.0_meta.json
+[UNORDERED_START]
+Download http://localhost:4545/jsr/registry/@denotest/module_graph/1.4.0/other.ts
+Download http://localhost:4545/jsr/registry/@denotest/module_graph/1.4.0/mod.ts
+[UNORDERED_END]
+Test { other: Other {} }
diff --git a/cli/tests/testdata/jsr/module_graph/main.ts b/cli/tests/testdata/jsr/module_graph/main.ts
new file mode 100644
index 000000000..02052595c
--- /dev/null
+++ b/cli/tests/testdata/jsr/module_graph/main.ts
@@ -0,0 +1,3 @@
+import { Test } from "jsr:@denotest/module_graph/mod.ts";
+
+console.log(new Test());
diff --git a/cli/tests/testdata/jsr/module_graph/main_info.out b/cli/tests/testdata/jsr/module_graph/main_info.out
new file mode 100644
index 000000000..4bb8388ed
--- /dev/null
+++ b/cli/tests/testdata/jsr/module_graph/main_info.out
@@ -0,0 +1,14 @@
+Download http://localhost:4545/jsr/registry/@denotest/module_graph/meta.json
+Download http://localhost:4545/jsr/registry/@denotest/module_graph/1.4.0_meta.json
+[UNORDERED_START]
+Download http://localhost:4545/jsr/registry/@denotest/module_graph/1.4.0/mod.ts
+Download http://localhost:4545/jsr/registry/@denotest/module_graph/1.4.0/other.ts
+[UNORDERED_END]
+local: [WILDCARD]main.ts
+type: TypeScript
+dependencies: 2 unique
+size: [WILDCARD]
+
+file:///[WILDCARD]/module_graph/main.ts ([WILDCARD])
+└─┬ http://localhost:4545/jsr/registry/@denotest/module_graph/1.4.0/mod.ts ([WILDCARD])
+ └── http://localhost:4545/jsr/registry/@denotest/module_graph/1.4.0/other.ts ([WILDCARD])
diff --git a/cli/tests/testdata/jsr/no_module_graph/main.out b/cli/tests/testdata/jsr/no_module_graph/main.out
new file mode 100644
index 000000000..70cae572d
--- /dev/null
+++ b/cli/tests/testdata/jsr/no_module_graph/main.out
@@ -0,0 +1,6 @@
+Download http://localhost:4545/jsr/registry/@denotest/no_module_graph/meta.json
+Download http://localhost:4545/jsr/registry/@denotest/no_module_graph/0.1.0_meta.json
+Download http://localhost:4545/jsr/registry/@denotest/no_module_graph/0.1.0/mod.ts
+Download http://localhost:4545/jsr/registry/@denotest/no_module_graph/0.1.0/TestClass.ts
+0.1.0
+TestClass {}
diff --git a/cli/tests/testdata/jsr/no_module_graph/main.ts b/cli/tests/testdata/jsr/no_module_graph/main.ts
new file mode 100644
index 000000000..ab1e781dc
--- /dev/null
+++ b/cli/tests/testdata/jsr/no_module_graph/main.ts
@@ -0,0 +1,4 @@
+import version, { TestClass } from "jsr:@denotest/no_module_graph@0.1.0/mod.ts";
+
+console.log(version);
+console.log(new TestClass());
diff --git a/cli/tests/testdata/jsr/no_module_graph/main_info.out b/cli/tests/testdata/jsr/no_module_graph/main_info.out
new file mode 100644
index 000000000..282e0580c
--- /dev/null
+++ b/cli/tests/testdata/jsr/no_module_graph/main_info.out
@@ -0,0 +1,12 @@
+Download http://localhost:4545/jsr/registry/@denotest/no_module_graph/meta.json
+Download http://localhost:4545/jsr/registry/@denotest/no_module_graph/0.1.0_meta.json
+Download http://localhost:4545/jsr/registry/@denotest/no_module_graph/0.1.0/mod.ts
+Download http://localhost:4545/jsr/registry/@denotest/no_module_graph/0.1.0/TestClass.ts
+local: [WILDCARD]main.ts
+type: TypeScript
+dependencies: 2 unique
+size: [WILDCARD]
+
+file:///[WILDCARD]/jsr/no_module_graph/main.ts ([WILDCARD])
+└─┬ http://localhost:4545/jsr/registry/@denotest/no_module_graph/0.1.0/mod.ts ([WILDCARD])
+ └── http://localhost:4545/jsr/registry/@denotest/no_module_graph/0.1.0/TestClass.ts ([WILDCARD])
diff --git a/cli/tests/testdata/jsr/no_module_graph/multiple.out b/cli/tests/testdata/jsr/no_module_graph/multiple.out
new file mode 100644
index 000000000..8146276d0
--- /dev/null
+++ b/cli/tests/testdata/jsr/no_module_graph/multiple.out
@@ -0,0 +1,2 @@
+0.1.0
+0.2.0
diff --git a/cli/tests/testdata/jsr/no_module_graph/multiple.ts b/cli/tests/testdata/jsr/no_module_graph/multiple.ts
new file mode 100644
index 000000000..0df32b780
--- /dev/null
+++ b/cli/tests/testdata/jsr/no_module_graph/multiple.ts
@@ -0,0 +1,5 @@
+import version1 from "jsr:@denotest/no_module_graph@0.1.0/mod.ts";
+import version2 from "jsr:@denotest/no_module_graph@^0.2/mod.ts";
+
+console.log(version1);
+console.log(version2);
diff --git a/cli/tests/testdata/jsr/registry/@denotest/deps/1.0.0/mod.ts b/cli/tests/testdata/jsr/registry/@denotest/deps/1.0.0/mod.ts
new file mode 100644
index 000000000..5b860b603
--- /dev/null
+++ b/cli/tests/testdata/jsr/registry/@denotest/deps/1.0.0/mod.ts
@@ -0,0 +1,7 @@
+import { Other } from "jsr:@denotest/module_graph@1/other.ts";
+import version from "jsr:@denotest/no_module_graph@^0.1/mod.ts";
+
+export default {
+ version,
+ other: new Other(),
+};
diff --git a/cli/tests/testdata/jsr/registry/@denotest/deps/1.0.0_meta.json b/cli/tests/testdata/jsr/registry/@denotest/deps/1.0.0_meta.json
new file mode 100644
index 000000000..c6236b7df
--- /dev/null
+++ b/cli/tests/testdata/jsr/registry/@denotest/deps/1.0.0_meta.json
@@ -0,0 +1,17 @@
+{
+ "moduleGraph1": {
+ "/mod.ts": {
+ "dependencies": [{
+ "kind": "import",
+ "range": [[0, 0], [0, 62]],
+ "specifier": "jsr:@denotest/module_graph@1/other.ts",
+ "specifierRange": [[0, 22], [0, 61]]
+ }, {
+ "kind": "import",
+ "range": [[1, 0], [1, 64]],
+ "specifier": "jsr:@denotest/no_module_graph@^0.1/mod.ts",
+ "specifierRange": [[1, 20], [1, 63]]
+ }]
+ }
+ }
+}
diff --git a/cli/tests/testdata/jsr/registry/@denotest/deps/meta.json b/cli/tests/testdata/jsr/registry/@denotest/deps/meta.json
new file mode 100644
index 000000000..02601e4d0
--- /dev/null
+++ b/cli/tests/testdata/jsr/registry/@denotest/deps/meta.json
@@ -0,0 +1,5 @@
+{
+ "versions": {
+ "1.0.0": {}
+ }
+}
diff --git a/cli/tests/testdata/jsr/registry/@denotest/module_graph/1.4.0/mod.ts b/cli/tests/testdata/jsr/registry/@denotest/module_graph/1.4.0/mod.ts
new file mode 100644
index 000000000..cb3c4a5e0
--- /dev/null
+++ b/cli/tests/testdata/jsr/registry/@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/cli/tests/testdata/jsr/registry/@denotest/module_graph/1.4.0/other.ts b/cli/tests/testdata/jsr/registry/@denotest/module_graph/1.4.0/other.ts
new file mode 100644
index 000000000..57e436cf8
--- /dev/null
+++ b/cli/tests/testdata/jsr/registry/@denotest/module_graph/1.4.0/other.ts
@@ -0,0 +1,2 @@
+export class Other {
+}
diff --git a/cli/tests/testdata/jsr/registry/@denotest/module_graph/1.4.0_meta.json b/cli/tests/testdata/jsr/registry/@denotest/module_graph/1.4.0_meta.json
new file mode 100644
index 000000000..d1e9a96b9
--- /dev/null
+++ b/cli/tests/testdata/jsr/registry/@denotest/module_graph/1.4.0_meta.json
@@ -0,0 +1,13 @@
+{
+ "moduleGraph1": {
+ "/mod.ts": {
+ "dependencies": [{
+ "kind": "import",
+ "range": [[0, 0], [0, 35]],
+ "specifier": "./other.ts",
+ "specifierRange": [[0, 22], [0, 34]]
+ }]
+ },
+ "/other.ts": {}
+ }
+}
diff --git a/cli/tests/testdata/jsr/registry/@denotest/module_graph/meta.json b/cli/tests/testdata/jsr/registry/@denotest/module_graph/meta.json
new file mode 100644
index 000000000..9a450c08b
--- /dev/null
+++ b/cli/tests/testdata/jsr/registry/@denotest/module_graph/meta.json
@@ -0,0 +1,6 @@
+{
+ "versions": {
+ "1.0.0": {},
+ "1.4.0": {}
+ }
+}
diff --git a/cli/tests/testdata/jsr/registry/@denotest/no_module_graph/0.1.0/TestClass.ts b/cli/tests/testdata/jsr/registry/@denotest/no_module_graph/0.1.0/TestClass.ts
new file mode 100644
index 000000000..88ac04c12
--- /dev/null
+++ b/cli/tests/testdata/jsr/registry/@denotest/no_module_graph/0.1.0/TestClass.ts
@@ -0,0 +1 @@
+export default class TestClass {}
diff --git a/cli/tests/testdata/jsr/registry/@denotest/no_module_graph/0.1.0/mod.ts b/cli/tests/testdata/jsr/registry/@denotest/no_module_graph/0.1.0/mod.ts
new file mode 100644
index 000000000..57600eb4b
--- /dev/null
+++ b/cli/tests/testdata/jsr/registry/@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/cli/tests/testdata/jsr/registry/@denotest/no_module_graph/0.1.0_meta.json b/cli/tests/testdata/jsr/registry/@denotest/no_module_graph/0.1.0_meta.json
new file mode 100644
index 000000000..0967ef424
--- /dev/null
+++ b/cli/tests/testdata/jsr/registry/@denotest/no_module_graph/0.1.0_meta.json
@@ -0,0 +1 @@
+{}
diff --git a/cli/tests/testdata/jsr/registry/@denotest/no_module_graph/0.1.1/TestClass.ts b/cli/tests/testdata/jsr/registry/@denotest/no_module_graph/0.1.1/TestClass.ts
new file mode 100644
index 000000000..88ac04c12
--- /dev/null
+++ b/cli/tests/testdata/jsr/registry/@denotest/no_module_graph/0.1.1/TestClass.ts
@@ -0,0 +1 @@
+export default class TestClass {}
diff --git a/cli/tests/testdata/jsr/registry/@denotest/no_module_graph/0.1.1/mod.ts b/cli/tests/testdata/jsr/registry/@denotest/no_module_graph/0.1.1/mod.ts
new file mode 100644
index 000000000..5e1fd9435
--- /dev/null
+++ b/cli/tests/testdata/jsr/registry/@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/cli/tests/testdata/jsr/registry/@denotest/no_module_graph/0.1.1_meta.json b/cli/tests/testdata/jsr/registry/@denotest/no_module_graph/0.1.1_meta.json
new file mode 100644
index 000000000..0967ef424
--- /dev/null
+++ b/cli/tests/testdata/jsr/registry/@denotest/no_module_graph/0.1.1_meta.json
@@ -0,0 +1 @@
+{}
diff --git a/cli/tests/testdata/jsr/registry/@denotest/no_module_graph/0.2.0/TestClass.ts b/cli/tests/testdata/jsr/registry/@denotest/no_module_graph/0.2.0/TestClass.ts
new file mode 100644
index 000000000..88ac04c12
--- /dev/null
+++ b/cli/tests/testdata/jsr/registry/@denotest/no_module_graph/0.2.0/TestClass.ts
@@ -0,0 +1 @@
+export default class TestClass {}
diff --git a/cli/tests/testdata/jsr/registry/@denotest/no_module_graph/0.2.0/mod.ts b/cli/tests/testdata/jsr/registry/@denotest/no_module_graph/0.2.0/mod.ts
new file mode 100644
index 000000000..edf9622fb
--- /dev/null
+++ b/cli/tests/testdata/jsr/registry/@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/cli/tests/testdata/jsr/registry/@denotest/no_module_graph/0.2.0_meta.json b/cli/tests/testdata/jsr/registry/@denotest/no_module_graph/0.2.0_meta.json
new file mode 100644
index 000000000..0967ef424
--- /dev/null
+++ b/cli/tests/testdata/jsr/registry/@denotest/no_module_graph/0.2.0_meta.json
@@ -0,0 +1 @@
+{}
diff --git a/cli/tests/testdata/jsr/registry/@denotest/no_module_graph/meta.json b/cli/tests/testdata/jsr/registry/@denotest/no_module_graph/meta.json
new file mode 100644
index 000000000..0268b6c8a
--- /dev/null
+++ b/cli/tests/testdata/jsr/registry/@denotest/no_module_graph/meta.json
@@ -0,0 +1,7 @@
+{
+ "versions": {
+ "0.1.0": {},
+ "0.1.1": {},
+ "0.2.0": {}
+ }
+}
diff --git a/cli/tests/testdata/jsr/version_not_found/main.out b/cli/tests/testdata/jsr/version_not_found/main.out
new file mode 100644
index 000000000..ec9a2ee96
--- /dev/null
+++ b/cli/tests/testdata/jsr/version_not_found/main.out
@@ -0,0 +1,4 @@
+Download http://localhost:4545/jsr/registry/@denotest/deps/meta.json
+error: Could not find constraint in the list of versions: @denotest/deps@0.1.4
+ Specifier: jsr:@denotest/deps@0.1.4/mod.ts
+ at file:///[WILDCARD]/version_not_found/main.ts:1:19
diff --git a/cli/tests/testdata/jsr/version_not_found/main.ts b/cli/tests/testdata/jsr/version_not_found/main.ts
new file mode 100644
index 000000000..a7673b744
--- /dev/null
+++ b/cli/tests/testdata/jsr/version_not_found/main.ts
@@ -0,0 +1,2 @@
+import value from "jsr:@denotest/deps@0.1.4/mod.ts";
+console.log(value);