Skip to content

fix(downloads): respect display order when switching method - #9342

Open
MattIPv4 wants to merge 1 commit into
mainfrom
MattIPv4/download-install-method-order
Open

MattIPv4 wants to merge 1 commit into
mainfrom
MattIPv4/download-install-method-order

Conversation

@MattIPv4

Copy link
Copy Markdown
Member

Description

With #9313 landed, I noticed that if I had macOS/nvm selected, and then switched to Windows, I was automatically switched to nvm-windows rather than fnm which is also available for Windows and is displayed before nvm-windows in the dropdown. This updates the logic for how the method is switched to follow the displayed order.

Validation

Select macOS/nvm, then select Windows. Observe switched to fnm.

Related Issues

N/A

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.

@MattIPv4
MattIPv4 requested a review from a team as a code owner November 19, 2026 15:40
Copilot AI balanced review requested due to automatic review settings November 19, 2026 15:40
@vercel

vercel Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
nodejs-org Ready Ready Preview Nov 19, 2026 5:24pm UTC

Request Review

@codecov

codecov Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.13%. Comparing base (e49feb7) to head (2e2d967).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9342      +/-   ##
==========================================
+ Coverage   87.06%   87.13%   +0.07%     
==========================================
  Files          91       92       +1     
  Lines        6563     6656      +93     
  Branches      401      405       +4     
==========================================
+ Hits         5714     5800      +86     
- Misses        845      852       +7     
  Partials        4        4              

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

Copilot AI left a comment

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.

🟢 Approval recommended

No active review issues were identified for the installation-method fallback update.

No open issues 🎉

What changed in this PR

Updates the download page’s fallback installation-method selection to follow dropdown display order. This addresses the behavior introduced with nvm-windows: switching from macOS with nvm selected to Windows now selects fnm.

Changes:

  • Uses the displayed method groups to choose a replacement when the current method becomes unavailable.
  • Adds tests for OS and version changes, including preserving a compatible community method.
File Description
apps/​site/​components/​Downloads/​Release/​InstallationMethodDropdown.tsx Selects fallback methods in display order.
apps/​site/​components/​Downloads/​Release/​__tests__/​InstallationMethodDropdown.test.jsx Covers fallback selection and preservation of compatible methods.

Review effort: Balanced

@github-actions

Copy link
Copy Markdown
Contributor

📦 Build Size Comparison

Summary

Metric Value
Old Total First Load JS 7.22 MB
New Total First Load JS 7.22 MB
Delta 96.00 B (0.00%)

Changes

🔄 Modified Routes (4)
Route Old First Load JS New First Load JS Delta
/[locale] 1.69 MB 1.69 MB 📈 24.00 B (0.00%)
/[locale]/[...path] 1.69 MB 1.69 MB 📈 24.00 B (0.00%)
/[locale]/blog/[...path] 1.69 MB 1.69 MB 📈 24.00 B (0.00%)
/[locale]/download/archive/[version] 1.69 MB 1.69 MB 📈 24.00 B (0.00%)

@ovflowd ovflowd left a comment

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.

Interesting, that should already have been the case...

This branch was successfully deployed

1 active deployment
Preview — 2e2d967d Deployed Nov 19, 2026 by vercel[bot]
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.

4 participants