Skip to content

Commit 38fe893

Browse files
committed
no parallel fetch
1 parent 2a04299 commit 38fe893

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/@[scope]/[name].md.js

+5-10
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,13 @@ const lastYear = utcYear.offset(today, -1);
1717

1818
const 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`);
2522
const {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

3328
const downloads = npmDownloads;
3429
const downloadsByVersion = npmDownloadsByVersion.downloads;

0 commit comments

Comments
 (0)