-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Feature proposal: ignore lists for upgrade-interactive #2562
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
base: master
Are you sure you want to change the base?
Feature proposal: ignore lists for upgrade-interactive #2562
Conversation
I'm not super fond of the API. It doesn't seem like something that should be configured via yet another field. Considering that semver already conveys whether something is compatible with higher versions or not ( |
Master is fine (all our tests are passing), can you detail what doesn't work exactly? |
88b3334
to
ca4e04f
Compare
That's a good point. It does make sense from my point of view. Personally I always use However there are some concerns that come to mind:
What do you think?
Sorry man, I totally misunderstood your comment from #2370. I was testing with the current version of the yarn cli and Clipanion 3, no wonder it didn't work. I have updated this branch with master now. |
Hi, any news about it? |
@arcanis brought some good points about the complexity that this PR adds, but I don't think we will find an ideal solution that implements this feature without increasing complexity or adding breaking changes. However if we come to a solution I'm happy to put more work into this. In the meantime a good alternative is adopting WhiteSource Renovate which supports ignoring specific versions. This is what I use with my employer and I personally don't have the need for this feature in |
@arcanis What can we do make this happen? We have a bunch of dependencies that we do not want to update. |
sorry to be that guy - but is there any news on this feature? cheers :-) |
What's the problem this PR addresses?
This PR adds the ability to ignore dependency upgrades on the
yarn upgrade-interactive
command.This feature has been suggested or talked about in yarnpkg/yarn#3368 and yarnpkg/yarn#8005.
A developer may want to update package upgrades for many reasons, for example:
devDependencies
).Maintaining an ignore list has the advantage that it reduces clutter on the
upgrade-interactive
interface. Instead of each entry being simply informative of an outdated version, by empowering developers with the choice to ignore versions each entry behaves more like "a notification", which is more useful. For big teams another advantage is that it allows to document why a dependency was ignored, something that would otherwise be left out to issue trackers, Slack conversations, or more typically it would never be documented.How did you fix it?
From the developer's perspective, they just continue using the same interface they know, except they can now press
i
to toggle between upgrading and ignoring a dependency:yarn-upgrade-interactive-ignore-list-demo.mp4
The following lines are added to the developer's
.yarnrc.yml
automatically:Now, whenever the developer runs the same command again,
husky
won't appear anymore. More specifically, any versions that match^5.1.3
will be ignored, which means that the next major version (e.gv6.0.0
) will appear.To ignore all future versions, they can change their configuration to:
Or to ignore that particular version, but be notified of new ones:
This PR is made using 63a77b5 as the base, notmaster
. This is because the upgrade to Clipanion 3 left this command broken (Migrates to Clipanion 3 #2370). This means that until master is fixed, this PR is not ready, hence why it's published as draft.@yarnpkg/core
and@yarnpkg/libui
which triggers releases in many pakcages. Because of this, I have not ranyarn version check
. I would rather leave this up to maintainers..yarnrc.yml
, or increasing the complexity of the UI by adding an additional hotkey. I understand that these decisions might not be necessarily aligned with the project goals, so feel free to make any criticism, I'm open to any changes.Checklist