From 72f025c74320ffd6df9758ac53c74db68e0a3e10 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Mon, 9 Sep 2024 16:19:29 -0400 Subject: 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 --- tests/specs/workspaces/nested_deno_pkg_npm_conflict/__test__.jsonc | 4 ++-- tests/specs/workspaces/nested_deno_pkg_npm_conflict/member/main.js | 6 ------ 2 files changed, 2 insertions(+), 8 deletions(-) (limited to 'tests/specs/workspaces') 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, -); -- cgit v1.2.3