Skip to content

[Feature] Please improve the yarn patch DX like pnpm patch or patch-package #6772

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

Open
1 of 2 tasks
JounQin opened this issue Apr 18, 2025 · 0 comments
Open
1 of 2 tasks
Labels
enhancement New feature or request

Comments

@JounQin
Copy link

JounQin commented Apr 18, 2025

  • I'd be willing to implement this feature (contributing guide)
  • This feature is important to have in this repository; a contrib plugin wouldn't do

Describe the user story

Now when using yarn patch, a temp dir is created and requires the use to run code <temp dir> to apply the patch and then yarn patch commit <temp dir>, the workflow is really painful, and unexpected files like .DS_Store could be included if the user open the <temp dir> in macOS Finder, for example.

patch-package has much better DX that it allows to modify directly in node_modules and then the user can test before save the .patch, but it doesn't support yarn v2+ well, I raised ds300/patch-package#507 to fix it and published at @unts/patch-package, but it would be awesome to have the best DX in yarn berry itself!

pnpm patch used the same approach as yarn patch previously, but now it has better DX after pnpm/pnpm#9251

Describe the solution you'd like

For projects using nodeLinker: node_modules, the approach of [patch-package] is best.

For projects using other nodeLinker options, the approach of the new pnpm patch would also be good enough.

Describe the drawbacks of your solution

I cann't see any drawbacks

Describe alternatives you've considered

Keep it as-is and let the 3rd-party package @unts/patch-package do the dirty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant