-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
feat(snippets): seperate nodejs snippet, add corepack installation #8128
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
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this 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.
Co-authored-by: Copilot <[email protected]> Signed-off-by: Aviv Keller <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGMT !
Fixes #7555
This PR does three things:
corepack.bash
snippet to install Corepack in Node.js >25currentPlatform
's destructuring into theuseMemo
call to avoid un-needed recalculations (+ moves that to a seperate function)