Skip to content

feat: package update checker w/ banner#21

Draft
cpreston321 wants to merge 3 commits intounjs:mainfrom
cpreston321:feat/updateChecker
Draft

feat: package update checker w/ banner#21
cpreston321 wants to merge 3 commits intounjs:mainfrom
cpreston321:feat/updateChecker

Conversation

@cpreston321
Copy link
Copy Markdown
Member

@cpreston321 cpreston321 commented Apr 3, 2023

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

@pi0
Copy link
Copy Markdown
Member

pi0 commented Apr 5, 2023

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..)

@cpreston321
Copy link
Copy Markdown
Member Author

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

Thanks,
CP

@pi0
Copy link
Copy Markdown
Member

pi0 commented Sep 9, 2023

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 pi0 marked this pull request as draft September 9, 2023 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update checker

2 participants