feat: lockfile v3 (#20424)

Details: https://github.com/denoland/deno_lockfile/pull/8
This commit is contained in:
David Sherret 2023-09-08 13:34:57 -05:00 committed by GitHub
parent 9cac5601b8
commit c521c5fe77
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 63 additions and 53 deletions

View file

@ -369,13 +369,16 @@ fn populate_lockfile_from_snapshot(
snapshot: &NpmResolutionSnapshot,
) -> Result<(), AnyError> {
for (package_req, nv) in snapshot.package_reqs() {
lockfile.insert_npm_specifier(
package_req.to_string(),
snapshot
.resolve_package_from_deno_module(nv)
.unwrap()
.id
.as_serialized(),
lockfile.insert_package_specifier(
format!("npm:{}", package_req),
format!(
"npm:{}",
snapshot
.resolve_package_from_deno_module(nv)
.unwrap()
.id
.as_serialized()
),
);
}
for package in snapshot.all_packages_for_every_system() {