Here is the strange situation I had. I created and applied the patch, but it looks like if my changes are at the end of the file and there is \ No newline at end of file fragment in the patch (which is generated by the patch) then the patch doesn't apply the last line.
Context
I made a patch for @tamagui/web for v0.117.0:
I forked the original repo
I made changes in the original files
I run the build to get compiled files
I went to my project folder
I created a temporary patch folder with yarn patch @tamagui/web
I copied compiled files to that folder
I created a patch with yarn patch-commit -s
I double-checked all files and the patch to make sure everything is ok
I ran the app and I received an error
The issue was because there was no "}" and the end of node_modules/@tamagui/web/dist/cjs/helpers/getSplitStyles.cjs. This file btw. was generated by the tamagui build process when I was preparing the files for the patch, so I didn't make any manual changes in this file, and the patch, so we can exclude any human mistake.
To reproduce
Install @tamagui/core v1.117.0
Apply this patch @tamagui-web-npm-1.117.0-df6a3adcef:
Self-service
Describe the bug
Here is the strange situation I had. I created and applied the patch, but it looks like if my changes are at the end of the file and there is
\ No newline at end of file
fragment in the patch (which is generated by the patch) then the patch doesn't apply the last line.Context
I made a patch for @tamagui/web for v0.117.0:
yarn patch @tamagui/web
yarn patch-commit -s
The issue was because there was no "}" and the end of
node_modules/@tamagui/web/dist/cjs/helpers/getSplitStyles.cjs
. This file btw. was generated by the tamagui build process when I was preparing the files for the patch, so I didn't make any manual changes in this file, and the patch, so we can exclude any human mistake.To reproduce
@tamagui-web-npm-1.117.0-df6a3adcef
:Everything works fine after removing this line
\ No newline at end of file
. Or if I added manually a new line in the file for the patch.Environment
Additional context
No response