File tree 1 file changed +5
-10
lines changed
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);
17
17
18
18
const githubRepo = `${ scope } /${ name } ` ;
19
19
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` ) ;
25
22
const { name : npmPackage } = JSON . parse ( Buffer . from ( githubPackage . content , "base64" ) . toString ( "utf-8" ) ) ;
26
23
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` ) ;
32
27
33
28
const downloads = npmDownloads ;
34
29
const downloadsByVersion = npmDownloadsByVersion . downloads ;
You can’t perform that action at this time.
0 commit comments