Can patch-package detect content changes in package.json? Let's say I changed a dependency version?
https://github.com/ds300/patch-package/issues/341
Yes with the method above, or by manually editing the diff. It probably won't help you though, e.g. if you're trying to change peer deps to stop getting warnings/errors with npm update/install.
I believe npm uses its online registry to resolve peerDeps. You can stop warnings with npm install (not update) by changing the peerDependencies for the package in question in your own package-lock.json.
I think the best way to handle this would be to use overrides in your package.json file to specify the version that you want
see https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides and https://stackoverflow.com/questions/15806152/how-do-i-override-nested-npm-dependency-versions