Repository navigation
fix: link to Alpha in LTS alert box when no Current - #9244
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9244 +/- ##
==========================================
- Coverage 86.14% 86.11% -0.04%
==========================================
Files 87 87
Lines 6149 6149
Branches 369 369
==========================================
- Hits 5297 5295 -2
- Misses 848 850 +2
Partials 4 4 ☔ View full report in Codecov by Harness. |
There was a problem hiding this comment.
🟡 Changes recommended
A Server Component consumes client-only release context, breaking archive-page rendering, while missing providers suppress LTS notices on previous-release and archive pages.
2 open issues
What changed in this PR
This PR updates the shared LTS release alert to link to Alpha downloads when no Current release exists, building on the Alpha release support introduced in #9223.
Changes:
- Reads release availability from
ReleasesContext. - Prefers
/download/current, falling back to/download/alpha. - Hides the LTS notice when neither release status is available.
| File | Description |
|---|---|
apps/site/components/withReleaseAlertBox.tsx |
Selects the LTS alert’s download link based on Current and Alpha availability. |
Review effort: Balanced
b1931f7 to
30d142e
Compare
ovflowd
left a comment
There was a problem hiding this comment.
I agree with you, but this approach is not ideal, as it transforms this component in client-side one; We shouldn't use ReleasesContext
What's the alternative? How else does this component get the data to know what the current releases are? Prop-drilling? |
30d142e to
00e05a3
Compare
Yes! Check the callers of this Component. I think it is called within MDX and surrounded on the Release Provider already. So you can simply pass what you need. |
|
Here: |
|
Also small nit, could you rename this component from |
👍 I figured as we have a context we should use the context, as that's what they're for, but will switch to prop-drilling instead. I assume I'll need to update the translations here as to not braek them?
Yeh, can do, no idea why all these things are called |
📦 Build Size ComparisonSummary
Changes🔄 Modified Routes (4)
|
Actually I think this should probably happen as a separate PR, and perhaps all of them at once, to keep this diff isolated. |
00e05a3 to
ff6226d
Compare
|
Note Your Pull Request seems to be updating Translations of the Node.js Website. Whilst we appreciate your intent; Any Translation update should be done through our Crowdin Project. Thank you! |
ff6226d to
585e30d
Compare
|
Folks happy for this to land fast-tracked as a bug fix? |
In this context is due to SSR/CSR context drilling. Using a Provider here would require this context to go to Client-Side. |


Description
The alert box shown when an LTS release is selected offers the user the option to use the latest release instead. However, that link to
/download/currentcurrently shows the LTS release, as there is no Current release. Instead, we should fall back to/download/alphaif there is no Current release, but there is an Alpha release.Validation
/downloadshows a CTA linking to/download/alphafor the latest version.Related Issues
cc #9223
Check List
pnpm formatto ensure the code follows the style guide.pnpm testto check if all tests are passing.pnpm buildto check if the website builds without errors.