Repository navigation
refactor(feature): simplify latest version selection - #1441
Conversation
✅ Deploy Preview for images-devsy-sh canceled.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review. 📝 WalkthroughWalkthrough
ChangesLatest version selection
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Refactor Merge Risk: ⚪ Minimal · up to No merge-blocking risk is identified in the version-selection change; it is ready for normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)✅ Passed checks (4 passed)
✨ Finishing Touches✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ Deploy Preview for devsydev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@coderabbitai full review |
|
@greptileai review |
✅ Action performedFull review finished. |
|
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
findLatestVersionrepeated current-version validation and combined a separatehasBestflag with two version comparisons. Validate current once and use it as the initial best version, leaving one strict comparison for each candidate and returning the original selected tag.Add focused regression cases for empty and zero versions, unsorted candidates, first-input ties after normalization, build metadata, and prerelease ordering. Invalid/latest skipping and parsing remain unchanged.
Validation: affected package race tests and vet; CI-parity lint; applicable hooks; independent review; authenticated local CodeRabbit review. A temporary bounded comparison of the exact old and new helpers passed 346,200 inputs. CodeScene confirms the complex conditional is removed, with file code health increasing from 9.38 to 9.68; the unrelated
loadConfigfinding remains outside scope.Closes #1437.
Summary by CodeRabbit