Skip to content

fix(cli): order prerelease versions before their release in update check - #3607

Merged
fahreddinozcan merged 1 commit into
upstash:masterfrom
ShryukGrandhi:fix/bug-2176
Nov 2, 2026
Merged

fahreddinozcan merged 1 commit into
upstash:masterfrom
ShryukGrandhi:fix/bug-2176

Conversation

@ShryukGrandhi

Copy link
Copy Markdown
Contributor

Summary

compareVersions in the CLI update check removed the prerelease suffix and compared only the numeric parts, so 0.8.3-canary-<datetime> and 0.8.3 compared as equal. Canary builds use the calculated next version (useCalculatedVersion with {tag}-{datetime}), so canary users were never told when the matching stable version came out.

Fixes #3606

Changes

  • packages/cli/src/utils/update-check.ts: when the numeric parts are equal, a prerelease now sorts before its release.
  • Added a regression test to update-check.test.ts.
  • Added a patch changeset for ctx7.

Testing

  • The new test fails on master (compareVersions("0.8.3", "0.8.3-canary-...") returns 0) and passes with the fix.
  • pnpm --filter ctx7 test: all 379 tests pass.
  • eslint, prettier and tsc --noEmit pass on the changed files.

Signed-off-by: ShryukGrandhi <85529990+ShryukGrandhi@users.noreply.github.com>
@vercel

vercel Bot commented Oct 31, 2026

Copy link
Copy Markdown

@ShryukGrandhi is attempting to deploy a commit to the Upstash Team on Vercel.

A member of the Team first needs to authorize it.

@fahreddinozcan
fahreddinozcan merged commit 35bd973 into upstash:master Nov 2, 2026
1 check failed
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.

[Bug]: ctx7 update check treats a canary prerelease as equal to its stable release

2 participants