feat: package update checker w/ banner
Resolves: #10
This adds maximum flexibility to customize update banner and adds checks to make sure you are on the latest.
Additionally if it cannot fetch it will skip the the banner for now.
Message format: Update available! {current} → {latest}.\n\nRun "npm install -g {cmd}" to update then citty will auto replace variables with actually data for flexibility.
Thanks for the nice PR!
I am thinking to split functionalities into proper packages:
- Box =>
consola/utilsthis way we can minify the dependency overhead since consola bundles them - Check for npm version / updates => nypm similarly we might optimize depes better in place
- Merged functionality => Either citty core or nypm. (i am more thinking about nypm now because this keep citty zero dependency package but ideas welcome. this is a common feature..)
@pi0 Ohh okay! Well let me know what you want to me to do to help separate to move this along!
Thanks, CP
Hi dear @cpreston321 sorry this took long. I am still not sure about the right place to introduce this feature (might come up with new unjs package). Feel free to move forward to draft a minimum project if you had time to work on this. We might eventually make it part of unjs. (also feel free to dm me in discord if have questions)