File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -45,9 +45,8 @@ const JSON5 = require('json5');
45
45
'https://raw.githubusercontent.com/ampproject/amphtml/main/build-system/compile/bundles.config.extensions.json' ;
46
46
const latestVersionsUrl = `https://raw.githubusercontent.com/ampproject/amphtml/main/build-system/compile/bundles.legacy-latest-versions.jsonc` ;
47
47
48
- const configResponse = await fetch ( extensionConfigUrl ) ;
49
- const latestVersionsConfigResponse = await fetch ( latestVersionsUrl ) ;
50
-
48
+ const responses = await Promise . all ( [ fetch ( extensionConfigUrl ) , fetch ( latestVersionsUrl ) ] ) ;
49
+ const [ configResponse , latestVersionsConfigResponse ] = responses ;
51
50
if ( ! configResponse . ok ) {
52
51
throw new Error (
53
52
`Failed downloading ${ extensionConfigUrl } with status ${ configResponse . status } `
@@ -58,6 +57,7 @@ const JSON5 = require('json5');
58
57
`Failed fetching latest component versions from ${ latestVersionsUrl } with status: ${ latestVersionsConfigResponse . status } `
59
58
) ;
60
59
}
60
+
61
61
const extensionConfig = await configResponse . json ( ) ;
62
62
const latestVersionsConfig = JSON5 . parse ( await latestVersionsConfigResponse . text ( ) ) ;
63
63
// We add back the "latestVersion" field so that the auto importer
You can’t perform that action at this time.
0 commit comments