(version, section)
| 193 | Promise.all(downloadsTable(version).map(urlOrComingSoon)); |
| 194 | |
| 195 | const findAuthorLogin = (version, section) => { |
| 196 | // looking for the @author part of the release header, e.g.: |
| 197 | // ## 2016-03-08, Version 5.8.0 (Stable). @Fishrock123 |
| 198 | // ## 2015-10-13, Version 4.2.1 'Argon' (LTS), @jasnell |
| 199 | // ## 2015-09-08, Version 4.0.0 (Stable), @rvagg |
| 200 | const rxReleaseAuthor = /^## .*? \([^)]+\)[,.] @(\S+)/; |
| 201 | const matches = rxReleaseAuthor.exec(section); |
| 202 | |
| 203 | return new Promise((resolve, reject) => |
| 204 | matches && matches.length && matches[1] |
| 205 | ? resolve(matches[1]) |
| 206 | : reject(ERRORS.RELEASE_EXISTS(version)) |
| 207 | ); |
| 208 | }; |
| 209 | |
| 210 | const urlOrComingSoon = binary => { |
| 211 | return request({ url: binary.url, method: 'HEAD' }).then( |
no test coverage detected