summaryrefslogtreecommitdiff
path: root/cli/npm/resolvers/common.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/npm/resolvers/common.rs')
-rw-r--r--cli/npm/resolvers/common.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/cli/npm/resolvers/common.rs b/cli/npm/resolvers/common.rs
index 07996c4e1..32b8293cd 100644
--- a/cli/npm/resolvers/common.rs
+++ b/cli/npm/resolvers/common.rs
@@ -70,13 +70,19 @@ pub async fn cache_packages(
// and we want the output to be deterministic
packages.sort_by(|a, b| a.id.cmp(&b.id));
}
+
let mut handles = Vec::with_capacity(packages.len());
for package in packages {
+ assert_eq!(package.copy_index, 0); // the caller should not provide any of these
let cache = cache.clone();
let registry_url = registry_url.clone();
let handle = tokio::task::spawn(async move {
cache
- .ensure_package(&package.id, &package.dist, &registry_url)
+ .ensure_package(
+ (package.id.name.as_str(), &package.id.version),
+ &package.dist,
+ &registry_url,
+ )
.await
});
if sync_download {