File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -17,18 +17,13 @@ const lastYear = utcYear.offset(today, -1);
1717
1818const githubRepo = `${ scope } /${ name } ` ;
1919
20- const [ githubInfo , githubPackage ] = await Promise . all ( [
21- fetchGithub ( `/repos/${ encodeURI ( githubRepo ) } ` ) ,
22- fetchGithub ( `/repos/${ encodeURI ( githubRepo ) } /contents/package.json` )
23- ] ) ;
24-
20+ const githubInfo = await fetchGithub ( `/repos/${ encodeURI ( githubRepo ) } ` ) ;
21+ const githubPackage = await fetchGithub ( `/repos/${ encodeURI ( githubRepo ) } /contents/package.json` ) ;
2522const { name : npmPackage } = JSON . parse ( Buffer . from ( githubPackage . content , "base64" ) . toString ( "utf-8" ) ) ;
2623
27- const [ npmInfo , npmDownloads , npmDownloadsByVersion ] = await Promise . all ( [
28- fetchNpm ( `https://registry.npmjs.org/${ encodeURIComponent ( npmPackage ) } ` ) ,
29- fetchNpmDownloads ( npmPackage ) ,
30- fetchNpm ( `/versions/${ encodeURIComponent ( npmPackage ) } /last-week` )
31- ] ) ;
24+ const npmInfo = await fetchNpm ( `https://registry.npmjs.org/${ encodeURIComponent ( npmPackage ) } ` ) ;
25+ const npmDownloads = await fetchNpmDownloads ( npmPackage ) ;
26+ const npmDownloadsByVersion = await fetchNpm ( `/versions/${ encodeURIComponent ( npmPackage ) } /last-week` ) ;
3227
3328const downloads = npmDownloads ;
3429const downloadsByVersion = npmDownloadsByVersion . downloads ;
You can’t perform that action at this time.
0 commit comments