-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
compare current version against latest and not wanted version in outdated command #4519
Conversation
This change will increase the build size from 9.92 MB to 9.93 MB, an increase of 378 bytes (0%)
|
I don't have a strong opinion on this but I'd like to verify this behavior with @yarnpkg/core. Anyone willing to approve this patch? @danez it would be great if you could add some tests for this btw. |
What about adding a colour key on the bottom here, it might be hard to tell those apart otherwise |
Thanks for your feedbacks. I also noticed that in the above case it is also weird because all the changes in the screenshot are considered "major/breaking" (0.1.0 -> 0.2.0 or 1.0.0 > 2.0.0), though they still have different colors. I guess the difference in the color should be:
Does that make sense? We could also add a For the tests I could mock the formatter and check which color is used for which dep. Does that sound okay? |
I also just noticed that |
(0.1.0 -> 0.2.0) is not considered major/breaking, since it's a minor bump and should be backwards compatible
I think it's confusing to have a color mean two things (how to upgrade and potentially breaking / non-breaking--the latter especially feels inconclusive). Ideally it should use the same key as upgrade-interactive
Sounds good to me!
I'm not sure I follow. The colors seem to correctly reflect the key in upgrade-interactive (major bumps being in red for backwards-incompatible change). The difference is that |
@kaylieEB thanks for the clarification, seems I mixed some things up. I always thought that when the major version is 0 that semver defines that the minor version gets promoted to major, but that is not the case. The specification only says:
It seems I confused the semver spec with the way how the caret operator works, but that is not part of the specification. Will try to finish this today. |
current and wanted might be the same but latest is the new major version which results in most outdated entries beeing white instead of the proper color
@danez ping! need any help? |
I think it is done now, I also added the legend. |
src/reporters/lang/en.js
Outdated
@@ -114,6 +114,8 @@ const messages = { | |||
allDependenciesUpToDate: 'All of your dependencies are up to date.', | |||
legendColorsForUpgradeInteractive: | |||
'Color legend : \n $0 : Major Update backward-incompatible updates \n $1 : Minor Update backward-compatible features \n $2 : Patch Update backward-compatible bug fixes', | |||
legendColorsForOutdated: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the same as legendColorsForUpgradeInteractive
should I merge them? If yes what to name them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah I'd prefer merging them. How about legendColorsForVersionUpdates
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay changed :)
Thanks so much for your help @danez ! I'll merge once CI passes :) |
Thank you :) |
…ated command (yarnpkg#4519) **Summary** `current` and `wanted` version might be the same but `latest` is a new major version and as current and wanted are compared against each other it results in most outdated entries being white instead of the proper color Here a before/after screenshot: ![bildschirmfoto 2017-09-22 um 13 41 56](https://user-images.githubusercontent.com/231804/30743120-9efa6824-9f9c-11e7-9f17-7b511597e13b.png)
Summary
current
andwanted
version might be the same butlatest
is a new major versionand as current and wanted are compared against each other it results in most outdated entries being white instead of the proper color
Here a before/after screenshot: