From a29227e692fff10f8915afcf0ccfeee6e0753676 Mon Sep 17 00:00:00 2001 From: Wil Wilsman Date: Tue, 6 Apr 2021 17:38:02 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Code=20style=20tweaks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also fix linting --- packages/core/src/install.js | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/packages/core/src/install.js b/packages/core/src/install.js index b42b46c78..16f46417a 100644 --- a/packages/core/src/install.js +++ b/packages/core/src/install.js @@ -4,13 +4,6 @@ import https from 'https'; import logger from '@percy/logger'; import readableBytes from './utils/bytes'; -const revisions = { - linux: '812847', - win64: '812845', - win32: '812822', - darwin: '812851' -}; - // Returns an item from the map keyed by the current platform function selectByPlatform(map) { let { platform, arch } = process; @@ -21,8 +14,8 @@ function selectByPlatform(map) { function installChromium({ // default directory is within @percy/core package root directory = path.resolve(__dirname, '../.local-chromium'), - // default revision corresponds to v87.0.4280.x - revision = selectByPlatform(revisions), + // default chromium revision by platform (see installChromium.revisions) + revision = selectByPlatform(installChromium.revisions) } = {}) { let extract = (i, o) => require('extract-zip')(i, { dir: o }); @@ -51,7 +44,13 @@ function installChromium({ }); } -installChromium.revisions = revisions; +// default chromium revisions corresponds to v87.0.4280.x +installChromium.revisions = { + linux: '812847', + win64: '812845', + win32: '812822', + darwin: '812851' +}; // Installs an executable from a url to a local directory, returning the full path to the extracted // binary. Skips installation if the executable already exists at the binary path.