feat: add asdf download method#8800
feat: add asdf download method#8800abhijeetnardele24-hash wants to merge 1 commit intonodejs:mainfrom
Conversation
Signed-off-by: abhijeet nardele <234410808+abhijeetnardele24-hash@users.noreply.github.com>
PR SummaryLow Risk Overview Updates download dropdown handling to allow install methods without icons (and adjusts Select dropdown spacing CSS accordingly), and extends compatibility tests with a regression check that Reviewed by Cursor Bugbot for commit 1aba0ec. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
👋 Codeowner Review RequestThe 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! 🙏 |
There was a problem hiding this comment.
Pull request overview
Adds asdf as a community/unofficial install method on the download page, including an English-only snippet and UI updates to support install methods without icons, plus a regression test for macOS compatibility.
Changes:
- Added
ASDFinstallation method to download install-method constants and release type union. - Added English
asdfsnippet and corresponding i18n platform info string. - Updated Select dropdown styling/logic to keep spacing aligned when an item has no icon; added a regression test for ASDF on macOS.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
apps/site/util/download/constants.json |
Adds the ASDF install method entry (no icon) with macOS/Linux compatibility and docs link. |
apps/site/util/download/index.tsx |
Makes icon rendering resilient to missing/unknown icon names. |
apps/site/snippets/en/download/asdf.bash |
Introduces the English asdf install snippet used by the code box. |
packages/i18n/src/locales/en.json |
Adds the asdf platform info string for the download code box footer. |
packages/ui-components/src/Common/Select/index.module.css |
Adjusts dropdown spacing rules for grouped dropdowns and items without icons. |
apps/site/util/__tests__/download.test.mjs |
Adds a regression test ensuring ASDF remains enabled on macOS. |
apps/site/types/release.ts |
Extends InstallationMethod union to include ASDF. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| describe('extended tests', () => { | ||
| it('should keep asdf available for macOS', () => { | ||
| const asdf = INSTALL_METHODS.find(({ value }) => value === 'ASDF'); | ||
|
|
There was a problem hiding this comment.
In this test, INSTALL_METHODS.find(...) can return undefined. Passing [asdf] into parseCompat will then throw when it tries to read item.compatibility, producing a less-informative TypeError. Consider asserting asdf is defined (or using assert.ok(asdf) / assert.notEqual(asdf, undefined)) before calling parseCompat so the failure mode is clearer if the constants change.
| assert.ok(asdf, 'Expected INSTALL_METHODS to contain ASDF'); |
| }); | ||
|
|
||
| describe('extended tests', () => { | ||
| it('should keep asdf available for macOS', () => { |
Summary
asdfas a community install method on the download pageasdfshell snippet used by the code boxFixes #8488.
Validation
node --experimental-test-coverage --test-coverage-exclude=**/*.test.* --experimental-test-module-mocks --enable-source-maps --import=global-jsdom/register --import=tsx --import=tests/setup.jsx --test util/__tests__/download.test.mjscorepack pnpm exec prettier --check apps/site/types/release.ts apps/site/util/download/constants.json apps/site/util/download/index.tsx apps/site/util/__tests__/download.test.mjs packages/i18n/src/locales/en.json packages/ui-components/src/Common/Select/index.module.cssNotes
asdf.bashsnippet. Localized pages will continue to fall back to English for that install method.pnpmbinary in this environment, so the commit was created with--no-verifyafter running the focused checks above manually.