Skip to content

fix: skip prerelease versions when detecting latest stable tag - #2

Merged
moshest merged 1 commit into
mainfrom
claude/fix-nextjs-prerelease-version-9b1Ov
Feb 3, 2026
Merged

moshest merged 1 commit into
mainfrom
claude/fix-nextjs-prerelease-version-9b1Ov

Conversation

@moshest

@moshest moshest commented Feb 3, 2026

Copy link
Copy Markdown
Member

When auto-detecting version from git tags, the code now properly:

  • Fetches all tags from remote (needed for shallow clones)
  • Parses versions using semver pattern
  • Filters out prerelease versions (canary, alpha, beta, rc, etc.)
  • Finds the highest stable version by semantic versioning
  • Checks out to the detected tag so the code matches the version

Previously, adding a repository like Next.js would incorrectly pick a
canary version (e.g., v16.2.0-canary.23) instead of the latest stable
release (e.g., v16.1.6).

https://claude.ai/code/session_01FNPSjySmD2jA1tXv73zh3U

When auto-detecting version from git tags, the code now properly:
- Fetches all tags from remote (needed for shallow clones)
- Parses versions using semver pattern
- Filters out prerelease versions (canary, alpha, beta, rc, etc.)
- Finds the highest stable version by semantic versioning
- Checks out to the detected tag so the code matches the version

Previously, adding a repository like Next.js would incorrectly pick a
canary version (e.g., v16.2.0-canary.23) instead of the latest stable
release (e.g., v16.1.6).

https://claude.ai/code/session_01FNPSjySmD2jA1tXv73zh3U
@moshest
moshest merged commit 52c8d30 into main Feb 3, 2026
3 checks passed
@moshest
moshest deleted the claude/fix-nextjs-prerelease-version-9b1Ov branch February 3, 2026 02:22
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.

2 participants