From b87890446e4378029045636bcb2b5dfba94249f6 Mon Sep 17 00:00:00 2001 From: Sander Bruens Date: Mon, 11 Dec 2023 16:35:26 -0500 Subject: [PATCH] fix(manager/electron): replace turned down OmahaProxy with ChromiumDash (#1462) * fix(server_manager): replace turned down omahaproxy.appspot.com * Update engine. * Fix type. * Yes we get it. A string is not an int. * Put the comment back. It's quite useful. --- package.json | 3 +-- src/server_manager/electron_and_karma_chromium.spec.ts | 10 ++++++---- src/server_manager/package.json | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 50e6cb261..46071f71b 100644 --- a/package.json +++ b/package.json @@ -24,8 +24,7 @@ "typescript": "^4" }, "engines": { - "node": "^18.16.0", - "npm": "^9.5.1" + "node": "18.x.x" }, "scripts": { "action": "bash ./scripts/run_action.sh", diff --git a/src/server_manager/electron_and_karma_chromium.spec.ts b/src/server_manager/electron_and_karma_chromium.spec.ts index adc05d2df..48823ecfe 100644 --- a/src/server_manager/electron_and_karma_chromium.spec.ts +++ b/src/server_manager/electron_and_karma_chromium.spec.ts @@ -22,16 +22,18 @@ import {config} from './package.json'; describe('Karma', () => { it('uses the correct Chromium version', async (done) => { - // Omaha Proxy is a service maintained by the Chrome team which serves metadata about current + // ChromiumDash is a service maintained by the Chrome team which serves metadata about current // and legacy Chrome versions. - const electronChromiumVersionInfo = <{chromium_base_position?: string}>( + const electronChromiumVersionInfo = <{chromium_main_branch_position?: number}>( await ( await fetch( - `http://omahaproxy.appspot.com/deps.json?version=${electronToChromium(electronVersion)}` + `https://chromiumdash.appspot.com/fetch_version?version=${electronToChromium( + electronVersion + )}` ) ).json() ); - const electronChromeRevision = electronChromiumVersionInfo.chromium_base_position; + const electronChromeRevision = electronChromiumVersionInfo.chromium_main_branch_position; expect(electronChromeRevision).toEqual(config.PUPPETEER_CHROMIUM_REVISION); done(); }); diff --git a/src/server_manager/package.json b/src/server_manager/package.json index 681246257..3f981b2ed 100644 --- a/src/server_manager/package.json +++ b/src/server_manager/package.json @@ -59,7 +59,7 @@ "PUPPETEER_CHROMIUM_REVISION": [ "The Chromium revision number used by Karma. This should always be the revision number of", "the bundled Chromium in our version of Electron. Whenever upgrading Electron, run the", - "server_manager tests. You'll get a failure that looks like .", + "server_manager tests. You'll get a failure that looks like .", "Set PUPPETEER_CHROMIUM_REVISION to the first of those numbers to get the correct revision", "and `npm ci` to re-install puppeteer, causing it to download the new", "Chromium version." @@ -67,7 +67,7 @@ } }, "config": { - "PUPPETEER_CHROMIUM_REVISION": "992738" + "PUPPETEER_CHROMIUM_REVISION": 992738 }, "devDependencies": { "@types/node": "^16.11.29",