Skip to content

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

himself65
Copy link
Member

Description

See #8043

Related Issues

Fixes: #8043

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run pnpm format to ensure the code follows the style guide.
  • I have run pnpm test to check if all tests are passing.
  • I have run pnpm build to check if the website builds without errors.
  • I've covered new added functionality with unit tests if necessary.

@Copilot Copilot AI review requested due to automatic review settings July 30, 2025 05:58
@himself65 himself65 requested a review from a team as a code owner July 30, 2025 05:58
Copy link

vercel bot commented Jul 30, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview Jul 30, 2025 6:44pm

Copy link
Contributor

@Copilot Copilot AI left a 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

Copy link

codecov bot commented Jul 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.04%. Comparing base (b33a5a4) to head (72fd3d5).
⚠️ Report is 3 commits behind head on main.
✅ All tests successful. No failed tests found.

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.
📢 Have feedback on the report? Share it here.

Copy link
Member

@mikeesto mikeesto left a 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?

@himself65
Copy link
Member Author

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

Copy link
Member

@AugustinMauroy AugustinMauroy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM !!!

@himself65
Copy link
Member Author

I think for the single changelog page, the order should be by semver. in /release page, it should be by date

@himself65 himself65 force-pushed the himself65/2025/07/29/order branch from c3d8a89 to 59ca901 Compare July 30, 2025 09:10
@himself65
Copy link
Member Author

OK now it's good

Co-authored-by: Aviv Keller <[email protected]>
Signed-off-by: Alex Yang <[email protected]>
Copy link
Member

@ovflowd ovflowd left a 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.

@himself65
Copy link
Member Author

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.

Yeah I cannot find a specific one but I saw python has the selection for all changelog. maybe we could have similar

image

@ovflowd
Copy link
Member

ovflowd commented Aug 2, 2025

I'm fine with any other solution except the current one :)

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.

Prev & Next button links to the mis-ordered changelog
5 participants