Skip to content

Commit

Permalink
Add Apple silicon binaries to releases from 16.0.0
Browse files Browse the repository at this point in the history
Existing "macOS 64-bit Binary" is renamed to disambiguate the macOS
binaries for Intel and Apple silicon.
  • Loading branch information
richardlau authored and Trott committed Apr 18, 2021
1 parent 030f429 commit edb9d99
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion scripts/helpers/downloads.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ const allDownloads = [
templateUrl: 'https://nodejs.org/dist/v%version%/node-v%version%.pkg'
},
{
title: 'macOS 64-bit Binary',
title: 'macOS Apple Silicon 64-bit Binary',
templateUrl: 'https://nodejs.org/dist/v%version%/node-v%version%-darwin-arm64.tar.gz'
},
{
title: 'macOS Intel 64-bit Binary',
templateUrl: 'https://nodejs.org/dist/v%version%/node-v%version%-darwin-x64.tar.gz'
},
{
Expand Down Expand Up @@ -166,6 +170,12 @@ const resolveDownloads = (version) => {
)
}

if (semver.satisfies(version, '< 16.0.0')) {
downloads = downloads.filter(ver =>
ver.title !== 'macOS Apple Silicon 64-bit Binary'
)
}

return downloads
}

Expand Down

0 comments on commit edb9d99

Please sign in to comment.