From 4c4260df9622eff1b597d1653b7a388b6b0f8341 Mon Sep 17 00:00:00 2001 From: ueokande Date: Sun, 6 Jul 2025 12:17:29 +0000 Subject: [PATCH 1/2] Release v2.0.0 at 3289928922e4e14c8d0131d7da41090f078025bb --- README.md | 8 +- action.yml | 2 +- index.js | 243 ++++++++++++----------------------------------------- 3 files changed, 62 insertions(+), 191 deletions(-) diff --git a/README.md b/README.md index eefbdc8..b4c039f 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ This action sets-up Google Chrome/Chromium for GitHub Actions. This action suppo ## Usage Here is a basic usage. -The action installs the latest build by default. +The action installs the stable version of Chrome for Testing by default. ```yaml steps: @@ -58,9 +58,9 @@ steps: The action supports the following version formats: -- The latest snapshot `latest` (default). +- The latest snapshot `latest`. - Commit positions like `1295939`. You can find commit positions from [here][snapshots]. -- Google Chrome release channels: `stable`, `beta`, `dev` and `canary` +- Google Chrome release channels: `stable` (default), `beta`, `dev` and `canary` - Specific versions: `119`, `120.0.6099`, `121.0.6100.0`. The version are resolved by [Chrome for Testing][]. [Chrome for Testing]: https://googlechromelabs.github.io/chrome-for-testing/ @@ -90,6 +90,8 @@ steps: Default: `false` - `install-chromedriver`: *(Optional)* Install the compatible ChromeDriver with the browser. Default: `false` +- `no-sudo`: *(Optional)* Do not use sudo to install Google Chrome/Chromium (Linux only). + Default: `false` ### Outputs diff --git a/action.yml b/action.yml index f8d944a..81cdf70 100644 --- a/action.yml +++ b/action.yml @@ -5,7 +5,7 @@ inputs: chrome-version: description: |- The Google Chrome/Chromium version to install and use. - default: latest + default: stable required: false install-dependencies: description: |- diff --git a/index.js b/index.js index df61b46..fdcc8d0 100644 --- a/index.js +++ b/index.js @@ -28964,11 +28964,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.LinuxChannelInstaller = void 0; -const node_fs_1 = __importDefault(__nccwpck_require__(7561)); -const node_os_1 = __importDefault(__nccwpck_require__(612)); const node_path_1 = __importDefault(__nccwpck_require__(9411)); const core = __importStar(__nccwpck_require__(9093)); -const exec = __importStar(__nccwpck_require__(7775)); const tc = __importStar(__nccwpck_require__(5561)); const cache = __importStar(__nccwpck_require__(2540)); const chrome_for_testing_1 = __nccwpck_require__(3334); @@ -28983,7 +28980,10 @@ class LinuxChannelInstaller { } checkInstalledBrowser(version) { return __awaiter(this, void 0, void 0, function* () { - const root = yield cache.find("chromium", version); + if (!(0, version_1.isReleaseChannelName)(version)) { + throw new Error(`Unexpected version: ${version}`); + } + const root = yield cache.find("chrome", version); if (root) { return { root, bin: "chrome" }; } @@ -28994,21 +28994,12 @@ class LinuxChannelInstaller { if (!(0, version_1.isReleaseChannelName)(version)) { throw new Error(`Unexpected version: ${version}`); } - if (version === "canary") { - throw new Error(`Chrome ${version} not supported for platform ${this.platform.os} ${this.platform.arch}`); + const resolved = yield this.versionResolver.resolve(version); + if (!resolved) { + throw new Error(`Version ${version} not found in chrome for testing versions for ${this.platform.os} ${this.platform.arch}`); } - const url = (() => { - switch (version) { - case "stable": - return "https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb"; - case "beta": - return "https://dl.google.com/linux/direct/google-chrome-beta_current_amd64.deb"; - case "dev": - return "https://dl.google.com/linux/direct/google-chrome-unstable_current_amd64.deb"; - } - })(); - core.info(`Acquiring chrome ${version} from ${url}`); - const archive = yield tc.downloadTool(url); + core.info(`Acquiring chrome ${version} from ${resolved.browserDownloadURL}`); + const archive = yield tc.downloadTool(resolved.browserDownloadURL); return { archive }; }); } @@ -29017,25 +29008,10 @@ class LinuxChannelInstaller { if (!(0, version_1.isReleaseChannelName)(version)) { throw new Error(`Unexpected version: ${version}`); } - if (version === "canary") { - throw new Error(`Chrome ${version} not supported for Linux`); - } - const tmpdir = yield node_fs_1.default.promises.mkdtemp(node_path_1.default.join(node_os_1.default.tmpdir(), "deb-")); - const extdir = yield node_fs_1.default.promises.mkdtemp(node_path_1.default.join(node_os_1.default.tmpdir(), "chrome-")); - yield exec.exec("ar", ["x", archive], { cwd: tmpdir }); - yield exec.exec("tar", [ - "-xf", - node_path_1.default.join(tmpdir, "data.tar.xz"), - "--directory", - extdir, - "--strip-components", - "4", - "./opt/google", - ]); - // remove broken symlink - yield node_fs_1.default.promises.unlink(node_path_1.default.join(extdir, "google-chrome")); - const root = yield cache.cacheDir(extdir, "chromium", version); - core.info(`Successfully Installed chromium to ${root}`); + const extPath = yield tc.extractZip(archive); + const extAppRoot = node_path_1.default.join(extPath, `chrome-${this.versionResolver.platformString}`); + const root = yield cache.cacheDir(extAppRoot, "chrome", version); + core.info(`Successfully Installed chrome to ${root}`); return { root, bin: "chrome" }; }); } @@ -29051,7 +29027,7 @@ class LinuxChannelInstaller { return __awaiter(this, void 0, void 0, function* () { const resolved = yield this.versionResolver.resolve(version); if (!resolved) { - throw new Error(`Version ${version} not found in the known good versions`); + throw new Error(`Version ${version} not found in chrome for testing versions for ${this.platform.os} ${this.platform.arch}`); } core.info(`Acquiring chromedriver ${resolved.version} from ${resolved.driverDownloadURL}`); const archive = yield tc.downloadTool(resolved.driverDownloadURL); @@ -29115,10 +29091,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.MacOSChannelInstaller = void 0; -const node_fs_1 = __importDefault(__nccwpck_require__(7561)); const node_path_1 = __importDefault(__nccwpck_require__(9411)); const core = __importStar(__nccwpck_require__(9093)); -const exec = __importStar(__nccwpck_require__(7775)); const tc = __importStar(__nccwpck_require__(5561)); const cache = __importStar(__nccwpck_require__(2540)); const chrome_for_testing_1 = __nccwpck_require__(3334); @@ -29129,15 +29103,16 @@ class MacOSChannelInstaller { throw new Error(`Unexpected OS: ${platform.os}`); } this.versionResolver = new chrome_for_testing_1.LastKnownGoodVersionResolver(platform); + this.platform = platform; } checkInstalledBrowser(version) { return __awaiter(this, void 0, void 0, function* () { if (!(0, version_1.isReleaseChannelName)(version)) { throw new Error(`Unexpected version: ${version}`); } - const root = yield cache.find("chromium", version); + const root = yield cache.find("chrome", version); if (root) { - return { root, bin: "Contents/MacOS/chrome" }; + return { root, bin: "Contents/MacOS/Google Chrome for Testing" }; } }); } @@ -29146,16 +29121,12 @@ class MacOSChannelInstaller { if (!(0, version_1.isReleaseChannelName)(version)) { throw new Error(`Unexpected version: ${version}`); } - const url = (() => { - switch (version) { - case "stable": - return "https://dl.google.com/chrome/mac/universal/stable/GGRO/googlechrome.dmg"; - default: - return `https://dl.google.com/chrome/mac/universal/${version}/googlechrome${version}.dmg`; - } - })(); - core.info(`Acquiring chrome ${version} from ${url}`); - const archive = yield tc.downloadTool(url); + const resolved = yield this.versionResolver.resolve(version); + if (!resolved) { + throw new Error(`Version ${version} not found in chrome for testing versions for ${this.platform.os} ${this.platform.arch}`); + } + core.info(`Acquiring chrome ${version} from ${resolved.browserDownloadURL}`); + const archive = yield tc.downloadTool(resolved.browserDownloadURL); return { archive }; }); } @@ -29164,45 +29135,11 @@ class MacOSChannelInstaller { if (!(0, version_1.isReleaseChannelName)(version)) { throw new Error(`Unexpected version: ${version}`); } - const mountpoint = node_path_1.default.join("/Volumes", node_path_1.default.basename(archive)); - yield exec.exec("hdiutil", [ - "attach", - "-quiet", - "-noautofsck", - "-noautoopen", - "-mountpoint", - mountpoint, - archive, - ]); - let root = (() => { - switch (version) { - case "stable": - return node_path_1.default.join(mountpoint, "Google Chrome.app"); - case "beta": - return node_path_1.default.join(mountpoint, "Google Chrome Beta.app"); - case "dev": - return node_path_1.default.join(mountpoint, "Google Chrome Dev.app"); - case "canary": - return node_path_1.default.join(mountpoint, "Google Chrome Canary.app"); - } - })(); - const bin = (() => { - switch (version) { - case "stable": - return "Contents/MacOS/Google Chrome"; - case "beta": - return "Contents/MacOS/Google Chrome Beta"; - case "dev": - return "Contents/MacOS/Google Chrome Dev"; - case "canary": - return "Contents/MacOS/Google Chrome Canary"; - } - })(); - const bin2 = node_path_1.default.join(node_path_1.default.dirname(bin), "chrome"); - root = yield cache.cacheDir(root, "chromium", version); - yield node_fs_1.default.promises.symlink(node_path_1.default.basename(bin), node_path_1.default.join(root, bin2)); - core.info(`Successfully Installed chromium to ${root}`); - return { root, bin: bin2 }; + const extPath = yield tc.extractZip(archive); + const extAppRoot = node_path_1.default.join(extPath, `chrome-${this.versionResolver.platformString}`, "Google Chrome for Testing.app"); + const root = yield cache.cacheDir(extAppRoot, "chrome", version); + core.info(`Successfully Installed chrome to ${root}`); + return { root, bin: "Contents/MacOS/Google Chrome for Testing" }; }); } checkInstalledDriver(version) { @@ -29217,7 +29154,7 @@ class MacOSChannelInstaller { return __awaiter(this, void 0, void 0, function* () { const resolved = yield this.versionResolver.resolve(version); if (!resolved) { - throw new Error(`Version ${version} not found in the known good versions`); + throw new Error(`Version ${version} not found in chrome for testing versions for ${this.platform.os} ${this.platform.arch}`); } core.info(`Acquiring chromedriver ${resolved.version} from ${resolved.driverDownloadURL}`); const archive = yield tc.downloadTool(resolved.driverDownloadURL); @@ -29278,18 +29215,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.WindowsChannelInstaller = void 0; -const fs = __importStar(__nccwpck_require__(7561)); const path = __importStar(__nccwpck_require__(9411)); const core = __importStar(__nccwpck_require__(9093)); -const exec = __importStar(__nccwpck_require__(7775)); const tc = __importStar(__nccwpck_require__(5561)); const cache = __importStar(__nccwpck_require__(2540)); const chrome_for_testing_1 = __nccwpck_require__(3334); -const platform_1 = __nccwpck_require__(1493); const version_1 = __nccwpck_require__(9750); -const isENOENT = (e) => { - return (typeof e === "object" && e !== null && "code" in e && e.code === "ENOENT"); -}; class WindowsChannelInstaller { constructor(platform) { if (platform.os !== "windows") { @@ -29303,17 +29234,10 @@ class WindowsChannelInstaller { if (!(0, version_1.isReleaseChannelName)(version)) { throw new Error(`Unexpected version: ${version}`); } - const root = this.browserRootDir(version); - try { - yield fs.promises.stat(root); - } - catch (e) { - if (isENOENT(e)) { - return undefined; - } - throw e; + const root = yield cache.find("chrome", version); + if (root) { + return { root, bin: "chrome.exe" }; } - return { root, bin: "chrome.exe" }; }); } downloadBrowser(version) { @@ -29321,59 +29245,13 @@ class WindowsChannelInstaller { if (!(0, version_1.isReleaseChannelName)(version)) { throw new Error(`Unexpected version: ${version}`); } - if (version === "canary" || this.platform.arch === platform_1.Arch.ARM64) { - throw new Error(`Chrome ${version} not supported for platform "${this.platform.os}" "${this.platform.arch}"`); + const resolved = yield this.versionResolver.resolve(version); + if (!resolved) { + throw new Error(`Version ${version} not found in chrome for testing versions for ${this.platform.os} ${this.platform.arch}`); } - const appguid = { - stable: "{8A69D345-D564-463C-AFF1-A69D9E530F96}", - beta: "{8237E44A-0054-442C-B6B6-EA0509993955}", - dev: "{401C381F-E0DE-4B85-8BD8-3F3F14FBDA57}", - }; - const iid = "{980B7082-EC04-6DFB-63B8-08C1EC45EB8E}"; - const lang = "en"; - const browser = "3"; - const usagestats = "0"; - const appname = { - stable: "Google Chrome", - beta: "Google Chrome Beta", - dev: "Google Chrome Dev", - }; - const needsadmin = "prefers"; - const ap = { - [platform_1.Arch.AMD64]: "-arch_x64-statsdef_1", - [platform_1.Arch.I686]: "-arch_x86-statsdef_1", - }; - const installdataindex = "empty"; - const path = { - [platform_1.Arch.AMD64]: { - stable: "chrome/install/ChromeStandaloneSetup64.exe", - beta: "chrome/install/beta/ChromeBetaStandaloneSetup64.exe", - dev: "chrome/install/dev/ChromeDevStandaloneSetup64.exe", - }, - [platform_1.Arch.I686]: { - stable: "chrome/install/ChromeStandaloneSetup.exe", - beta: "chrome/install/beta/ChromeBetaStandaloneSetup.exe", - dev: "chrome/install/dev/ChromeDevStandaloneSetup.exe", - }, - }; - const params = [ - ["appguid", appguid[version]], - ["iid", iid], - ["lang", lang], - ["browser", browser], - ["usagestats", usagestats], - ["appname", encodeURIComponent(appname[version])], - ["needsadmin", needsadmin], - ["ap", ap[this.platform.arch]], - ["installdataindex", installdataindex], - ] - .map(([key, value]) => `${key}=${value}`) - .join("&"); - const url = `https://dl.google.com/tag/s/${encodeURIComponent(params)}/${path[this.platform.arch][version]}`; - core.info(`Acquiring chrome ${version} from ${url}`); - const archivePath = yield tc.downloadTool(url); - yield fs.promises.rename(archivePath, `${archivePath}.exe`); - return { archive: `${archivePath}.exe` }; + core.info(`Acquiring chrome ${version} from ${resolved.browserDownloadURL}`); + const archive = yield tc.downloadTool(resolved.browserDownloadURL); + return { archive }; }); } installBrowser(version, archive) { @@ -29381,22 +29259,13 @@ class WindowsChannelInstaller { if (!(0, version_1.isReleaseChannelName)(version)) { throw new Error(`Unexpected version: ${version}`); } - yield exec.exec(archive, ["/silent", "/install"]); - return { root: this.browserRootDir(version), bin: "chrome.exe" }; + const extPath = yield tc.extractZip(archive); + const extAppRoot = path.join(extPath, `chrome-${this.versionResolver.platformString}`); + const root = yield cache.cacheDir(extAppRoot, "chrome", version); + core.info(`Successfully Installed chrome to ${root}`); + return { root, bin: "chrome.exe" }; }); } - browserRootDir(version) { - switch (version) { - case "stable": - return "C:\\Program Files\\Google\\Chrome\\Application"; - case "beta": - return "C:\\Program Files\\Google\\Chrome Beta\\Application"; - case "dev": - return "C:\\Program Files\\Google\\Chrome Dev\\Application"; - case "canary": - return "C:\\Program Files\\Google\\Chrome SxS\\Application"; - } - } checkInstalledDriver(version) { return __awaiter(this, void 0, void 0, function* () { const root = yield cache.find("chromedriver", version); @@ -29409,7 +29278,7 @@ class WindowsChannelInstaller { return __awaiter(this, void 0, void 0, function* () { const resolved = yield this.versionResolver.resolve(version); if (!resolved) { - throw new Error(`Version ${version} not found in the known good versions`); + throw new Error(`Version ${version} not found in chrome for testing versions for ${this.platform.os} ${this.platform.arch}`); } core.info(`Acquiring chromedriver ${resolved.version} from ${resolved.driverDownloadURL}`); const archive = yield tc.downloadTool(resolved.driverDownloadURL); @@ -29896,7 +29765,7 @@ const testVersion = (platform, bin) => __awaiter(void 0, void 0, void 0, functio function run() { return __awaiter(this, void 0, void 0, function* () { try { - const version = core.getInput("chrome-version") || "latest"; + const version = core.getInput("chrome-version") || "stable"; const platform = (0, platform_1.getPlatform)(); const flagInstallDependencies = core.getInput("install-dependencies") === "true"; const flgInstallChromedriver = core.getInput("install-chromedriver") === "true"; @@ -29915,7 +29784,7 @@ function run() { core.addPath(node_path_1.default.dirname(browserBinPath)); core.setOutput("chrome-path", browserBinPath); core.setOutput("chrome-version", actualBrowserVersion); - core.info(`Successfully setup chromium ${actualBrowserVersion}`); + core.info(`Successfully setup chrome ${actualBrowserVersion}`); if (flgInstallChromedriver) { core.info(`Setup chromedriver ${version}`); const driverBinPath = yield installDriver(installer, version); @@ -30228,7 +30097,7 @@ class SnapshotInstaller { } checkInstalledBrowser(version) { return __awaiter(this, void 0, void 0, function* () { - const root = yield cache.find("chromium", version); + const root = yield cache.find("chrome", version); if (root) { return { root, bin: "chrome" }; } @@ -30265,8 +30134,8 @@ class SnapshotInstaller { return "chrome.exe"; } })(); - root = yield cache.cacheDir(root, "chromium", version); - core.info(`Successfully Installed chromium to ${root}`); + root = yield cache.cacheDir(root, "chrome", version); + core.info(`Successfully Installed chrome to ${root}`); return { root, bin }; }); } @@ -30539,7 +30408,7 @@ class KnownGoodVersionInstaller { } checkInstalledBrowser(version) { return __awaiter(this, void 0, void 0, function* () { - const root = yield cache.find("chromium", version); + const root = yield cache.find("chrome", version); if (root) { return { root, bin: "chrome" }; } @@ -30551,7 +30420,7 @@ class KnownGoodVersionInstaller { ? yield this.versionResolver.resolveBrowserOnly(version) : yield this.versionResolver.resolveBrowserAndDriver(version); if (!resolved) { - throw new Error(`Version ${version} not found in known good versions`); + throw new Error(`Version ${version} not found in known good versions for ${this.platform.os} ${this.platform.arch}`); } core.info(`Acquiring chrome ${resolved.version} from ${resolved.browserDownloadURL}`); const archive = yield tc.downloadTool(resolved.browserDownloadURL); @@ -30564,12 +30433,12 @@ class KnownGoodVersionInstaller { ? yield this.versionResolver.resolveBrowserOnly(version) : yield this.versionResolver.resolveBrowserAndDriver(version); if (!resolved) { - throw new Error(`Version ${version} not found in known good versions`); + throw new Error(`Version ${version} not found in known good versions for ${this.platform.os} ${this.platform.arch}`); } const extPath = yield tc.extractZip(archive); const extAppRoot = node_path_1.default.join(extPath, `chrome-${this.versionResolver.platformString}`); - const root = yield cache.cacheDir(extAppRoot, "chromium", resolved.version); - core.info(`Successfully Installed chromium to ${root}`); + const root = yield cache.cacheDir(extAppRoot, "chrome", resolved.version); + core.info(`Successfully Installed chrome to ${root}`); const bin = (() => { switch (this.platform.os) { case platform_1.OS.DARWIN: @@ -30598,7 +30467,7 @@ class KnownGoodVersionInstaller { } const resolved = yield this.versionResolver.resolveBrowserAndDriver(version); if (!resolved) { - throw new Error(`Version ${version} not found in known good versions`); + throw new Error(`Version ${version} not found in known good versions for ${this.platform.os} ${this.platform.arch}`); } core.info(`Acquiring chromedriver ${resolved.version} from ${resolved.driverDownloadURL}`); const archive = yield tc.downloadTool(resolved.driverDownloadURL); @@ -30612,7 +30481,7 @@ class KnownGoodVersionInstaller { } const resolved = yield this.versionResolver.resolveBrowserAndDriver(version); if (!resolved) { - throw new Error(`Version ${version} not found in known good versions`); + throw new Error(`Version ${version} not found in known good versions for ${this.platform.os} ${this.platform.arch}`); } const extPath = yield tc.extractZip(archive); const extAppRoot = node_path_1.default.join(extPath, `chromedriver-${this.versionResolver.platformString}`); From b94431e051d1c52dcbe9a7092a4f10f827795416 Mon Sep 17 00:00:00 2001 From: ueokande Date: Sun, 13 Jul 2025 00:47:54 +0000 Subject: [PATCH 2/2] Release v2.1.0 at 5f2f9dae94e061474cbfa44c9901c5faee86f8e9 --- README.md | 19 ++++++++++++++----- index.js | 13 ++++++++++--- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index b4c039f..79c70f0 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ The action installs the stable version of Chrome for Testing by default. ```yaml steps: - - uses: browser-actions/setup-chrome@v1 + - uses: browser-actions/setup-chrome@v2 - run: chrome --version ``` @@ -26,7 +26,7 @@ To install a specific channel, use `chrome-version` input. ```yaml steps: - - uses: browser-actions/setup-chrome@v1 + - uses: browser-actions/setup-chrome@v2 with: chrome-version: 120 ``` @@ -36,7 +36,7 @@ You can use the `install-chromedriver` to install the ChromeDriver. ```yaml steps: - - uses: browser-actions/setup-chrome@v1 + - uses: browser-actions/setup-chrome@v2 with: chrome-version: 120 install-chromedriver: true @@ -48,7 +48,7 @@ It installs the required dependencies for the Google Chrome/Chromium to run auto ```yaml steps: - - uses: browser-actions/setup-chrome@v1 + - uses: browser-actions/setup-chrome@v2 with: chrome-version: 120 install-dependencies: true @@ -74,7 +74,7 @@ To get the installed binary path, use `chrome-path` output of the action: ```yaml steps: - - uses: browser-actions/setup-chrome@v1 + - uses: browser-actions/setup-chrome@v2 id: setup-chrome - run: | ${{ steps.setup-chrome.outputs.chrome-path }} --version @@ -102,6 +102,15 @@ steps: [snapshots]: https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html +## Supported platforms + +| | Linux x64 | Mac x64 | Mac Arm64 | Windows | Windows Arm64 | +| --- | --- | --- | --- | --- | --- | +| Channel name (e.g. `stable`) | ✅ | ✅ | ✅ | ✅ | ❌ | +| Commit position (e.g. `1295939`) | ✅ | ✅ | ✅ | ✅ | ✅ | +| Specific version (e.g. `120.0.6099`) | ✅ | ✅ | ✅ | ✅ | ❌ | +| Latest snapshot | ✅ | ✅ | ✅ | ✅ | ✅ | + ## License [MIT](LICENSE) diff --git a/index.js b/index.js index fdcc8d0..c18ff8a 100644 --- a/index.js +++ b/index.js @@ -30011,14 +30011,16 @@ const browserFileName = ({ os }) => { return "chrome-win.zip"; } }; -const driverFileName = ({ os }) => { +const driverFileName = ({ os, arch }) => { switch (os) { case platform_1.OS.DARWIN: return "chromedriver_mac64.zip"; case platform_1.OS.LINUX: return "chromedriver_linux64.zip"; case platform_1.OS.WINDOWS: - return "chromedriver_win32.zip"; + return arch === platform_1.Arch.ARM64 + ? "chromedriver_win64.zip" + : "chromedriver_win32.zip"; } }; const makePlatformPart = ({ os, arch }) => { @@ -30040,6 +30042,9 @@ const makePlatformPart = ({ os, arch }) => { else if (os === platform_1.OS.WINDOWS && arch === platform_1.Arch.AMD64) { return "Win_x64"; } + else if (os === platform_1.OS.WINDOWS && arch === platform_1.Arch.ARM64) { + return "Win_Arm64"; + } throw new Error(`Unsupported platform "${os}" "${arch}"`); }; @@ -30165,7 +30170,9 @@ class SnapshotInstaller { case platform_1.OS.LINUX: return path.join(extPath, "chromedriver_linux64"); case platform_1.OS.WINDOWS: - return path.join(extPath, "chromedriver_win32"); + return this.platform.arch === platform_1.Arch.ARM64 + ? path.join(extPath, "chromedriver_win64") + : path.join(extPath, "chromedriver_win32"); } })(); const bin = (() => {