From 3479bc76613761cf31f7557d482e691274c365f1 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Tue, 21 Feb 2023 12:03:48 -0500 Subject: fix(npm): improve peer dependency resolution (#17835) This PR fixes peer dependency resolution to only resolve peers based on the current graph traversal path. Previously, it would resolve a peers by looking at a graph node's ancestors, which is not correct because graph nodes are shared by different resolutions. It also stores more information about peer dependency resolution in the lockfile. --- cli/args/lockfile.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cli/args') diff --git a/cli/args/lockfile.rs b/cli/args/lockfile.rs index f93027430..1a3233c5a 100644 --- a/cli/args/lockfile.rs +++ b/cli/args/lockfile.rs @@ -75,8 +75,8 @@ impl Into for NpmResolutionPackage { .collect(); NpmPackageLockfileInfo { - display_id: self.id.display(), - serialized_id: self.id.as_serialized(), + display_id: self.pkg_id.nv.to_string(), + serialized_id: self.pkg_id.as_serialized(), integrity: self.dist.integrity().to_string(), dependencies, } -- cgit v1.2.3