Comments (16)
Just tried it, works perfectly for me π
from patch-package.
Great idea, thanks! I think I'll do this tonight.
from patch-package.
Can you see any downside to ignoring EOL whitespace differences by default?
from patch-package.
Not really, probably best to do so.
from patch-package.
Yeah me neither. I'll do that first and then think about how to support other git diff options later. I think just allowing arbitrary commands through would be the wrong thing to do. Most of them are unrelated to patch-package's concerns.
from patch-package.
I've done this and it's in master, but haven't been able to publish. npm registry seems to be failing. Will try again tomorrow.
from patch-package.
Yeah, I thought arbitrary options would help working around future issues but you are right that most of them won't be needed.
Thanks for fixing the issue and keep up the good work!
from patch-package.
Oh, looks like it did get published last night and the npm registry was just being unresponsive somehow. Try out version 3.5.1!
from patch-package.
Had some time to look at the git diff
docs, and there are three options I could imagine being useful to me one day, and maybe another five that might fit some very particular use cases I can't foresee. Anyway, I think I'll do what you originally suggested and make it so that any args passed after a solitary --
are then passed to git diff
when creating patches. This is the lazy way out.
e.g.
patch-package my-package -- --diff-algorithm=patience
from patch-package.
While I appreciate this, I did not have a closer look at all options, so I suggest adding some kind of warning because some options might interfere with the normal usage of patch-package ;)
from patch-package.
:o I was looking for this :D I had to do -- --no-color
any chance this can be added the the README? I could create a PR for it
from patch-package.
I think I'm misunderstanding your comment. Are you saying that it worked for you when adding -- --no-color
?
This feature isn't implemented yet, so that would be odd π
from patch-package.
Sorry, I had to add --no-color in the code to make this work so it would be nice to have this feature. Do you need help implementing?
from patch-package.
@wardpeet Yeah that'd be great if you've got the time!
from patch-package.
Normally, a double dash signifies the end of the argument list. Any arguments you pass afterwards are generally passed to the root command (e.g. npx / node) [https://linux.die.net/man/1/bash].
"A -- signals the end of options and disables further option processing. Any arguments after the -- are treated as filenames and arguments. An argument of - is equivalent to --. "
Passing these arguments to git instead could be fairly confusing. Maybe it's better to copy npx' approach, e.g. add a --git-arg parameter? [https://www.npmjs.com/package/npx]
"-n, --node-arg - Extra node argument to supply to node when binary is a node script. You can supply this option multiple times to add more arguments."
from patch-package.
Closing this issue due to inactivity.
from patch-package.
Related Issues (20)
- [Proposal] Reduce `patch-package` installation size HOT 2
- [Discussion] Global patches HOT 1
- New patch parse failed
- Add new dependency to a package
- Does patch-package support node12? HOT 1
- Failed to apply patch for package react-native-agora HOT 1
- Is there a way to convert pnpm patches to patch-package patches? Or do they use the same format? HOT 2
- -
- Uniterpretable Error during makePatch HOT 5
- react-native-otp-verify+1.1.6.patch
- Confusing syntax error message when pointing to a package that does not exist
- Patch not applied after package upgrade
- inflight - Missing Release of Resource after Effective Lifetime HOT 1
- how get the post-install to run when installing cosmos (or storybook and the like)
- Patch cannot be applied when it simultaneously renames and modifies the file HOT 1
- npx patch-package [email protected] error
- Not sure if I'm clear on how to re-apply updated patch...
- Can patch-package detect content changes in package.json? Let's say I changed a dependency versionοΌ HOT 2
- Failed to apply patch for package react-native at path node_modules/react-native HOT 1
- Failed to apply patch for package react-native-ui-lib at path node_modules/react-native-ui-lib
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from patch-package.