Skip to content

Conversation

avivkeller
Copy link
Member

Fixes #7555

This PR does three things:

  1. It adds a new corepack.bash snippet to install Corepack in Node.js >25
  2. It moves the "Verify Node.js" step to it's own snippet to avoid duplication.
  3. It moves currentPlatform's destructuring into the useMemo call to avoid un-needed recalculations (+ moves that to a seperate function)

@Copilot Copilot AI review requested due to automatic review settings September 1, 2025 13:53
@avivkeller avivkeller requested a review from a team as a code owner September 1, 2025 13:53
Copy link

vercel bot commented Sep 1, 2025

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

Project Deployment Preview Updated (UTC)
nodejs-org Ready Ready Preview Sep 1, 2025 1:55pm

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 refactors Node.js installation snippets and improves the snippet processing component by extracting common verification steps and adding Corepack installation support for Node.js v25+.

  • Extracts the "Verify Node.js version" step into a separate reusable snippet to avoid duplication
  • Adds a new Corepack installation snippet for Node.js versions 25 and above where Corepack is no longer bundled
  • Refactors the ReleaseCodeBox component to improve performance and maintainability by separating concerns into focused hooks

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

File Description
apps/site/snippets/en/download/*.bash Removes duplicate Node.js verification steps from all installation method snippets
apps/site/snippets/en/download/node.bash New snippet containing the extracted Node.js version verification command
apps/site/snippets/en/download/corepack.bash New snippet for installing Corepack globally via npm
apps/site/components/Downloads/Release/ReleaseCodeBox.tsx Major refactor splitting logic into custom hooks and improving snippet combination logic

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

codecov bot commented Sep 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.60%. Comparing base (9f16142) to head (e7497e5).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8128      +/-   ##
==========================================
+ Coverage   76.56%   76.60%   +0.04%     
==========================================
  Files         115      115              
  Lines        9595     9595              
  Branches      322      321       -1     
==========================================
+ Hits         7346     7350       +4     
+ Misses       2248     2244       -4     
  Partials        1        1              

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

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.

LGMT !

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.

Corepack won't be distributed with Node.js 25+ official distributions
2 participants