Skip to content
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

feat: add CLI command #28

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

jedwards1211
Copy link

Thanks for this great package!

I added a simple CLI command, you just run merge-package.json in your project directory
after a merge failed with merge conflicts in package.json, and it writes
the merged output to package.json. It uses git show HEAD:package.json,
git show MERGE_HEAD:package.json, and also git show with the output of
git merge-base HEAD MERGE_HEAD to get the input for your existing Node API.

@kellyselden
Copy link
Owner

This looks pretty cool! Thanks! Can you add a test please to prove that it is working?

@jedwards1211
Copy link
Author

jedwards1211 commented Feb 6, 2019

@kellyselden done, and I used some real-world package.jsons in a fixture :) the tests use sync fs and child_process operations. I can make them async if you want, but if so I'll need to add fs-extra and promisify-child-process as dev dependencies.

@kellyselden
Copy link
Owner

I want to give this a proper review soon. I noticed your fixtures have a lot of code unique to your project. Could you perhaps limit the code samples to the bare minimum? GitHub search is bad and I would like these to not show up in my day to day code searches.

@jedwards1211
Copy link
Author

Oh I see. By code samples you mean package.json files right? Yeah I could whittle them down

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants