refactor(cli): extract pickCLIRelease and drop dead normalizeOS#4116
Merged
Conversation
`reasonix upgrade` deliberately tracks the newest 1.x, including rc: only 1.x carries this command and the 1.x line ships as rc on npm @next, so there is no stable user to hold back — the original #4005 already picked the newest v* release regardless of the prerelease flag, and that stays. Extract the selection into a pure pickCLIRelease (foreign desktop-v/npm-v tags skipped) and unit-test it without a network round-trip, including a case that locks in "a newer rc wins". Remove normalizeOS, a no-op returning runtime.GOOS unchanged behind a multi-line comment; real assets are reasonix-<goos>-<goarch>. No behavior change.
324228c to
8020f04
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.
Follow-up to #4005 — cleanup only, no behavior change.
reasonix upgradedeliberately tracks the newest 1.x release, including rc. Rationale (verified 2026-06-12):upgradecommand, so a 0.5x user never reaches this path — there's no legacy-stable user to protect.@next(@latestis frozen at the deprecated0.53.2); brew/GitHub relabel the same content as stablev1.6.0. So for the people who can runupgrade, "the latest 1.x" is the rc/@next line — they should always move to the newest 1.x, not be held on an older stable.#4005 already picked the newest
v*release regardless of the prerelease flag; this PR keeps that and just tidies up:pickCLIRelease(foreigndesktop-v/npm-vtags skipped) and unit-test it without a network call — including a case that locks in "a newer rc wins", so nobody re-adds a prerelease skip by mistake.normalizeOS, a no-op that returnedruntime.GOOSunchanged behind a multi-line comment (real assets arereasonix-<goos>-<goarch>).Note: the namespace filter is load-bearing — GitHub's
latest=truebadge is currently ondesktop-v1.6.0, so listing/releases+ skipping foreign namespaces is what reaches the CLI'sv1.6.0.