[Feature] Please improve the yarn patch
DX like pnpm patch
or patch-package
#6772
Labels
enhancement
New feature or request
Describe the user story
Now when using
yarn patch
, a temp dir is created and requires the use to runcode <temp dir>
to apply the patch and thenyarn 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 macOSFinder
, for example.patch-package
has much better DX that it allows to modify directly innode_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 asyarn patch
previously, but now it has better DX after pnpm/pnpm#9251Describe 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 newpnpm 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.The text was updated successfully, but these errors were encountered: