diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-05-24 16:23:10 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-24 16:23:10 -0400 |
commit | 91ca9904b57db275a51a81ad71b1ee9fe42c7cda (patch) | |
tree | da6b478939b6bdf5a11f57a5a92f1dad8905fca5 /cli/args | |
parent | 114ec3c1f71b40bd4bba473b0187e7c664ed1755 (diff) |
refactor: upgrade to deno_npm 0.6 (#19244)
Diffstat (limited to 'cli/args')
-rw-r--r-- | cli/args/lockfile.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/cli/args/lockfile.rs b/cli/args/lockfile.rs index c169c7b00..c54fdcd75 100644 --- a/cli/args/lockfile.rs +++ b/cli/args/lockfile.rs @@ -82,7 +82,7 @@ pub async fn snapshot_from_lockfile( // now fill the packages except for the dist information let mut packages = Vec::with_capacity(lockfile.content.npm.packages.len()); for (key, package) in &lockfile.content.npm.packages { - let pkg_id = NpmPackageId::from_serialized(key)?; + let id = NpmPackageId::from_serialized(key)?; // collect the dependencies let mut dependencies = HashMap::with_capacity(package.dependencies.len()); @@ -92,7 +92,7 @@ pub async fn snapshot_from_lockfile( } packages.push(SerializedNpmResolutionSnapshotPackage { - pkg_id, + id, dependencies, // temporarily empty os: Default::default(), @@ -105,10 +105,7 @@ pub async fn snapshot_from_lockfile( }; // now that the lockfile is dropped, fetch the package version information - let pkg_nvs = packages - .iter() - .map(|p| p.pkg_id.nv.clone()) - .collect::<Vec<_>>(); + let pkg_nvs = packages.iter().map(|p| p.id.nv.clone()).collect::<Vec<_>>(); let get_version_infos = || { FuturesOrdered::from_iter(pkg_nvs.iter().map(|nv| async move { let package_info = api.package_info(&nv.name).await?; |