chromedriver 106.0.0 → 106.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/install.js +8 -2
- package/package.json +2 -1
package/install.js
CHANGED
|
@@ -16,6 +16,7 @@ const extractZip = require('extract-zip');
|
|
|
16
16
|
const { getChromeVersion } = require('@testim/chrome-version');
|
|
17
17
|
const HttpsProxyAgent = require('https-proxy-agent');
|
|
18
18
|
const getProxyForUrl = require("proxy-from-env").getProxyForUrl;
|
|
19
|
+
const { compareVersions } = require('compare-versions');
|
|
19
20
|
|
|
20
21
|
const finishedAsync = promisify(finished);
|
|
21
22
|
|
|
@@ -31,12 +32,12 @@ const configuredfilePath = process.env.npm_config_chromedriver_filepath || proce
|
|
|
31
32
|
|
|
32
33
|
// adapt http://chromedriver.storage.googleapis.com/
|
|
33
34
|
cdnUrl = cdnUrl.replace(/\/+$/, '');
|
|
34
|
-
const platform = validatePlatform();
|
|
35
35
|
const detect_chromedriver_version = process.env.npm_config_detect_chromedriver_version || process.env.DETECT_CHROMEDRIVER_VERSION;
|
|
36
36
|
const include_chromium = (process.env.npm_config_include_chromium || process.env.INCLUDE_CHROMIUM) === 'true';
|
|
37
37
|
let chromedriver_version = process.env.npm_config_chromedriver_version || process.env.CHROMEDRIVER_VERSION || helper.version;
|
|
38
38
|
let chromedriverBinaryFilePath;
|
|
39
39
|
let downloadedFile = '';
|
|
40
|
+
let platform = '';
|
|
40
41
|
|
|
41
42
|
(async function install() {
|
|
42
43
|
try {
|
|
@@ -57,6 +58,7 @@ let downloadedFile = '';
|
|
|
57
58
|
await getChromeDriverVersion(getRequestOptions(`${cdnUrl}/LATEST_RELEASE_${majorVersion}`));
|
|
58
59
|
}
|
|
59
60
|
}
|
|
61
|
+
platform = validatePlatform();
|
|
60
62
|
const tmpPath = findSuitableTempDirectory();
|
|
61
63
|
const chromedriverBinaryFileName = process.platform === 'win32' ? 'chromedriver.exe' : 'chromedriver';
|
|
62
64
|
chromedriverBinaryFilePath = path.resolve(tmpPath, chromedriverBinaryFileName);
|
|
@@ -341,7 +343,11 @@ function fixFilePermissions() {
|
|
|
341
343
|
|
|
342
344
|
function getMacOsRealArch() {
|
|
343
345
|
if (process.arch === 'arm64' || isEmulatedRosettaEnvironment()) {
|
|
344
|
-
|
|
346
|
+
if (compareVersions(chromedriver_version, '106.0.5249.61') < 0) {
|
|
347
|
+
return 'mac64_m1';
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
return 'mac_arm64'
|
|
345
351
|
}
|
|
346
352
|
|
|
347
353
|
if (process.arch === 'x64') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chromedriver",
|
|
3
|
-
"version": "106.0.
|
|
3
|
+
"version": "106.0.1",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"chromedriver",
|
|
6
6
|
"selenium"
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@testim/chrome-version": "^1.1.3",
|
|
30
30
|
"axios": "^0.27.2",
|
|
31
|
+
"compare-versions": "^5.0.1",
|
|
31
32
|
"del": "^6.1.1",
|
|
32
33
|
"extract-zip": "^2.0.1",
|
|
33
34
|
"https-proxy-agent": "^5.0.1",
|