summaryrefslogtreecommitdiff
path: root/tests/specs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-09-09 16:19:29 -0400
committerGitHub <noreply@github.com>2024-09-09 20:19:29 +0000
commit72f025c74320ffd6df9758ac53c74db68e0a3e10 (patch)
treeb7c72a6055cbd13bedcc0132af0c1f96342858ea /tests/specs
parent1e0ac609b57b9efdafd54de4cb56f98c507c032f (diff)
fix: remove recently added deno.json node_modules aliasing (#25542)
This was initially added in #25399 in order to make transitioning over from package.json to deno.json more easy, but it causes some problems that are shown in the issue and it also means that the output of `deno install` would have different resolution than `npm install`. Overall, I think it's too much complexity to be smarter about this and it's probably best to not do it. If someone needs an aliased folder then they should keep using a package.json Closes #25538
Diffstat (limited to 'tests/specs')
-rw-r--r--tests/specs/install/alias_deno_json/__test__.jsonc10
-rw-r--r--tests/specs/install/alias_deno_json/deno.json5
-rw-r--r--tests/specs/install/alias_deno_json/package.json2
-rw-r--r--tests/specs/install/alias_deno_json/verify.ts2
-rw-r--r--tests/specs/install/alias_invalid_path_char/__test__.jsonc10
-rw-r--r--tests/specs/install/alias_invalid_path_char/deno.jsonc7
-rw-r--r--tests/specs/install/alias_invalid_path_char/package.json2
-rw-r--r--tests/specs/install/alias_invalid_path_char/verify.ts10
-rw-r--r--tests/specs/install/alias_pkg_json_and_deno_json_npm_pkg/verify.out2
-rw-r--r--tests/specs/workspaces/nested_deno_pkg_npm_conflict/__test__.jsonc4
-rw-r--r--tests/specs/workspaces/nested_deno_pkg_npm_conflict/member/main.js6
11 files changed, 3 insertions, 57 deletions
diff --git a/tests/specs/install/alias_deno_json/__test__.jsonc b/tests/specs/install/alias_deno_json/__test__.jsonc
deleted file mode 100644
index 0398e2eeb..000000000
--- a/tests/specs/install/alias_deno_json/__test__.jsonc
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "tempDir": true,
- "steps": [{
- "args": "install",
- "output": "[WILDCARD]"
- }, {
- "args": "run --allow-read=. verify.ts",
- "output": "true\n"
- }]
-}
diff --git a/tests/specs/install/alias_deno_json/deno.json b/tests/specs/install/alias_deno_json/deno.json
deleted file mode 100644
index a1adfb35e..000000000
--- a/tests/specs/install/alias_deno_json/deno.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "imports": {
- "alias": "npm:@denotest/add"
- }
-}
diff --git a/tests/specs/install/alias_deno_json/package.json b/tests/specs/install/alias_deno_json/package.json
deleted file mode 100644
index 2c63c0851..000000000
--- a/tests/specs/install/alias_deno_json/package.json
+++ /dev/null
@@ -1,2 +0,0 @@
-{
-}
diff --git a/tests/specs/install/alias_deno_json/verify.ts b/tests/specs/install/alias_deno_json/verify.ts
deleted file mode 100644
index ea6cadb70..000000000
--- a/tests/specs/install/alias_deno_json/verify.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-const stat = Deno.statSync(new URL("./node_modules/alias", import.meta.url));
-console.log(stat.isDirectory);
diff --git a/tests/specs/install/alias_invalid_path_char/__test__.jsonc b/tests/specs/install/alias_invalid_path_char/__test__.jsonc
deleted file mode 100644
index 4a3058635..000000000
--- a/tests/specs/install/alias_invalid_path_char/__test__.jsonc
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "tempDir": true,
- "steps": [{
- "args": "install",
- "output": "[WILDCARD]"
- }, {
- "args": "run --allow-read=. verify.ts",
- "output": ".bin\n.deno\n@denotest\n"
- }]
-}
diff --git a/tests/specs/install/alias_invalid_path_char/deno.jsonc b/tests/specs/install/alias_invalid_path_char/deno.jsonc
deleted file mode 100644
index 85befb55e..000000000
--- a/tests/specs/install/alias_invalid_path_char/deno.jsonc
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "imports": {
- // alias*test is an invalid path char on windows, so
- // don't create an alias for this
- "alias*test": "npm:@denotest/add"
- }
-}
diff --git a/tests/specs/install/alias_invalid_path_char/package.json b/tests/specs/install/alias_invalid_path_char/package.json
deleted file mode 100644
index 2c63c0851..000000000
--- a/tests/specs/install/alias_invalid_path_char/package.json
+++ /dev/null
@@ -1,2 +0,0 @@
-{
-}
diff --git a/tests/specs/install/alias_invalid_path_char/verify.ts b/tests/specs/install/alias_invalid_path_char/verify.ts
deleted file mode 100644
index 497e1d8dd..000000000
--- a/tests/specs/install/alias_invalid_path_char/verify.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-const entries = Array.from(
- Deno.readDirSync(new URL("./node_modules", import.meta.url)),
-);
-const names = entries.map((entry) => entry.name);
-names.sort();
-
-// won't have the invalid path alias
-for (const name of names) {
- console.log(name);
-}
diff --git a/tests/specs/install/alias_pkg_json_and_deno_json_npm_pkg/verify.out b/tests/specs/install/alias_pkg_json_and_deno_json_npm_pkg/verify.out
index bc6cb31f7..8c989abd4 100644
--- a/tests/specs/install/alias_pkg_json_and_deno_json_npm_pkg/verify.out
+++ b/tests/specs/install/alias_pkg_json_and_deno_json_npm_pkg/verify.out
@@ -1,4 +1,4 @@
-@denotest/add
+@denotest/esm-basic
[Module: null prototype] {
add: [Function (anonymous)],
default: { add: [Function (anonymous)] }
diff --git a/tests/specs/workspaces/nested_deno_pkg_npm_conflict/__test__.jsonc b/tests/specs/workspaces/nested_deno_pkg_npm_conflict/__test__.jsonc
index 1bad68fd4..d0d7579b8 100644
--- a/tests/specs/workspaces/nested_deno_pkg_npm_conflict/__test__.jsonc
+++ b/tests/specs/workspaces/nested_deno_pkg_npm_conflict/__test__.jsonc
@@ -5,9 +5,9 @@
"output": "[WILDCARD]"
}, {
"args": "run --allow-read main.js",
- "output": "4\n0.5.0\n"
+ "output": "4\n1.0.0\n"
}, {
"args": "run --allow-read member/main.js",
- "output": "3\n1.0.0\n"
+ "output": "3\n"
}]
}
diff --git a/tests/specs/workspaces/nested_deno_pkg_npm_conflict/member/main.js b/tests/specs/workspaces/nested_deno_pkg_npm_conflict/member/main.js
index 0f64cf553..1ca631410 100644
--- a/tests/specs/workspaces/nested_deno_pkg_npm_conflict/member/main.js
+++ b/tests/specs/workspaces/nested_deno_pkg_npm_conflict/member/main.js
@@ -1,9 +1,3 @@
import { add } from "@denotest/add";
console.log(add(1, 2));
-
-console.log(
- JSON.parse(Deno.readTextFileSync(
- new URL("node_modules/@denotest/add/package.json", import.meta.url),
- )).version,
-);