11import classNames from 'classnames' ;
2+ import semVer from 'semver' ;
23
34import LocalizedLink from '../LocalizedLink' ;
45import { useNextraContext } from '../../hooks/useNextraContext' ;
@@ -16,6 +17,7 @@ const PrimaryDownloadMatrix = (props: PrimaryDownloadMatrixProps) => {
1617 const nextraContext = useNextraContext ( ) ;
1718
1819 const { downloads } = nextraContext . frontMatter as LegacyDownloadsFrontMatter ;
20+ const hasWindowsArm64 = semVer . satisfies ( props . node , '>= 19.9.0' ) ;
1921
2022 const getIsVersionClassName = ( isCurrent : boolean ) =>
2123 classNames ( { 'is-version' : isCurrent } ) ;
@@ -112,43 +114,61 @@ const PrimaryDownloadMatrix = (props: PrimaryDownloadMatrixProps) => {
112114 < tbody >
113115 < tr >
114116 < th > { downloads . WindowsInstaller } (.msi)</ th >
115- < td >
117+ < td colSpan = { hasWindowsArm64 ? 1 : 2 } >
116118 < a
117119 href = { `https://nodejs.org/dist/${ props . node } /node-${ props . node } -x86.msi` }
118120 >
119121 32-bit
120122 </ a >
121123 </ td >
122- < td >
124+ < td colSpan = { 2 } >
123125 < a
124126 href = { `https://nodejs.org/dist/${ props . node } /node-${ props . node } -x64.msi` }
125127 >
126128 64-bit
127129 </ a >
128130 </ td >
131+ { hasWindowsArm64 && (
132+ < td colSpan = { 1 } >
133+ < a
134+ href = { `https://nodejs.org/dist/${ props . node } /node-${ props . node } -arm64.msi` }
135+ >
136+ ARM64
137+ </ a >
138+ </ td >
139+ ) }
129140 </ tr >
130141
131142 < tr >
132143 < th > { downloads . WindowsBinary } (.zip)</ th >
133- < td >
144+ < td colSpan = { hasWindowsArm64 ? 1 : 2 } >
134145 < a
135146 href = { `https://nodejs.org/dist/${ props . node } /node-${ props . node } -win-x86.zip` }
136147 >
137148 32-bit
138149 </ a >
139150 </ td >
140- < td >
151+ < td colSpan = { 2 } >
141152 < a
142153 href = { `https://nodejs.org/dist/${ props . node } /node-${ props . node } -win-x64.zip` }
143154 >
144155 64-bit
145156 </ a >
146157 </ td >
158+ { hasWindowsArm64 && (
159+ < td colSpan = { 1 } >
160+ < a
161+ href = { `https://nodejs.org/dist/${ props . node } /node-${ props . node } -win-arm64.zip` }
162+ >
163+ ARM64
164+ </ a >
165+ </ td >
166+ ) }
147167 </ tr >
148168
149169 < tr >
150170 < th > { downloads . MacOSInstaller } (.pkg)</ th >
151- < td colSpan = { 2 } >
171+ < td colSpan = { 4 } >
152172 < a
153173 href = { `https://nodejs.org/dist/${ props . node } /node-${ props . node } .pkg` }
154174 >
@@ -158,14 +178,14 @@ const PrimaryDownloadMatrix = (props: PrimaryDownloadMatrixProps) => {
158178 </ tr >
159179 < tr >
160180 < th > { downloads . MacOSBinary } (.tar.gz)</ th >
161- < td >
181+ < td colSpan = { 2 } >
162182 < a
163183 href = { `https://nodejs.org/dist/${ props . node } /node-${ props . node } -darwin-x64.tar.gz` }
164184 >
165185 64-bit
166186 </ a >
167187 </ td >
168- < td >
188+ < td colSpan = { 2 } >
169189 < a
170190 href = { `https://nodejs.org/dist/${ props . node } /node-${ props . node } -darwin-arm64.tar.gz` }
171191 >
@@ -176,7 +196,7 @@ const PrimaryDownloadMatrix = (props: PrimaryDownloadMatrixProps) => {
176196
177197 < tr >
178198 < th > { downloads . LinuxBinaries } (x64)</ th >
179- < td colSpan = { 2 } >
199+ < td colSpan = { 4 } >
180200 < a
181201 href = { `https://nodejs.org/dist/${ props . node } /node-${ props . node } -linux-x64.tar.xz` }
182202 >
@@ -186,14 +206,14 @@ const PrimaryDownloadMatrix = (props: PrimaryDownloadMatrixProps) => {
186206 </ tr >
187207 < tr >
188208 < th > { downloads . LinuxBinaries } (ARM)</ th >
189- < td >
209+ < td colSpan = { 2 } >
190210 < a
191211 href = { `https://nodejs.org/dist/${ props . node } /node-${ props . node } -linux-armv7l.tar.xz` }
192212 >
193213 ARMv7
194214 </ a >
195215 </ td >
196- < td >
216+ < td colSpan = { 2 } >
197217 < a
198218 href = { `https://nodejs.org/dist/${ props . node } /node-${ props . node } -linux-arm64.tar.xz` }
199219 >
@@ -204,7 +224,7 @@ const PrimaryDownloadMatrix = (props: PrimaryDownloadMatrixProps) => {
204224
205225 < tr >
206226 < th > { downloads . SourceCode } </ th >
207- < td colSpan = { 2 } >
227+ < td colSpan = { 4 } >
208228 < a
209229 href = { `https://nodejs.org/dist/${ props . node } /node-${ props . node } .tar.gz` }
210230 >
0 commit comments