feat(cli): non-blocking upgrade check with rate-limited notice#1173
Merged
graphite-app[bot] merged 1 commit intomainfrom Mar 30, 2026
Merged
feat(cli): non-blocking upgrade check with rate-limited notice#1173graphite-app[bot] merged 1 commit intomainfrom
graphite-app[bot] merged 1 commit intomainfrom
Conversation
✅ Deploy Preview for viteplus-preview canceled.
|
Member
Author
How to use the Graphite Merge QueueAdd the label auto-merge to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
cpojer
approved these changes
Mar 30, 2026
Member
cpojer
left a comment
There was a problem hiding this comment.
Nice! It looks like it is not annoying, which is the most important thing.
Merge activity
|
## Summary - Add background upgrade check that queries the npm registry for the latest `vp` version - Show a one-line notice on stderr at most **once per 24 hours** (not on every run) - Registry query is also rate-limited to once per 24 hours, cached to `~/.vite-plus/.upgrade-check.json` - Runs as an async background task concurrently with the command — zero latency impact ## Suppression The check is skipped entirely when: - `VP_NO_UPDATE_CHECK=1`, `CI`, or `VITE_PLUS_CLI_TEST` is set - Stderr is not a TTY (non-interactive / piped) - Command is `upgrade`, `implode`, `lint`, or `fmt` - Command has `--silent` or `--json` flag ## RFC See `rfcs/upgrade-check.md` for full design rationale.  ## Test plan - [x] `cargo test -p vite_global_cli -- upgrade_check` (16 tests) - [x] Manual: `rm ~/.vite-plus/.upgrade-check.json && vp build` — shows notice if behind latest - [x] Manual: `vp build` again — no notice (prompted_at within 24h) - [ ] Manual: `VP_NO_UPDATE_CHECK=1 vp build` — no notice - [ ] Manual: `vp install --silent` — no notice
2140d7c to
db75675
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
vpversion~/.vite-plus/.upgrade-check.jsonSuppression
The check is skipped entirely when:
VP_NO_UPDATE_CHECK=1,CI, orVITE_PLUS_CLI_TESTis setupgrade,implode,lint, orfmt--silentor--jsonflagRFC
See
rfcs/upgrade-check.mdfor full design rationale.Test plan
cargo test -p vite_global_cli -- upgrade_check(16 tests)rm ~/.vite-plus/.upgrade-check.json && vp build— shows notice if behind latestvp buildagain — no notice (prompted_at within 24h)VP_NO_UPDATE_CHECK=1 vp build— no noticevp install --silent— no notice