-
-
Notifications
You must be signed in to change notification settings - Fork 300
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
Patch fails when created with v6.0.0-5 #53
Comments
Hi! 👋! Thanks for the report! There seems to be an issue with the way the patch file was generated on your machine. It is missing the ❯ cat patches/localforage+1.7.1.patch
diff --git a/node_modules/localforage/src/drivers/indexeddb.js b/node_modules/localforage/src/drivers/indexeddb.js
index c77786f..f54a612 100644
--- a/node_modules/localforage/src/drivers/indexeddb.js
+++ b/node_modules/localforage/src/drivers/indexeddb.js
@@ -664,7 +664,12 @@ function setItem(key, value, callback) {
resolve(value);
};
- transaction.onabort = transaction.onerror = function() {
+
+ transaction.onerror = function() {
+ reject(req.error);
+ };
+
+ transaction.onabort = function() {
var err = req.error
? req.error
: req.transaction.error; I think this is supposed to be part of the git spec: https://git-scm.com/docs/git-diff#_generating_patches_with_p but maybe there are certain environmental factors which could prevent these prefixes from being included. Are you aware of anything? Otherwise, it would be great to know which OS and git version you're working with. As well as any custom global git configuration you can share. |
Good to know!
|
Digged a little and probably is because I'm using custom diff stuff to colorize etc, so maybe adding a flag here patch-package/src/makePatch.ts Line 136 in a99c87a
git diff --no-ext-diff could work (haven't tried).
|
I think this is the culprit: I didn't realise this was an option until now :) Out of interest, why do you have that option set? |
Thank you! That must be it. Probably it was done when I tried this tool https://github.com/so-fancy/diff-so-fancy. I will get rid of it and try again. |
This is also happening to us. It's happening when someone updates/creates a patch on mac and that patch is applied on a windows machine. This is the smallest project in which the problem occure. I've included an old patch that was working and the new one, which throws the error above, with my node modules: This is the project without node modules: yarn version:1.7.0 The patch can by applyed by running "lerna bootstrap" in the main folder, or by runnint "git apply.." in the "first" forder. The result is the same If you need more details, I m happy to help. |
I tried to bypass this error by reverting the patch to the old one, making the saves myself and running "patch-package". Unfortunately, the second time I run yarn, the patch-package failed with the "inconsistent whitespace" problem. This is the newly created patch, on the windows machine(I changed it's extension to be able to upload it here): |
Edit: |
Hi @alexhuiculescu ! 👋 Thanks for the report! I just got back from a long holiday and have a lot of issues to work through over the next few days. Rest assured this one is a high priority. Thanks for your patience. 🙏 Which cli environment are you using on Windows? |
I'm using VSCode with cmd as default terminal |
Edit: using the built in VSCode command to replace LF with CRLF on the commited files did the trick. I've just made the changes myself while standardizing the end lines with Windows end-line style |
Hi,
First, congrats for the project, I think helps a lot the Developer Experience (DX).
So, after running into this whitespace issue #36, I moved to the beta npm channel but got another one:
The patch is created OK:
But
yarn patch-package
fails with:Aplying the patch manually works:
Thank you.
The text was updated successfully, but these errors were encountered: