-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
feat: sort release blog by semver order #8050
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements semantic version (semver) ordering for release blog posts to address issue #8043. The change ensures that release blog posts are sorted by semantic version rather than chronological order, providing a more logical ordering for users browsing release information.
Key Changes
- Added semver dependency import for version comparison
- Implemented version extraction logic from blog post titles using regex
- Modified blog post sorting to use semver ordering for release category posts
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8050 +/- ##
=======================================
Coverage 73.04% 73.04%
=======================================
Files 95 95
Lines 8324 8324
Branches 214 214
=======================================
Hits 6080 6080
Misses 2243 2243
Partials 1 1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have an opinion on what it's ordered by, but I do think it needs to be descending. The copy on the page says “latest release notes and news”, which doesn’t match showing v0.4.3 from 2011 as the first item?
Yeah it's in the wrong order. but weird thing is if I reverse, the next and prev button show incorrectly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM !!!
I think for the single changelog page, the order should be by semver. in /release page, it should be by date |
c3d8a89
to
59ca901
Compare
OK now it's good |
Co-authored-by: Aviv Keller <[email protected]> Signed-off-by: Alex Yang <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know any blog that does that. Can you reference more? I am really against adding very specific hacky logic that will run against every frigging blog post.
I'm fine with any other solution except the current one :) |
Description
See #8043
Related Issues
Fixes: #8043
Check List
pnpm format
to ensure the code follows the style guide.pnpm test
to check if all tests are passing.pnpm build
to check if the website builds without errors.