1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-21 23:04:45 -05:00

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`.
This commit is contained in:
Nathan Whitaker 2024-10-23 20:12:52 -07:00 committed by GitHub
parent 69e1d7a4ed
commit 6d587cbfc8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 23 additions and 4 deletions

View file

@ -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) {

View file

@ -0,0 +1,6 @@
{
"tempDir": true,
"steps": [
{ "args": "install", "output": "install.out" }
]
}

View file

@ -0,0 +1,5 @@
{
"imports": {
"@denotest/different-deps-per-export": "jsr:@denotest/different-deps-per-export@^1.0.0"
}
}

View file

@ -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]