fix: resolve default version via npm latest dist-tag#3
Merged
Conversation
The homepage default (no ?tag= query) scanned the GitHub /releases list and returned the first release with matching installer assets, which could pick up a stable release instead of the intended alpha channel. Resolve the default version via npm's `alpha` dist-tag first, then fetch that specific tag from GitHub. On failure (incl. 404 from npm/GitHub being momentarily out of sync) return null so getRelease doesn't poison `release:latest` with a 5-minute negative cache.
|
✅ Staging deployment successful! Preview: https://vp-setup-staging.void.app/ |
…ller vite-plus 0.1.17 is published under the `latest` dist-tag and now includes the Windows installer, so the default channel should be `latest` rather than `alpha`. Users who still want alpha builds can pass `?tag=v0.1.17-alpha.5` explicitly.
- void: @void-sdk/void 0.2.6 -> 0.3.0 - vite / vite-plus / vitest catalogs: ^0.1.16 -> ^0.1.17 - void.json: compatibility_date added by `vp config` during `prepare`
…lve-alpha-dist-tag
|
✅ Staging deployment successful! Preview: https://vp-setup-staging.void.app/ |
|
✅ Staging deployment successful! Preview: https://vp-setup-staging.void.app/ |
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
?tag=query) used to hitGET /releases?per_page=10and return the first release with matching installer assets, which could miss or mis-order the intended channel.latestdist-tag first (vite-plus 0.1.17 now ships underlatestand includes the Windows installer), then fetch that specific tag from GitHub. AddedDEFAULT_DIST_TAG = "latest"and generalizedfetchLatestVersionFromNpm→fetchNpmDistTagVersion(distTag).nullrather than"not-found"sogetReleasedoesn't poisonrelease:latestwith a 5-minute negative cache — the stale-cache /buildReleaseFromTagfallbacks still apply.?tag=v0.1.17-alpha.5.Test plan
vp checkvp test— 24/24 passing, including 4 new default-path cases forfetchRelease:latest→ GitHub/releases/tags/v<version>nulland skips GitHublatestdist-tag returnsnulland skips GitHubnull(not"not-found")vp dev:/with no query renders v0.1.17 (currentlatest)?tag=v0.1.17-alpha.5still renders that specific release?arch=x64(no tag) 302-redirects to the v0.1.17 x64 installer?tag=does-not-existstill returns 404