diff options
Diffstat (limited to 'tests/specs/install')
42 files changed, 173 insertions, 20 deletions
diff --git a/tests/specs/install/future_install_global/install.out b/tests/specs/install/future_install_global/install.out index 58cd88ada..0fa1b9719 100644 --- a/tests/specs/install/future_install_global/install.out +++ b/tests/specs/install/future_install_global/install.out @@ -1,4 +1,4 @@ -Download http://localhost:4260/@denotest/esm-basic +Download http://localhost:4260/@denotest%2fesm-basic Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz ✅ Successfully installed deno-test-bin[WILDCARD] [WILDCARD] diff --git a/tests/specs/install/future_install_local_add_deno/install.out b/tests/specs/install/future_install_local_add_deno/install.out index 93894a020..2f73e5afb 100644 --- a/tests/specs/install/future_install_local_add_deno/install.out +++ b/tests/specs/install/future_install_local_add_deno/install.out @@ -1,3 +1,3 @@ Add npm:@denotest/esm-basic@1.0.0 -Download http://localhost:4260/@denotest/esm-basic +Download http://localhost:4260/@denotest%2fesm-basic Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz diff --git a/tests/specs/install/future_install_local_add_npm/install.out b/tests/specs/install/future_install_local_add_npm/install.out index 42161f3ae..44bd9cac7 100644 --- a/tests/specs/install/future_install_local_add_npm/install.out +++ b/tests/specs/install/future_install_local_add_npm/install.out @@ -1,4 +1,4 @@ Add npm:@denotest/esm-basic@1.0.0 -Download http://localhost:4260/@denotest/esm-basic +Download http://localhost:4260/@denotest%2fesm-basic Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz Initialize @denotest/esm-basic@1.0.0 diff --git a/tests/specs/install/future_install_local_add_npm/package.json.out b/tests/specs/install/future_install_local_add_npm/package.json.out index ad8518e79..613d98636 100644 --- a/tests/specs/install/future_install_local_add_npm/package.json.out +++ b/tests/specs/install/future_install_local_add_npm/package.json.out @@ -1,3 +1,5 @@ { - "dependencies": { "@denotest/esm-basic": "^1.0.0" } + "dependencies": { + "@denotest/esm-basic": "^1.0.0" + } } diff --git a/tests/specs/install/future_install_local_deno/install.out b/tests/specs/install/future_install_local_deno/install.out index 15263a37b..d0972f69e 100644 --- a/tests/specs/install/future_install_local_deno/install.out +++ b/tests/specs/install/future_install_local_deno/install.out @@ -8,7 +8,7 @@ Download http://localhost:4545/subdir/print_hello.ts Download http://127.0.0.1:4250/@denotest/add/meta.json Download http://127.0.0.1:4250/@denotest/add/1.0.0_meta.json Download http://127.0.0.1:4250/@denotest/add/1.0.0/mod.ts -Download http://localhost:4260/@denotest/esm-basic +Download http://localhost:4260/@denotest%2fesm-basic Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz Download http://127.0.0.1:4250/@std/testing/1.0.0/bdd.ts Download http://127.0.0.1:4250/@std/testing/1.0.0/types.ts diff --git a/tests/specs/install/future_install_node_modules/install.out b/tests/specs/install/future_install_node_modules/install.out index b8114c12a..8f03ba640 100644 --- a/tests/specs/install/future_install_node_modules/install.out +++ b/tests/specs/install/future_install_node_modules/install.out @@ -1,3 +1,3 @@ -Download http://localhost:4260/@denotest/esm-basic +Download http://localhost:4260/@denotest%2fesm-basic Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz Initialize @denotest/esm-basic@1.0.0 diff --git a/tests/specs/install/import_map_with_dir/__test__.jsonc b/tests/specs/install/import_map_with_dir/__test__.jsonc new file mode 100644 index 000000000..cbbc7cc2e --- /dev/null +++ b/tests/specs/install/import_map_with_dir/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "tempDir": true, + "steps": [ + { + "args": "install", + "output": "" + } + ] +} diff --git a/tests/specs/install/import_map_with_dir/deno.json b/tests/specs/install/import_map_with_dir/deno.json new file mode 100644 index 000000000..5c3224b07 --- /dev/null +++ b/tests/specs/install/import_map_with_dir/deno.json @@ -0,0 +1,5 @@ +{ + "imports": { + "@assets": "./src/assets/" + } +} diff --git a/tests/specs/install/install_add_dep_existing/install.out b/tests/specs/install/install_add_dep_existing/install.out index 42161f3ae..44bd9cac7 100644 --- a/tests/specs/install/install_add_dep_existing/install.out +++ b/tests/specs/install/install_add_dep_existing/install.out @@ -1,4 +1,4 @@ Add npm:@denotest/esm-basic@1.0.0 -Download http://localhost:4260/@denotest/esm-basic +Download http://localhost:4260/@denotest%2fesm-basic Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz Initialize @denotest/esm-basic@1.0.0 diff --git a/tests/specs/install/install_add_dev/install.out b/tests/specs/install/install_add_dev/install.out index 42161f3ae..44bd9cac7 100644 --- a/tests/specs/install/install_add_dev/install.out +++ b/tests/specs/install/install_add_dev/install.out @@ -1,4 +1,4 @@ Add npm:@denotest/esm-basic@1.0.0 -Download http://localhost:4260/@denotest/esm-basic +Download http://localhost:4260/@denotest%2fesm-basic Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz Initialize @denotest/esm-basic@1.0.0 diff --git a/tests/specs/install/install_add_dev/package.json b/tests/specs/install/install_add_dev/package.json index d5ca56e00..0967ef424 100644 --- a/tests/specs/install/install_add_dev/package.json +++ b/tests/specs/install/install_add_dev/package.json @@ -1,3 +1 @@ -{ - "devDependencies": { "@denotest/esm-basic": "^1.0.0" } -} +{} diff --git a/tests/specs/install/install_add_dev/package.json.out b/tests/specs/install/install_add_dev/package.json.out index d5ca56e00..866724397 100644 --- a/tests/specs/install/install_add_dev/package.json.out +++ b/tests/specs/install/install_add_dev/package.json.out @@ -1,3 +1,5 @@ { - "devDependencies": { "@denotest/esm-basic": "^1.0.0" } + "devDependencies": { + "@denotest/esm-basic": "^1.0.0" + } } diff --git a/tests/specs/install/install_add_dev_existing/install.out b/tests/specs/install/install_add_dev_existing/install.out index 42161f3ae..44bd9cac7 100644 --- a/tests/specs/install/install_add_dev_existing/install.out +++ b/tests/specs/install/install_add_dev_existing/install.out @@ -1,4 +1,4 @@ Add npm:@denotest/esm-basic@1.0.0 -Download http://localhost:4260/@denotest/esm-basic +Download http://localhost:4260/@denotest%2fesm-basic Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz Initialize @denotest/esm-basic@1.0.0 diff --git a/tests/specs/install/install_deprecated_package/install.out b/tests/specs/install/install_deprecated_package/install.out index 95c075909..32661d971 100644 --- a/tests/specs/install/install_deprecated_package/install.out +++ b/tests/specs/install/install_deprecated_package/install.out @@ -1,5 +1,5 @@ Add npm:@denotest/deprecated-package@1.0.0 -Download http://localhost:4260/@denotest/deprecated-package +Download http://localhost:4260/@denotest%2fdeprecated-package Download http://localhost:4260/@denotest/deprecated-package/1.0.0.tgz Initialize @denotest/deprecated-package@1.0.0 Warning The following packages are deprecated: diff --git a/tests/specs/install/install_deprecated_package/package.json.out b/tests/specs/install/install_deprecated_package/package.json.out index 4b4b08087..0cf36cd24 100644 --- a/tests/specs/install/install_deprecated_package/package.json.out +++ b/tests/specs/install/install_deprecated_package/package.json.out @@ -1,3 +1,5 @@ { - "dependencies": { "@denotest/deprecated-package": "^1.0.0" } + "dependencies": { + "@denotest/deprecated-package": "^1.0.0" + } } diff --git a/tests/specs/install/install_entrypoint/install.out b/tests/specs/install/install_entrypoint/install.out index d702cf45a..da10f3aa0 100644 --- a/tests/specs/install/install_entrypoint/install.out +++ b/tests/specs/install/install_entrypoint/install.out @@ -1,6 +1,6 @@ [UNORDERED_START] Download http://127.0.0.1:4250/@denotest/add/meta.json -Download http://localhost:4260/@denotest/esm-basic +Download http://localhost:4260/@denotest%2fesm-basic Download http://127.0.0.1:4250/@denotest/add/1.0.0_meta.json Download http://127.0.0.1:4250/@denotest/add/1.0.0/mod.ts Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz diff --git a/tests/specs/install/install_entrypoint/lifecycle.out b/tests/specs/install/install_entrypoint/lifecycle.out index 2fd279875..b302ea334 100644 --- a/tests/specs/install/install_entrypoint/lifecycle.out +++ b/tests/specs/install/install_entrypoint/lifecycle.out @@ -1,6 +1,6 @@ [UNORDERED_START] -Download http://localhost:4260/@denotest/node-lifecycle-scripts -Download http://localhost:4260/@denotest/bin +Download http://localhost:4260/@denotest%2fnode-lifecycle-scripts +Download http://localhost:4260/@denotest%2fbin Download http://localhost:4260/@denotest/node-lifecycle-scripts/1.0.0.tgz Download http://localhost:4260/@denotest/bin/1.0.0.tgz Initialize @denotest/node-lifecycle-scripts@1.0.0 diff --git a/tests/specs/install/installs_all_workspace_imports/__test__.jsonc b/tests/specs/install/installs_all_workspace_imports/__test__.jsonc new file mode 100644 index 000000000..254fe8b98 --- /dev/null +++ b/tests/specs/install/installs_all_workspace_imports/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "tempDir": true, + "steps": [ + { + "args": "install", + "output": "install.out" + } + ] +} diff --git a/tests/specs/install/installs_all_workspace_imports/deno.json b/tests/specs/install/installs_all_workspace_imports/deno.json new file mode 100644 index 000000000..ac77e26d9 --- /dev/null +++ b/tests/specs/install/installs_all_workspace_imports/deno.json @@ -0,0 +1,6 @@ +{ + "workspace": ["packages/foo", "packages/bar"], + "imports": { + "@denotest/subtract": "jsr:@denotest/subtract@^1.0.0" + } +} diff --git a/tests/specs/install/installs_all_workspace_imports/install.out b/tests/specs/install/installs_all_workspace_imports/install.out new file mode 100644 index 000000000..b02e6cc03 --- /dev/null +++ b/tests/specs/install/installs_all_workspace_imports/install.out @@ -0,0 +1,10 @@ +[UNORDERED_START] +Download http://localhost:4260/@denotest%2fesm-basic +Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz +Download http://127.0.0.1:4250/@denotest/subtract/meta.json +Download http://127.0.0.1:4250/@denotest/add/meta.json +Download http://127.0.0.1:4250/@denotest/add/1.0.0_meta.json +Download http://127.0.0.1:4250/@denotest/subtract/1.0.0_meta.json +Download http://127.0.0.1:4250/@denotest/add/1.0.0/mod.ts +Download http://127.0.0.1:4250/@denotest/subtract/1.0.0/mod.ts +[UNORDERED_END] diff --git a/tests/specs/install/installs_all_workspace_imports/packages/bar/deno.json b/tests/specs/install/installs_all_workspace_imports/packages/bar/deno.json new file mode 100644 index 000000000..0172071c3 --- /dev/null +++ b/tests/specs/install/installs_all_workspace_imports/packages/bar/deno.json @@ -0,0 +1,5 @@ +{ + "imports": { + "@denotest/esm-basic": "npm:@denotest/esm-basic@^1.0.0" + } +} diff --git a/tests/specs/install/installs_all_workspace_imports/packages/foo/deno.json b/tests/specs/install/installs_all_workspace_imports/packages/foo/deno.json new file mode 100644 index 000000000..38ca2d4b8 --- /dev/null +++ b/tests/specs/install/installs_all_workspace_imports/packages/foo/deno.json @@ -0,0 +1,5 @@ +{ + "imports": { + "@denotest/add": "jsr:@denotest/add@^1.0.0" + } +} diff --git a/tests/specs/install/invalid_scheme/__test__.jsonc b/tests/specs/install/invalid_scheme/__test__.jsonc new file mode 100644 index 000000000..c4d3ebbf0 --- /dev/null +++ b/tests/specs/install/invalid_scheme/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "tempDir": true, + "args": "install", + "output": "install.out" +} diff --git a/tests/specs/install/invalid_scheme/install.out b/tests/specs/install/invalid_scheme/install.out new file mode 100644 index 000000000..cf100216b --- /dev/null +++ b/tests/specs/install/invalid_scheme/install.out @@ -0,0 +1,5 @@ +Warning Not implemented scheme 'git' + at file:///[WILDLINE]/package.json +Download http://localhost:4260/@denotest%2fadd +Download http://localhost:4260/@denotest/add/1.0.0.tgz +Initialize @denotest/add@1.0.0 diff --git a/tests/specs/install/invalid_scheme/package.json b/tests/specs/install/invalid_scheme/package.json new file mode 100644 index 000000000..5e50ae591 --- /dev/null +++ b/tests/specs/install/invalid_scheme/package.json @@ -0,0 +1,6 @@ +{ + "dependencies": { + "@denotest/add": "*", + "deno": "git:denoland/deno" + } +} diff --git a/tests/specs/install/jsr_exports/__test__.jsonc b/tests/specs/install/jsr_exports/__test__.jsonc new file mode 100644 index 000000000..7ccc5da4d --- /dev/null +++ b/tests/specs/install/jsr_exports/__test__.jsonc @@ -0,0 +1,7 @@ +{ + "tempDir": true, + "steps": [ + { "args": "install", "output": "install.out" }, + { "args": "run --cached-only main.ts", "output": "main.out" } + ] +} diff --git a/tests/specs/install/jsr_exports/deno.json b/tests/specs/install/jsr_exports/deno.json new file mode 100644 index 000000000..4b281f80a --- /dev/null +++ b/tests/specs/install/jsr_exports/deno.json @@ -0,0 +1,5 @@ +{ + "imports": { + "@denotest/multiple-exports": "jsr:@denotest/multiple-exports@^1.0.0" + } +} diff --git a/tests/specs/install/jsr_exports/install.out b/tests/specs/install/jsr_exports/install.out new file mode 100644 index 000000000..bce0d79bb --- /dev/null +++ b/tests/specs/install/jsr_exports/install.out @@ -0,0 +1,13 @@ +[UNORDERED_START] +Download http://127.0.0.1:4250/@denotest/multiple-exports/meta.json +Download http://127.0.0.1:4250/@denotest/multiple-exports/1.0.0_meta.json +Download http://127.0.0.1:4250/@denotest/multiple-exports/1.0.0/add.ts +Download http://127.0.0.1:4250/@denotest/multiple-exports/1.0.0/subtract.ts +Download http://127.0.0.1:4250/@denotest/multiple-exports/1.0.0/data.json +Download http://127.0.0.1:4250/@denotest/add/meta.json +Download http://127.0.0.1:4250/@denotest/subtract/meta.json +Download http://127.0.0.1:4250/@denotest/add/1.0.0_meta.json +Download http://127.0.0.1:4250/@denotest/subtract/1.0.0_meta.json +Download http://127.0.0.1:4250/@denotest/add/1.0.0/mod.ts +Download http://127.0.0.1:4250/@denotest/subtract/1.0.0/mod.ts +[UNORDERED_END] diff --git a/tests/specs/install/jsr_exports/main.out b/tests/specs/install/jsr_exports/main.out new file mode 100644 index 000000000..6ce184bad --- /dev/null +++ b/tests/specs/install/jsr_exports/main.out @@ -0,0 +1,3 @@ +3 +-1 +{ a: 1 } diff --git a/tests/specs/install/jsr_exports/main.ts b/tests/specs/install/jsr_exports/main.ts new file mode 100644 index 000000000..f7efdb0e9 --- /dev/null +++ b/tests/specs/install/jsr_exports/main.ts @@ -0,0 +1,7 @@ +import { add } from "@denotest/multiple-exports/add"; +import { subtract } from "@denotest/multiple-exports/subtract"; +import data from "@denotest/multiple-exports/data-json" with { type: "json" }; + +console.log(add(1, 2)); +console.log(subtract(1, 2)); +console.log(data); diff --git a/tests/specs/install/non_existent_optional_peer/install.out b/tests/specs/install/non_existent_optional_peer/install.out index 292c1a4e2..694d4b51b 100644 --- a/tests/specs/install/non_existent_optional_peer/install.out +++ b/tests/specs/install/non_existent_optional_peer/install.out @@ -1,5 +1,5 @@ [UNORDERED_START] -Download http://localhost:4260/@denotest/non-existent-optional-peer +Download http://localhost:4260/@denotest%2fnon-existent-optional-peer Download http://localhost:4260/uWebSockets.js Download http://localhost:4260/@denotest/non-existent-optional-peer/1.0.0.tgz [UNORDERED_END] diff --git a/tests/specs/install/scripts_install_launch_cjs_temp_dir/__test__.jsonc b/tests/specs/install/scripts_install_launch_cjs_temp_dir/__test__.jsonc new file mode 100644 index 000000000..087d08eff --- /dev/null +++ b/tests/specs/install/scripts_install_launch_cjs_temp_dir/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "tempDir": true, + "args": "install --allow-scripts", + "output": "output.out" +} diff --git a/tests/specs/install/scripts_install_launch_cjs_temp_dir/output.out b/tests/specs/install/scripts_install_launch_cjs_temp_dir/output.out new file mode 100644 index 000000000..d5f06cc6e --- /dev/null +++ b/tests/specs/install/scripts_install_launch_cjs_temp_dir/output.out @@ -0,0 +1,4 @@ +Download http://localhost:4260/@denotest%2finstall-launch-cjs-temp-dir +Download http://localhost:4260/@denotest/install-launch-cjs-temp-dir/1.0.0.tgz +Initialize @denotest/install-launch-cjs-temp-dir@1.0.0 +Initialize @denotest/install-launch-cjs-temp-dir@1.0.0: running 'install' script diff --git a/tests/specs/install/scripts_install_launch_cjs_temp_dir/package.json b/tests/specs/install/scripts_install_launch_cjs_temp_dir/package.json new file mode 100644 index 000000000..71672f9bc --- /dev/null +++ b/tests/specs/install/scripts_install_launch_cjs_temp_dir/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "@denotest/install-launch-cjs-temp-dir": "*" + } +} diff --git a/tests/specs/install/scripts_install_no_ext/__test__.jsonc b/tests/specs/install/scripts_install_no_ext/__test__.jsonc new file mode 100644 index 000000000..087d08eff --- /dev/null +++ b/tests/specs/install/scripts_install_no_ext/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "tempDir": true, + "args": "install --allow-scripts", + "output": "output.out" +} diff --git a/tests/specs/install/scripts_install_no_ext/output.out b/tests/specs/install/scripts_install_no_ext/output.out new file mode 100644 index 000000000..074e97812 --- /dev/null +++ b/tests/specs/install/scripts_install_no_ext/output.out @@ -0,0 +1,4 @@ +Download http://localhost:4260/@denotest%2finstall-no-ext +Download http://localhost:4260/@denotest/install-no-ext/1.0.0.tgz +Initialize @denotest/install-no-ext@1.0.0 +Initialize @denotest/install-no-ext@1.0.0: running 'install' script diff --git a/tests/specs/install/scripts_install_no_ext/package.json b/tests/specs/install/scripts_install_no_ext/package.json new file mode 100644 index 000000000..7ac9ca6b2 --- /dev/null +++ b/tests/specs/install/scripts_install_no_ext/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "@denotest/install-no-ext": "*" + } +} diff --git a/tests/specs/install/type_only_import/__test__.jsonc b/tests/specs/install/type_only_import/__test__.jsonc new file mode 100644 index 000000000..22b8134ac --- /dev/null +++ b/tests/specs/install/type_only_import/__test__.jsonc @@ -0,0 +1,10 @@ +{ + "tempDir": true, + "steps": [ + { "args": "install -e main.ts", "output": "install.out" }, + { + "args": "run --check --cached-only main.ts", + "output": "run.out" + } + ] +} diff --git a/tests/specs/install/type_only_import/install.out b/tests/specs/install/type_only_import/install.out new file mode 100644 index 000000000..1bdbec4e5 --- /dev/null +++ b/tests/specs/install/type_only_import/install.out @@ -0,0 +1,6 @@ +Download http://127.0.0.1:4250/@denotest/type-only-import/meta.json +Download http://127.0.0.1:4250/@denotest/type-only-import/1.0.0_meta.json +[UNORDERED_START] +Download http://127.0.0.1:4250/@denotest/type-only-import/1.0.0/mod.ts +Download http://127.0.0.1:4250/@denotest/type-only-import/1.0.0/foo.ts +[UNORDERED_END] diff --git a/tests/specs/install/type_only_import/main.ts b/tests/specs/install/type_only_import/main.ts new file mode 100644 index 000000000..bf22935a2 --- /dev/null +++ b/tests/specs/install/type_only_import/main.ts @@ -0,0 +1,3 @@ +import { foo } from "jsr:@denotest/type-only-import"; + +console.log(foo.bar); diff --git a/tests/specs/install/type_only_import/run.out b/tests/specs/install/type_only_import/run.out new file mode 100644 index 000000000..d36ac8aa3 --- /dev/null +++ b/tests/specs/install/type_only_import/run.out @@ -0,0 +1,2 @@ +Check [WILDCARD]main.ts +foo diff --git a/tests/specs/install/workspace_member_with_tag_dep/install.out b/tests/specs/install/workspace_member_with_tag_dep/install.out index b8114c12a..8f03ba640 100644 --- a/tests/specs/install/workspace_member_with_tag_dep/install.out +++ b/tests/specs/install/workspace_member_with_tag_dep/install.out @@ -1,3 +1,3 @@ -Download http://localhost:4260/@denotest/esm-basic +Download http://localhost:4260/@denotest%2fesm-basic Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz Initialize @denotest/esm-basic@1.0.0 |