Skip to content

Commit

Permalink
Add filters for Nodejs 10 (#1772)
Browse files Browse the repository at this point in the history
1) Ref: #1769
2) Optimize the logic process for module.exports of download.js.i
  • Loading branch information
Maledong authored and Milos Jevtovic committed Aug 19, 2018
1 parent 84f668c commit f0818db
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions scripts/helpers/downloads.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,14 @@ function resolveUrl (item, version) {

module.exports = (version) => {
let downloads = latestDownloads
if (semver.satisfies(version, '< 8.0.0')) {
downloads = postMergeDownloads
}
if (semver.satisfies(version, '< 1.0.0')) {
downloads = legacyDownloads
} else if (semver.satisfies(version, '< 8.0.0')) {
downloads = postMergeDownloads
} else if (semver.satisfies(version, '>= 10.0.0')) {
downloads = postMergeDownloads.filter(ver =>
ver.title !== 'Linux 32-bit Binary' &&
ver.title !== 'SunOS 32-bit Binary')
}
return downloads.map((item) => resolveUrl(item, version))
}

0 comments on commit f0818db

Please sign in to comment.