You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Patches are successfully applied when they either only modify a specific file or change its name, but fail when doing both at the same time.
Steps to reproduce
patch-package version: 8.0.0
Initialize npm project
Install any package (for example react-native-wiejskie-ziemniaczki)
Select any file in the installed package, rename it and modify its content (in case of the aforementioned package rename README.md to not-readme.txt and add A letter at the end of the file)
Generate the patch file
Reinstall node_modules
Try to apply the patch
The patch should get applied, but the error is shown
Interestingly, the patch is applied correctly when running npx patch-package --partial
Here is the patch file that generated error for me:
diff --git a/node_modules/react-native-wiejskie-ziemniaczki/README.md b/node_modules/react-native-wiejskie-ziemniaczki/not-readme.txt
similarity index 97%
rename from node_modules/react-native-wiejskie-ziemniaczki/README.md
rename to node_modules/react-native-wiejskie-ziemniaczki/not-readme.txt
index 7ff824b..b5b7bf7 100644
--- a/node_modules/react-native-wiejskie-ziemniaczki/README.md+++ b/node_modules/react-native-wiejskie-ziemniaczki/not-readme.txt@@ -1,3 +1,5 @@
# react-native-wiejskie-ziemniaczki
Documentation available on: https://wiejskieziemniaczki.pl/
++A
\ No newline at end of file
Workaround
Splitting the patch into two parts seems to be working well, i.e.: one patch just to rename the file and the other to modify the content.
The text was updated successfully, but these errors were encountered:
Description
Patches are successfully applied when they either only modify a specific file or change its name, but fail when doing both at the same time.
Steps to reproduce
patch-package
version: 8.0.0react-native-wiejskie-ziemniaczki
)README.md
tonot-readme.txt
and addA
letter at the end of the file)node_modules
Interestingly, the patch is applied correctly when running
npx patch-package --partial
Here is the patch file that generated error for me:
Workaround
Splitting the patch into two parts seems to be working well, i.e.: one patch just to rename the file and the other to modify the content.
The text was updated successfully, but these errors were encountered: