From 977df777620634edd06d0a069983220d66bd4af3 Mon Sep 17 00:00:00 2001 From: Nathan Whitaker Date: Wed, 23 Oct 2024 16:48:21 -0700 Subject: [PATCH] cache all jsr package exports --- cli/tools/registry/pm/cache_deps.rs | 4 ---- tests/specs/install/jsr_exports/__test__.jsonc | 6 ++++++ tests/specs/install/jsr_exports/deno.json | 5 +++++ tests/specs/install/jsr_exports/install.out | 12 ++++++++++++ 4 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 tests/specs/install/jsr_exports/__test__.jsonc create mode 100644 tests/specs/install/jsr_exports/deno.json create mode 100644 tests/specs/install/jsr_exports/install.out diff --git a/cli/tools/registry/pm/cache_deps.rs b/cli/tools/registry/pm/cache_deps.rs index b4cd1c2532b39f..365622d11f5f03 100644 --- a/cli/tools/registry/pm/cache_deps.rs +++ b/cli/tools/registry/pm/cache_deps.rs @@ -89,10 +89,6 @@ pub async fn cache_top_level_deps( while let Some(info_future) = info_futures.next().await { if let Some((specifier, info)) = info_future { - if info.export(".").is_some() { - roots.push(specifier.clone()); - continue; - } let exports = info.exports(); for (k, _) in exports { if let Ok(spec) = specifier.join(k) { diff --git a/tests/specs/install/jsr_exports/__test__.jsonc b/tests/specs/install/jsr_exports/__test__.jsonc new file mode 100644 index 00000000000000..934f3c58859cbd --- /dev/null +++ b/tests/specs/install/jsr_exports/__test__.jsonc @@ -0,0 +1,6 @@ +{ + "tempDir": true, + "steps": [ + { "args": "install", "output": "install.out" } + ] +} diff --git a/tests/specs/install/jsr_exports/deno.json b/tests/specs/install/jsr_exports/deno.json new file mode 100644 index 00000000000000..21212f5794d97f --- /dev/null +++ b/tests/specs/install/jsr_exports/deno.json @@ -0,0 +1,5 @@ +{ + "imports": { + "@denotest/different-deps-per-export": "jsr:@denotest/different-deps-per-export@^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 00000000000000..8f640016369da1 --- /dev/null +++ b/tests/specs/install/jsr_exports/install.out @@ -0,0 +1,12 @@ +[UNORDERED_START] +Download http://127.0.0.1:4250/@denotest/different-deps-per-export/meta.json +Download http://127.0.0.1:4250/@denotest/different-deps-per-export/1.0.0_meta.json +Download http://127.0.0.1:4250/@denotest/different-deps-per-export/1.0.0/add.ts +Download http://127.0.0.1:4250/@denotest/different-deps-per-export/1.0.0/subtract.ts +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]