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

Add patch support to upgrade-interactive #6492

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

johnf
Copy link

@johnf johnf commented Sep 12, 2024

What's the problem this PR addresses?

yarn upgrade-interactive does not currently support patches. It will always think a patch is upgradable even if no new version exists. Where there is a new version, the patch is lost from the resolutions and not reapplied.

I thought I saw an issue for this once upon a time, but I can't find it anymore.
...

How did you fix it?

I've updated the interactive plugin. During the suggestion creation, I check if the spec uses the patch protocol. If it is, I unpack the version from the patch and pass that to the relevant functions. I then recreate the patch spec to apply to the new version.
...

Checklist

  • I have read the Contributing Guide.
  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

@johnf
Copy link
Author

johnf commented Sep 12, 2024

Quick note, it doesn't yet support cascading patches

@Nantris
Copy link

Nantris commented Oct 24, 2024

Friendly bump. Yarn patching is really not good compared to patch-package :(

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