From fef5c38b3e01881f7d5047624fc475b05f5b52f6 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Wed, 27 Oct 2021 23:48:17 +0200 Subject: [PATCH] chore: remove Win/32bit from registry (#9790) --- packages/playwright-core/src/utils/registry.ts | 12 +----------- packages/playwright-core/src/utils/utils.ts | 2 +- utils/check_chromium_cdn.js | 3 +-- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/packages/playwright-core/src/utils/registry.ts b/packages/playwright-core/src/utils/registry.ts index 36ba8a76ce..59b4d149d6 100644 --- a/packages/playwright-core/src/utils/registry.ts +++ b/packages/playwright-core/src/utils/registry.ts @@ -37,7 +37,6 @@ const EXECUTABLE_PATHS = { 'mac10.15': ['chrome-mac', 'Chromium.app', 'Contents', 'MacOS', 'Chromium'], 'mac11': ['chrome-mac', 'Chromium.app', 'Contents', 'MacOS', 'Chromium'], 'mac11-arm64': ['chrome-mac', 'Chromium.app', 'Contents', 'MacOS', 'Chromium'], - 'win32': ['chrome-win', 'chrome.exe'], 'win64': ['chrome-win', 'chrome.exe'], }, 'firefox': { @@ -48,7 +47,6 @@ const EXECUTABLE_PATHS = { 'mac10.15': ['firefox', 'Nightly.app', 'Contents', 'MacOS', 'firefox'], 'mac11': ['firefox', 'Nightly.app', 'Contents', 'MacOS', 'firefox'], 'mac11-arm64': ['firefox', 'Nightly.app', 'Contents', 'MacOS', 'firefox'], - 'win32': ['firefox', 'firefox.exe'], 'win64': ['firefox', 'firefox.exe'], }, 'webkit': { @@ -59,7 +57,6 @@ const EXECUTABLE_PATHS = { 'mac10.15': ['pw_run.sh'], 'mac11': ['pw_run.sh'], 'mac11-arm64': ['pw_run.sh'], - 'win32': ['Playwright.exe'], 'win64': ['Playwright.exe'], }, 'ffmpeg': { @@ -70,7 +67,6 @@ const EXECUTABLE_PATHS = { 'mac10.15': ['ffmpeg-mac'], 'mac11': ['ffmpeg-mac'], 'mac11-arm64': ['ffmpeg-mac'], - 'win32': ['ffmpeg-win32.exe'], 'win64': ['ffmpeg-win64.exe'], }, }; @@ -84,7 +80,6 @@ const DOWNLOAD_URLS = { 'mac10.15': '%s/builds/chromium/%s/chromium-mac.zip', 'mac11': '%s/builds/chromium/%s/chromium-mac.zip', 'mac11-arm64': '%s/builds/chromium/%s/chromium-mac-arm64.zip', - 'win32': '%s/builds/chromium/%s/chromium-win32.zip', 'win64': '%s/builds/chromium/%s/chromium-win64.zip', }, 'chromium-with-symbols': { @@ -95,7 +90,6 @@ const DOWNLOAD_URLS = { 'mac10.15': '%s/builds/chromium/%s/chromium-with-symbols-mac.zip', 'mac11': '%s/builds/chromium/%s/chromium-with-symbols-mac.zip', 'mac11-arm64': '%s/builds/chromium/%s/chromium-with-symbols-mac-arm64.zip', - 'win32': '%s/builds/chromium/%s/chromium-with-symbols-win32.zip', 'win64': '%s/builds/chromium/%s/chromium-with-symbols-win64.zip', }, 'firefox': { @@ -106,7 +100,6 @@ const DOWNLOAD_URLS = { 'mac10.15': '%s/builds/firefox/%s/firefox-mac-11.zip', 'mac11': '%s/builds/firefox/%s/firefox-mac-11.zip', 'mac11-arm64': '%s/builds/firefox/%s/firefox-mac-11-arm64.zip', - 'win32': '%s/builds/firefox/%s/firefox-win32.zip', 'win64': '%s/builds/firefox/%s/firefox-win64.zip', }, 'firefox-beta': { @@ -117,7 +110,6 @@ const DOWNLOAD_URLS = { 'mac10.15': '%s/builds/firefox-beta/%s/firefox-beta-mac-11.zip', 'mac11': '%s/builds/firefox-beta/%s/firefox-beta-mac-11.zip', 'mac11-arm64': '%s/builds/firefox-beta/%s/firefox-beta-mac-11-arm64.zip', - 'win32': '%s/builds/firefox-beta/%s/firefox-beta-win32.zip', 'win64': '%s/builds/firefox-beta/%s/firefox-beta-win64.zip', }, 'webkit': { @@ -128,7 +120,6 @@ const DOWNLOAD_URLS = { 'mac10.15': '%s/builds/webkit/%s/webkit-mac-10.15.zip', 'mac11': '%s/builds/webkit/%s/webkit-mac-10.15.zip', 'mac11-arm64': '%s/builds/webkit/%s/webkit-mac-11-arm64.zip', - 'win32': '%s/builds/webkit/%s/webkit-win64.zip', 'win64': '%s/builds/webkit/%s/webkit-win64.zip', }, 'ffmpeg': { @@ -139,7 +130,6 @@ const DOWNLOAD_URLS = { 'mac10.15': '%s/builds/ffmpeg/%s/ffmpeg-mac.zip', 'mac11': '%s/builds/ffmpeg/%s/ffmpeg-mac.zip', 'mac11-arm64': '%s/builds/ffmpeg/%s/ffmpeg-mac.zip', - 'win32': '%s/builds/ffmpeg/%s/ffmpeg-win32.zip', 'win64': '%s/builds/ffmpeg/%s/ffmpeg-win64.zip', }, }; @@ -616,7 +606,7 @@ export class Registry { const product = products.find((product: any) => product.Product === productName); const searchConfig = ({ darwin: { platform: 'MacOS', arch: 'universal', artifact: 'pkg' }, - win32: { platform: 'Windows', arch: os.arch() === 'x64' ? 'x64' : 'x86', artifact: 'msi' }, + win32: { platform: 'Windows', arch: 'x64', artifact: 'msi' }, } as any)[process.platform]; const release = searchConfig ? product.Releases.find((release: any) => release.Platform === searchConfig.platform && release.Architecture === searchConfig.arch) : null; const artifact = release ? release.Artifacts.find((artifact: any) => artifact.ArtifactName === searchConfig.artifact) : null; diff --git a/packages/playwright-core/src/utils/utils.ts b/packages/playwright-core/src/utils/utils.ts index dc684b8bc9..aae10d264e 100644 --- a/packages/playwright-core/src/utils/utils.ts +++ b/packages/playwright-core/src/utils/utils.ts @@ -462,7 +462,7 @@ export function constructURLBasedOnBaseURL(baseURL: string | undefined, givenURL } } -export type HostPlatform = 'win32'|'win64'|'mac10.13'|'mac10.14'|'mac10.15'|'mac11'|'mac11-arm64'|'ubuntu18.04'|'ubuntu20.04'; +export type HostPlatform = 'win64'|'mac10.13'|'mac10.14'|'mac10.15'|'mac11'|'mac11-arm64'|'ubuntu18.04'|'ubuntu20.04'; export const hostPlatform = ((): HostPlatform => { const platform = os.platform(); if (platform === 'darwin') { diff --git a/utils/check_chromium_cdn.js b/utils/check_chromium_cdn.js index d73b513c26..90287e3f47 100755 --- a/utils/check_chromium_cdn.js +++ b/utils/check_chromium_cdn.js @@ -19,7 +19,7 @@ const assert = require('assert'); const https = require('https'); const util = require('util'); const URL = require('url'); -const SUPPORTER_PLATFORMS = ['linux', 'mac', 'win32', 'win64']; +const SUPPORTER_PLATFORMS = ['linux', 'mac', 'win64']; const colors = { reset: '\x1b[0m', @@ -97,7 +97,6 @@ async function canDownload(revision, platform) { const urlTemplate = new Map([ ['linux', '%s/chromium-browser-snapshots/Linux_x64/%d/chrome-linux.zip'], ['mac', '%s/chromium-browser-snapshots/Mac/%d/chrome-mac.zip'], - ['win32', '%s/chromium-browser-snapshots/Win/%d/chrome-win.zip'], ['win64', '%s/chromium-browser-snapshots/Win_x64/%d/chrome-win.zip'], ]).get(platform); assert(urlTemplate, `ERROR: Playwright does not support ${platform}`);