Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(install): cache all exports of JSR packages listed in deno.json #26501

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions cli/tools/registry/pm/cache_deps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 6 additions & 0 deletions tests/specs/install/jsr_exports/__test__.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"tempDir": true,
"steps": [
{ "args": "install", "output": "install.out" }
]
}
5 changes: 5 additions & 0 deletions tests/specs/install/jsr_exports/deno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"imports": {
"@denotest/different-deps-per-export": "jsr:@denotest/different-deps-per-export@^1.0.0"
}
}
12 changes: 12 additions & 0 deletions tests/specs/install/jsr_exports/install.out
Original file line number Diff line number Diff line change
@@ -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]