Skip to content

fix: check latest release LTS status for version support#8787

Merged
MattIPv4 merged 1 commit intomainfrom
MattIPv4/use-latest-release-date
Apr 1, 2026
Merged

fix: check latest release LTS status for version support#8787
MattIPv4 merged 1 commit intomainfrom
MattIPv4/use-latest-release-date

Conversation

@MattIPv4
Copy link
Copy Markdown
Member

@MattIPv4 MattIPv4 commented Apr 1, 2026

Description

Adds an additional condition that the most recent release for a major must be marked as an LTS release before we will show it as LTS on the site, beyond the date check. This ensures that we don't preemptively show a release as LTS when it does not yet have an LTS release, even if we are past the date in the support schedule where it should be LTS.

Validation

Current release shows.

Before:

@node-core/website:dev: 25 Maintenance LTS
@node-core/website:dev: 24 Active LTS
@node-core/website:dev: 23 End-of-life
@node-core/website:dev: 22 Maintenance LTS
@node-core/website:dev: 21 End-of-life
@node-core/website:dev: 20 Maintenance LTS
@node-core/website:dev: 19 End-of-life
@node-core/website:dev: 18 End-of-life
@node-core/website:dev: 17 End-of-life
@node-core/website:dev: 16 End-of-life
@node-core/website:dev: 15 End-of-life
@node-core/website:dev: 14 End-of-life
@node-core/website:dev: 13 End-of-life
@node-core/website:dev: 12 End-of-life
@node-core/website:dev: 11 End-of-life
@node-core/website:dev: 10 End-of-life
@node-core/website:dev: 9 End-of-life
@node-core/website:dev: 8 End-of-life
@node-core/website:dev: 7 End-of-life
@node-core/website:dev: 6 End-of-life
@node-core/website:dev: 5 End-of-life
@node-core/website:dev: 4 End-of-life
@node-core/website:dev: 0 End-of-life

After:

@node-core/website:dev: 25 Current
@node-core/website:dev: 24 Active LTS
@node-core/website:dev: 23 End-of-life
@node-core/website:dev: 22 Maintenance LTS
@node-core/website:dev: 21 End-of-life
@node-core/website:dev: 20 Maintenance LTS
@node-core/website:dev: 19 End-of-life
@node-core/website:dev: 18 End-of-life
@node-core/website:dev: 17 End-of-life
@node-core/website:dev: 16 End-of-life
@node-core/website:dev: 15 End-of-life
@node-core/website:dev: 14 End-of-life
@node-core/website:dev: 13 End-of-life
@node-core/website:dev: 12 End-of-life
@node-core/website:dev: 11 End-of-life
@node-core/website:dev: 10 End-of-life
@node-core/website:dev: 9 End-of-life
@node-core/website:dev: 8 End-of-life
@node-core/website:dev: 7 End-of-life
@node-core/website:dev: 6 End-of-life
@node-core/website:dev: 5 End-of-life
@node-core/website:dev: 4 End-of-life
@node-core/website:dev: 0 End-of-life

Related Issues

Fixes #8786

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.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nodejs-org Ready Ready Preview Apr 1, 2026 1:20am

Request Review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

👋 Codeowner Review Request

The following codeowners have been identified for the changed files:

Team reviewers: @nodejs/nodejs-website

Please review the changes when you have a chance. Thank you! 🙏

@avivkeller avivkeller added the fast-track Fast Tracking PRs label Apr 1, 2026
@MattIPv4 MattIPv4 marked this pull request as ready for review April 1, 2026 01:21
@MattIPv4 MattIPv4 requested a review from a team as a code owner April 1, 2026 01:21
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.26%. Comparing base (ece12b2) to head (602e728).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8787   +/-   ##
=======================================
  Coverage   75.26%   75.26%           
=======================================
  Files         105      105           
  Lines        9242     9247    +5     
  Branches      326      329    +3     
=======================================
+ Hits         6956     6960    +4     
- Misses       2284     2285    +1     
  Partials        2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copilot AI review requested due to automatic review settings April 1, 2026 01:21
Copy link
Copy Markdown
Contributor

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

Updates the release-status generation logic used by the site’s build-time release data so that a major line is only labeled as LTS (Active/Maintenance) when the most recent release for that major is actually marked as LTS, preventing premature “LTS” labeling (and helping fix /download/current badge/status issues).

Changes:

  • Gate Active LTS / Maintenance LTS statuses on latest.lts.isLts in addition to the schedule date checks.
  • Adjust getNodeReleaseStatus to accept the latest release object (instead of a now argument) and compute now internally.
Comments suppressed due to low confidence (1)

apps/site/next-data/generators/releaseData.mjs:27

  • The new LTS-gating behavior isn’t covered by tests. There is an existing unit test for generateReleaseData, but it doesn’t include lts on the mocked latest release (and will likely fail once the null-safety issue is fixed). Add/adjust test cases to cover: (1) schedule indicates LTS/maintenance but latest release is not marked LTS => status remains Current; (2) latest release marked LTS => status becomes Active LTS/Maintenance LTS as appropriate.
  if (latest.lts.isLts && ltsStart && now >= new Date(ltsStart)) {
    return 'Active LTS';
  }

  if (currentStart && now >= new Date(currentStart)) {
    return 'Current';

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

📦 Build Size Comparison

Summary

Metric Value
Old Total Size 3.52 MB
New Total Size 3.52 MB
Delta 31.00 B (0.00%)

Changes

➕ Added Assets (2)
Name Size
.next/static/chunks/c18b04dd67fd72f4.js 209.78 KB
.next/static/chunks/0b71b94e5bc381b8.js 136.35 KB
➖ Removed Assets (2)
Name Size
.next/static/chunks/f9504f51c1c76d89.js 209.78 KB
.next/static/chunks/078fcc75813948ff.js 136.32 KB

Merged via the queue into main with commit 6deaf66 Apr 1, 2026
25 of 28 checks passed
@MattIPv4 MattIPv4 deleted the MattIPv4/use-latest-release-date branch April 1, 2026 01:33
if (
latest.lts.isLts &&
maintenanceStart &&
now >= new Date(maintenanceStart)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should only use the date to determine if a release line is EOL. The maintenance status is going away, it's not supposed to be a user-facing information, and index.json tells you if a release line is LTS without needing to compare dates with the schedule.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@MattIPv4 can you please change this to remove the maintenance piece then? Or somehow be able to simplify it?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@aduh95 Can you file a separate issue to track that maintenance LTS is going away, and that this needs updating?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fast-track Fast Tracking PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

/download/current broken

5 participants