wasp-lang / wasp

The fastest way to develop full-stack web apps with React & Node.js.
https://wasp-lang.dev
MIT License
13.63k stars 1.18k forks source link

Inform Wasp CLI users about new update available #615

Open Martinsos opened 2 years ago

Martinsos commented 2 years ago

In case there is a newer version of Wasp CLI available, we should let users about it!

I am not sure what is the best frequency of such informative message -> I don't think it should be printed at every wasp call because it could get tedious quickly, especially if you don't want to upgrade at the moment and are ok with keeping the current version.

Actually, if it is a bug fix / patch -> so change in patch version -> then we can show the message more often, since you can only benefit from upgrading (except for possible new bugs but ok). Same goes for minor version, which means upgrades. But if it is a breaking change (major version), then you might not want to change for some time, since it requires migrating and modifications to the code. So this kind of message we want to show less often.

Off the bat, it could work like this then:

  1. Once per day, Wasp will check online (not yet sure how, maybe it can check GH releases) to see what is the latest version of Wasp available. It could check for two things: latest version with same major version number, and latest version in general. It wouldn't do the check more often than once per day (same like we do with telemetry).
  2. If there is a newer version, it would print an informative message about it when you run wasp start. We could print it every time on wasp start, or we could again limit the printing to once per day. We could have an even stronger limit, like once per week, if dealing with the major version change.
  3. If you run wasp version, it would print both current version, and then below it would print the latest version, every time. 4.Maybe it would also print version warning on just wasp or wasp help?

This is just a very rough idea, maybe we should simplify it and just say it gets printed on any wasp command + time limits (once per day, once per week, ...).

Martinsos commented 2 years ago

This is related with #163 .