@@ -107,15 +107,17 @@ Then, update your hash key to include a checksum of that file:
107107` ` ` yaml
108108- restore_cache :
109109 key :
110- app-node_modules-v1-{{ checksum "yarn.lock" }}-{{ checksum "patches.hash" }}
110+ app-node_modules-v1-{{ checksum "yarn.lock" }}-{{ checksum "patches.hash"
111+ }}
111112` ` `
112113
113114As well as the save_cache
114115
115116` ` ` yaml
116117- save_cache :
117118 key :
118- app-node_modules-v1-{{ checksum "yarn.lock" }}-{{ checksum "patches.hash" }}
119+ app-node_modules-v1-{{ checksum "yarn.lock" }}-{{ checksum "patches.hash"
120+ }}
119121 paths :
120122 - ./node_modules
121123` ` `
@@ -342,6 +344,21 @@ If you deleted one of the patch files other than the last one, you don't need to
342344update the sequence numbers in the successive patch file names, but you might
343345want to do so to keep things tidy.
344346
347+ # ### Partially applying a broken patch file
348+
349+ Normally patch application is atomic per patch file. i.e. if a patch file
350+ contains an error anywhere then none of the changes in the patch file will be
351+ applied and saved to disk.
352+
353+ This can be problematic if you have a patch with many changes and you want to
354+ keep some of them and update others.
355+
356+ In this case you can use the `--partial` option. Patch-package will apply as
357+ many of the changes as it can and then leave it to you to fix the rest.
358+
359+ Any errors encountered will be written to a file `./patch-package-errors.log` to
360+ help you keep track of what needs fixing.
361+
345362# # Benefits of patching over forking
346363
347364- Sometimes forks need extra build steps, e.g. with react-native for Android.
0 commit comments