1

I've just upgraded yarn to v1.0.1 and I've noticed that the output color is changed from only red/yellow to white/green/yellow/red...

What's the meaning of that?

cl0udw4lk3r
  • 2,663
  • 5
  • 26
  • 46

1 Answers1

3

It only depends upon comparison of Current to Wanted:

  • white - no change
  • green - patch changed (last of the three)
  • yellow - minor version changed (middle)
  • red - major version changed or any change for pre-releases

The changed part of the version is also highlighted in the Wanted column.

  • so, if I do `yarn upgrade` I will upgrade only white and green? – cl0udw4lk3r Sep 08 '17 at 17:50
  • No, it will upgrade everything else to white :-) The `Current` column shows what's in your `node_modules`, the `Wanted` column shows what's available and deemed safe to upgrade to according to the rules you specify in your `project.json` - see [here](https://stackoverflow.com/questions/22343224/whats-the-difference-between-tilde-and-caret-in-package-json). White means `Latest` is greater than `Wanted` so you have change your `project.json` to upgrade – Michael Domashchenko Sep 08 '17 at 17:59
  • is not a bit counterintuitive? White means more "safe" than dangerous, no? – cl0udw4lk3r Sep 08 '17 at 18:08
  • 1
    Well, we're talking opinions now, not facts. You might think about it in terms of attracting your attention. Patch changed - probably a bug fix, might be important and unlikely to break things. So it's red - you should upgrade. White means a major version change - it might break your code. So, you're just gently warned with white. – Michael Domashchenko Sep 08 '17 at 18:13