fix(ui): respect semver filter when showing latest tag#2389
fix(ui): respect semver filter when showing latest tag#2389ghostdevv merged 2 commits intonpmx-dev:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
bccd926 to
9fe7204
Compare
The 'latest' tag was unconditionally added to visible results even when it didn't match the active semver filter. This caused versions like 7.6.0 to appear when filtering by ranges like '^7.5 <7.6'. Remove the special case handling for the 'latest' tag and let it flow naturally through the filtering logic. This makes the behavior more predictable and fixes the bug where non-matching versions were displayed.
9fe7204 to
d1b2172
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe Versions component's visible-tag logic was changed so the "always show latest" special-case only runs when no semver filter is active. When a semver filter is active, visibleTagRows is now a straight slice of the first MAX_VISIBLE_TAGS entries from the filtered rows, allowing Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
The 'latest' tag was unconditionally added to visible results even when it didn't match the active semver filter. This caused versions like 7.6.0 to appear when filtering by ranges like '^7.5 <7.6'. Keep the original behaviour of always showing latest when no filter is active (important for incomplete version loads), but respect the filter when one is active.
779e33d to
4e6c0c7
Compare
The 'latest' tag was unconditionally added to visible results even when it didn't match the active semver filter.
This caused versions like 7.6.0 to appear when filtering by ranges like '^7.5 <7.6'.
Remove the special case handling for the 'latest' tag and let it flow naturally through the filtering logic.
This makes the behaviour predictable and fixes the bug where non-matching versions were displayed.
🔗 Linked issue
Fixes issue #2340
🧭 Context
We gave 'latest' releases special handling in the semver filter, which meant they always appeared in certain circumstances.
📚 Description
Fixes the linked bug. Also simplifies the code - not sure why we gave latest versions special treatment.