fix(cli): use next dist-tag for self-update when on a prerelease version#1215
Merged
fix(cli): use next dist-tag for self-update when on a prerelease version#1215
Conversation
When the installed version has a prerelease identifier (e.g. 4.25.3-next.1), the update check and self-update command now query the `next` npm dist-tag instead of `latest`. This prevents suggesting or applying a downgrade to the older stable release. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Deploying agentv with
|
| Latest commit: |
dc4e055
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://fafe8e02.agentv.pages.dev |
| Branch Preview URL: | https://fix-self-update-next-channel.agentv.pages.dev |
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
4.25.3-next.1),agentv self updatenow queries thenextnpm dist-tag instead oflatestgetUpdateNotice) uses the same dist-tag logic so it never suggests a downgrade in the startup bannerperformSelfUpdate()auto-detects the correct dist-tag fromcurrentVersionwhen no explicitversionRangeis passedRoot cause
NPM_REGISTRY_URLwas hardcoded to.../agentv/latestin bothself-update.tsandupdate-check.ts. On anextprerelease, fetchinglatestreturns an older stable release, which the command then offered to install as an "update".Test plan
getDistTagForVersion('4.25.3-next.1')→'next'getDistTagForVersion('4.25.1')→'latest'🤖 Generated with Claude Code