Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: handle npm dep depending on self when package id has peer dep resolution #71

Conversation

dsherret
Copy link
Member

@@ -858,7 +863,7 @@ impl<'a, TNpmRegistryApi: NpmRegistryApi>
// Some packages may resolves to themselves as a dependency. If this occurs,
// just ignore adding these as dependencies because this is likely a mistake
// in the package.
if child_id != parent_id {
if child_nv != parent_path.nv {
Copy link
Member Author

@dsherret dsherret Oct 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug fix is here (we should just compare the nvs and not the ids because peer dep resolution is not relevant here) and mitigation for past lockfiles is above.

@dsherret dsherret changed the title fix: handle npm dep depending on self when package has peer dep resolution fix: handle npm dep depending on self when package id has peer dep resolution Oct 15, 2024
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@dsherret dsherret merged commit a42dd0e into denoland:main Oct 15, 2024
1 check passed
@dsherret dsherret deleted the fix_npm_package_depending_on_self_with_peer_deps branch October 15, 2024 18:16
dsherret added a commit to denoland/deno that referenced this pull request Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants