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

feat: make bun understand yarn pnp #924

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jwoo0122
Copy link
Contributor

@jwoo0122 jwoo0122 commented Jan 22, 2025

Make knip understand yarn pnp. It can now look into manifest files inside yarn cache, and correctly check peer dependency.

Maybe we can make this feature to be enabled with yarn plugin made from #864 but I didn't find any hint to patch manifest helpers from plugin.

Copy link

pkg-pr-new bot commented Jan 22, 2025

Open in Stackblitz

npm i https://pkg.pr.new/knip@924

commit: 0e9af11

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I made a real yarn workspace to test real pnp api, but it'll be good to see any ideas for this fixture.

@jwoo0122
Copy link
Contributor Author

jwoo0122 commented Jan 22, 2025

It turns out that running all test code in series global variable in helpers (isPnPEnabled) is unintentionally flagged as false because other fixtures are not yarn pnp workspace. I'll fix it.

@jwoo0122 jwoo0122 marked this pull request as draft January 22, 2025 16:28
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