citty icon indicating copy to clipboard operation
citty copied to clipboard

feat: package update checker w/ banner

Open cpreston321 opened this issue 2 years ago • 3 comments

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.

image

cpreston321 avatar Apr 03 '23 20:04 cpreston321

Thanks for the nice PR!

I am thinking to split functionalities into proper packages:

  • Box => consola/utils this 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 avatar Apr 05 '23 09:04 pi0

@pi0 Ohh okay! Well let me know what you want to me to do to help separate to move this along!

Thanks, CP

cpreston321 avatar Apr 06 '23 14:04 cpreston321

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)

pi0 avatar Sep 09 '23 12:09 pi0