patch-package
patch-package copied to clipboard
Creating patch file for GitHub dependency fails
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch [email protected]
for the project I'm working on.
Closes #288
Here is the diff that solved my problem:
diff --git a/node_modules/patch-package/dist/getPackageResolution.js b/node_modules/patch-package/dist/getPackageResolution.js
index bc7ffaa..287a2f1 100644
--- a/node_modules/patch-package/dist/getPackageResolution.js
+++ b/node_modules/patch-package/dist/getPackageResolution.js
@@ -65,7 +65,7 @@ function getPackageResolution({ packageDetails, packageManager, appPath, }) {
lockFileStack.reverse();
const relevantStackEntry = lockFileStack.find((entry) => entry.dependencies && packageDetails.name in entry.dependencies);
const pkg = relevantStackEntry.dependencies[packageDetails.name];
- return pkg.resolved || pkg.from || pkg.version;
+ return pkg.resolved || pkg.version || pkg.from;
}
}
exports.getPackageResolution = getPackageResolution;
This issue body was partially generated by patch-package.
Thanks, stumbled on the same issue, this works well !
@ds300 could you merge this ?
This fixed my problem as well! Please merge into main repo!
+1 Please merge.
Might want to make a pull request for this to merge. This is just an issue.
Works for me, thanks :)