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

Prevents a workspace from depending on itself #6572

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ReDrUm
Copy link

@ReDrUm ReDrUm commented Oct 23, 2024

What's the problem this PR addresses?

Within a monorepo I've encountered a few package.json files that erroneously depend on themselves. Obviously an accident. This seems like an easy thing for the automatic package.json sanitization to cleanup, alongside the other checks it performs.

...

How did you fix it?

Updated the manifest to delete self referencing dependencies to the existing package name. When Workspace.persistManifest is called the package.json will be rewritten to remove them.

Similar to #421, except this will cleanup files that were manually added (rather than via yarn add), and handle cleaning up preexisting matches.

...

Checklist

  • [ x ] I have read the Contributing Guide.
  • [ x ] I have set the packages that need to be released for my changes to be effective.
  • [ x ] I will check that all automated PR checks pass before the PR gets reviewed.

@ReDrUm ReDrUm changed the title Disallow self referencing deps Prevents a workspace from depending on itself Oct 23, 2024
@ReDrUm ReDrUm force-pushed the disallow-self-ref-deps branch 3 times, most recently from 5e0794b to 579d894 Compare October 23, 2024 22:11
@yarnpkg yarnpkg deleted a comment Oct 24, 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.

1 participant