Skip to content

Always attempt all patches, even if one fails #199

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

Closed
dobesv opened this issue Jan 31, 2020 · 4 comments · Fixed by #217
Closed

Always attempt all patches, even if one fails #199

dobesv opened this issue Jan 31, 2020 · 4 comments · Fixed by #217

Comments

@dobesv
Copy link

dobesv commented Jan 31, 2020

It would be a convenience if patch-package would attempt to apply all patches, and report errors/success for every patch, rather than exiting immediately on the first failure.

Use Case

Sometimes an upstream package is updated to accept my patch, and the patch I have in our project becomes obsolete. In this case patch-package reports an error that the patch failed, and immediately exits. I can happily delete the patch file.

However, there is a catch: I have to re-run patch-package to ensure that any packages that would have been applied after the one that failed are applied. I pretty much always forget to do this, resulting in much confusion for me.

@ds300
Copy link
Owner

ds300 commented Feb 7, 2020

ah, sorry about the confusion!

Yeah that makes sense, it's a great improvement suggestion, thanks 🙏

@akwodkiewicz
Copy link
Contributor

I also needed this behaviour (for me it was CI builds in monorepo project), so I pushed a proposal in PR #217.

@dobesv
Copy link
Author

dobesv commented Dec 5, 2020

Another use case: when building for production, our dev dependencies are not present in node_modules. patch-package exits as soon as it fails to patch one of those dependencies due it not being there.

@dobesv
Copy link
Author

dobesv commented Dec 7, 2020

@ds300 What do you think about merging the PR or coming up with a different solution?

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 a pull request may close this issue.

3 participants