summaryrefslogtreecommitdiff
path: root/cli/npm/resolution.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-09-08 13:34:57 -0500
committerGitHub <noreply@github.com>2023-09-08 14:34:57 -0400
commitc521c5fe771a92a73b2e48c846e1346fb7ca2b20 (patch)
treec9c695930dcfe67d2d213acb9ad600f77fca4a34 /cli/npm/resolution.rs
parent9cac5601b8f37ba4713631a13cf1ed65c82012c9 (diff)
feat: lockfile v3 (#20424)
Details: https://github.com/denoland/deno_lockfile/pull/8
Diffstat (limited to 'cli/npm/resolution.rs')
-rw-r--r--cli/npm/resolution.rs17
1 files changed, 10 insertions, 7 deletions
diff --git a/cli/npm/resolution.rs b/cli/npm/resolution.rs
index d097f8cd4..73e27f487 100644
--- a/cli/npm/resolution.rs
+++ b/cli/npm/resolution.rs
@@ -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() {