Skip to content

Commit

Permalink
fix: root package has peer dependency on itself
Browse files Browse the repository at this point in the history
  • Loading branch information
littledivy committed Oct 3, 2024
1 parent e0c7024 commit e1e6ea1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/resolution/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1356,6 +1356,12 @@ impl<'a, TNpmRegistryApi: NpmRegistryApi>
} else {
(None, path)
};

if path.is_empty() {
// the peer dep is the same as the parent, so we don't need to do anything
return;
}

self.add_peer_deps_to_path(path, &[(&peer_dep, peer_dep_nv.clone())]);

// now set the peer dependency
Expand Down

0 comments on commit e1e6ea1

Please sign in to comment.