ci: use CfT endpoint (#11232)

This commit is contained in:
Nikolay Vitkov 2023-10-23 13:59:10 +02:00 committed by GitHub
parent 3edce3aee9
commit 39e9d5e1ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,7 +36,7 @@
// eslint-disable-next-line import/extensions
import {execSync} from 'child_process';
import packageJson from '../package.json';
import packageJson from '../package.json' assert {type: 'json'};
import {PUPPETEER_REVISIONS} from '../src/revisions.js';
async function main() {
@ -56,12 +56,12 @@ async function main() {
const chromeVersion = PUPPETEER_REVISIONS.chrome;
// find the right revision for our Chrome version.
const req = await fetch(
`https://chromiumdash.appspot.com/fetch_releases?channel=stable`
`https://googlechromelabs.github.io/chrome-for-testing/known-good-versions.json`
);
const stableReleases = await req.json();
const chromeRevision = stableReleases.find(release => {
const releases = await req.json();
const chromeRevision = releases.versions.find(release => {
return release.version === chromeVersion;
}).chromium_main_branch_position;
}).revision;
console.log(`Revisions for ${chromeVersion}: ${chromeRevision}`);
const command = `npm view "devtools-protocol@<=0.0.${chromeRevision}" version | tail -1`;