1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-28 16:20:57 -05:00

fix(info): handle circular npm dependencies (#16692)

This commit is contained in:
David Sherret 2022-11-17 21:22:28 -05:00 committed by Bartek Iwańczuk
parent 53cfa8096f
commit fa0a197c2f
No known key found for this signature in database
GPG key ID: 0C6BCDDC3B3AD750

View file

@ -580,7 +580,8 @@ impl<'a> GraphDisplayContext<'a> {
));
if let Some(package) = self.npm_info.packages.get(dep_id) {
if !package.dependencies.is_empty() {
if self.seen.contains(&package.id.as_serialized()) {
let was_seen = !self.seen.insert(package.id.as_serialized());
if was_seen {
child.text = format!("{} {}", child.text, colors::gray("*"));
} else {
let package = package.clone();