-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
fix: download button pointing to an incorrect binary on Windows arm64 #7240
Conversation
Closes nodejs#7239 This PR changes the way DownloadButton calculates `bitness` which gets passed to `getNodeDownloadUrl`. Previously, this value was passed directly from `useDetectOS()` without any further processing, leading to the issue mentioned above. After this change, `bitness` is calculated similarly to how it's done in `BitnessDropdown`, so: by passing `architecture` and `bitness` to `getUserBitnessByArchitecture`: https://github.com/nodejs/nodejs.org/blob/c5345f551ea545cf9d04017204b17f3099940ada/apps/site/components/Downloads/Release/BitnessDropdown.tsx#L16-L29 Signed-off-by: Wojciech Maj <[email protected]>
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Lighthouse Results
|
Is this reproducible locally? If not, I'll restart the CI to see if it was a flake? |
No there are no issue with prettier. The code format is just not right. @wojtekmaj could you do a |
Ah, sorry! I did that PR entirely on the go :D |
No worries! Once all the checks pass, since this has approvals, I've added it to the merge queue |
…#7240) * Fix Download button pointing to an incorrect binary on Windows arm64 Closes #7239 This PR changes the way DownloadButton calculates `bitness` which gets passed to `getNodeDownloadUrl`. Previously, this value was passed directly from `useDetectOS()` without any further processing, leading to the issue mentioned above. After this change, `bitness` is calculated similarly to how it's done in `BitnessDropdown`, so: by passing `architecture` and `bitness` to `getUserBitnessByArchitecture`: https://github.com/nodejs/nodejs.org/blob/c5345f551ea545cf9d04017204b17f3099940ada/apps/site/components/Downloads/Release/BitnessDropdown.tsx#L16-L29 Signed-off-by: Wojciech Maj <[email protected]> * Fix formatting --------- Signed-off-by: Wojciech Maj <[email protected]>
Description
This PR changes the way
DownloadButton
calculatesbitness
which gets passed togetNodeDownloadUrl
.Previously, this value was passed directly from
useDetectOS()
, leading to the issue mentioned in the original issue.After this change,
bitness
is calculated similarly to how it's done inBitnessDropdown
, so: by passingarchitecture
andbitness
togetUserBitnessByArchitecture
:nodejs.org/apps/site/components/Downloads/Release/BitnessDropdown.tsx
Lines 16 to 29 in c5345f5
Validation
See #7239 for reproduction steps.
I've validated the fix by navigating to Vercel preview (linked by a bot below) and verifying the binary link (see bottom left corner):
Related Issues
Closes #7239
Check List
npm run format
to ensure the code follows the style guide.npm run test
to check if all tests are passing.npx turbo build
to check if the website builds without errors.