diff --git a/components/Downloads/PrimaryDownloadMatrix.tsx b/components/Downloads/PrimaryDownloadMatrix.tsx index 9fa8fde705efc..9298e0cc74834 100644 --- a/components/Downloads/PrimaryDownloadMatrix.tsx +++ b/components/Downloads/PrimaryDownloadMatrix.tsx @@ -1,4 +1,5 @@ import classNames from 'classnames'; +import semVer from 'semver'; import LocalizedLink from '../LocalizedLink'; import { useNextraContext } from '../../hooks/useNextraContext'; @@ -16,6 +17,7 @@ const PrimaryDownloadMatrix = (props: PrimaryDownloadMatrixProps) => { const nextraContext = useNextraContext(); const { downloads } = nextraContext.frontMatter as LegacyDownloadsFrontMatter; + const hasWindowsArm64 = semVer.satisfies(props.node, '>= 19.9.0'); const getIsVersionClassName = (isCurrent: boolean) => classNames({ 'is-version': isCurrent }); @@ -112,43 +114,61 @@ const PrimaryDownloadMatrix = (props: PrimaryDownloadMatrixProps) => { {downloads.WindowsInstaller} (.msi) - + 32-bit - + 64-bit + {hasWindowsArm64 && ( + + + ARM64 + + + )} {downloads.WindowsBinary} (.zip) - + 32-bit - + 64-bit + {hasWindowsArm64 && ( + + + ARM64 + + + )} {downloads.MacOSInstaller} (.pkg) - + @@ -158,14 +178,14 @@ const PrimaryDownloadMatrix = (props: PrimaryDownloadMatrixProps) => { {downloads.MacOSBinary} (.tar.gz) - + 64-bit - + @@ -176,7 +196,7 @@ const PrimaryDownloadMatrix = (props: PrimaryDownloadMatrixProps) => { {downloads.LinuxBinaries} (x64) - + @@ -186,14 +206,14 @@ const PrimaryDownloadMatrix = (props: PrimaryDownloadMatrixProps) => { {downloads.LinuxBinaries} (ARM) - + ARMv7 - + @@ -204,7 +224,7 @@ const PrimaryDownloadMatrix = (props: PrimaryDownloadMatrixProps) => { {downloads.SourceCode} - +