Skip to content

Commit 84195af

Browse files
nathanwhitbartlomieju
authored andcommitted
fix(install): cache all exports of JSR packages listed in deno.json (#26501)
Fixes #26498. This was a sort of intentional decision originally, as I wanted to avoid caching extra files that may not be needed. It seems like that behavior is unintuitive, so I propose we cache all of the exports of listed jsr packages when you run a bare `deno install`.
1 parent f0e63ad commit 84195af

File tree

4 files changed

+23
-4
lines changed

4 files changed

+23
-4
lines changed

cli/tools/registry/pm/cache_deps.rs

-4
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,6 @@ pub async fn cache_top_level_deps(
8989

9090
while let Some(info_future) = info_futures.next().await {
9191
if let Some((specifier, info)) = info_future {
92-
if info.export(".").is_some() {
93-
roots.push(specifier.clone());
94-
continue;
95-
}
9692
let exports = info.exports();
9793
for (k, _) in exports {
9894
if let Ok(spec) = specifier.join(k) {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"tempDir": true,
3+
"steps": [
4+
{ "args": "install", "output": "install.out" }
5+
]
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"imports": {
3+
"@denotest/different-deps-per-export": "jsr:@denotest/different-deps-per-export@^1.0.0"
4+
}
5+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[UNORDERED_START]
2+
Download http://127.0.0.1:4250/@denotest/different-deps-per-export/meta.json
3+
Download http://127.0.0.1:4250/@denotest/different-deps-per-export/1.0.0_meta.json
4+
Download http://127.0.0.1:4250/@denotest/different-deps-per-export/1.0.0/add.ts
5+
Download http://127.0.0.1:4250/@denotest/different-deps-per-export/1.0.0/subtract.ts
6+
Download http://127.0.0.1:4250/@denotest/add/meta.json
7+
Download http://127.0.0.1:4250/@denotest/subtract/meta.json
8+
Download http://127.0.0.1:4250/@denotest/add/1.0.0_meta.json
9+
Download http://127.0.0.1:4250/@denotest/subtract/1.0.0_meta.json
10+
Download http://127.0.0.1:4250/@denotest/add/1.0.0/mod.ts
11+
Download http://127.0.0.1:4250/@denotest/subtract/1.0.0/mod.ts
12+
[UNORDERED_END]

0 commit comments

Comments
 (0)