[Bug?]: yarn patch
may generate a patch with extraneous files
#6664
Labels
bug
Something isn't working
yarn patch
may generate a patch with extraneous files
#6664
Self-service
Describe the bug
When doing
yarn patch
, it does a diff on disk between two folders, and everything found on disk will be included in the patch. Thepackage.json#files
field is not checked.This may result in the patch containing more than the author patch had in mind. For example, certain auto-generated hidden files by the operating system may be included in the patch (notably
.DS_store
on MacOS).This is problematic because then when reviewing a pull request with such patch, if it includes large binary data, such patch might be unreadable e.g. in GH UI, and may require fetching the branch locally and using a special tool for understanding contents of the patch
To reproduce
Environment
Additional context
.DS_store
files from the diff, and perhaps some other files like~
files created by some text editors.The text was updated successfully, but these errors were encountered: