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

fix(install): cache jsr deps from all workspace config files (#26779)

Fixes #26772.

I wasn't aware that the `imports()` method only returned the workspace
root imports
This commit is contained in:
Nathan Whitaker 2024-11-08 12:45:30 -08:00 committed by GitHub
parent b482a50299
commit d4f1bd3dac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 40 additions and 1 deletions

View file

@ -44,7 +44,11 @@ pub async fn cache_top_level_deps(
let mut seen_reqs = std::collections::HashSet::new();
for entry in import_map.imports().entries() {
for entry in import_map.imports().entries().chain(
import_map
.scopes()
.flat_map(|scope| scope.imports.entries()),
) {
let Some(specifier) = entry.value else {
continue;
};

View file

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

View file

@ -0,0 +1,6 @@
{
"workspace": ["packages/foo", "packages/bar"],
"imports": {
"@denotest/subtract": "jsr:@denotest/subtract@^1.0.0"
}
}

View file

@ -0,0 +1,10 @@
[UNORDERED_START]
Download http://localhost:4260/@denotest%2fesm-basic
Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz
Download http://127.0.0.1:4250/@denotest/subtract/meta.json
Download http://127.0.0.1:4250/@denotest/add/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]

View file

@ -0,0 +1,5 @@
{
"imports": {
"@denotest/esm-basic": "npm:@denotest/esm-basic@^1.0.0"
}
}

View file

@ -0,0 +1,5 @@
{
"imports": {
"@denotest/add": "jsr:@denotest/add@^1.0.0"
}
}