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

Fails to recognize diffs in package.json #219

Closed
kumavis opened this issue Mar 28, 2020 · 1 comment
Closed

Fails to recognize diffs in package.json #219

kumavis opened this issue Mar 28, 2020 · 1 comment

Comments

@kumavis
Copy link

kumavis commented Mar 28, 2020

I was trying to modify a package's main field, but patch-package reported no changes found

my guess is the package.json is intentionally ignored to avoid anomalous diffs made by package managers. but I was also surprised that this didn't work

thanks for patch-package/
its a treasure 🏆

@ds300
Copy link
Owner

ds300 commented Mar 28, 2020

my guess is the package.json is intentionally ignored to avoid anomalous diffs made by package managers

exactly, yes! the --exclude option has a default value of '/package.json$'

to work around it you can override the --exclude flag to not match package.json, e.g.

patch-package some-package --exclude '^$'

@kumavis kumavis closed this as completed Apr 2, 2020
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

No branches or pull requests

2 participants