chromedriver 116.0.0 → 117.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 +5 -5
- package/lib/chromedriver.js +1 -1
- package/package.json +2 -2
package/install.js
CHANGED
|
@@ -54,7 +54,7 @@ if (skipDownload) {
|
|
|
54
54
|
const majorVersion = parseInt(chromedriverVersion.split('.')[0]);
|
|
55
55
|
const useLegacyMethod = majorVersion <= 114;
|
|
56
56
|
const platform = getPlatform(chromedriverVersion);
|
|
57
|
-
|
|
57
|
+
let downloadedFile = getDownloadFilePath(useLegacyMethod, tmpPath, platform);
|
|
58
58
|
if (!useLegacyMethod) {
|
|
59
59
|
tmpPath = path.join(tmpPath, path.basename(downloadedFile, path.extname(downloadedFile)));
|
|
60
60
|
}
|
|
@@ -64,7 +64,7 @@ if (skipDownload) {
|
|
|
64
64
|
if (!chromedriverIsAvailable) {
|
|
65
65
|
console.log('Current existing ChromeDriver binary is unavailable, proceeding with download and extraction.');
|
|
66
66
|
const cdnBinariesUrl = (process.env.npm_config_chromedriver_cdnbinariesurl || process.env.CHROMEDRIVER_CDNBINARIESURL || 'https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing').replace(/\/+$/, '');
|
|
67
|
-
await downloadFile(useLegacyMethod ? legacyCdnUrl : cdnBinariesUrl, useLegacyMethod, downloadedFile, chromedriverVersion, platform
|
|
67
|
+
downloadedFile = await downloadFile(useLegacyMethod ? legacyCdnUrl : cdnBinariesUrl, useLegacyMethod, downloadedFile, chromedriverVersion, platform);
|
|
68
68
|
await extractDownload(extractDirectory, chromedriverBinaryFilePath, downloadedFile);
|
|
69
69
|
}
|
|
70
70
|
const libPath = path.join(__dirname, 'lib', 'chromedriver');
|
|
@@ -115,11 +115,10 @@ function getPlatform(chromedriverVersion) {
|
|
|
115
115
|
* @param {string} downloadedFile
|
|
116
116
|
* @param {string} chromedriverVersion
|
|
117
117
|
* @param {string} platform
|
|
118
|
-
* @param {boolean} detectChromedriverVersion
|
|
119
118
|
*/
|
|
120
|
-
async function downloadFile(cdnUrl, useLegacyDownloadMethod, downloadedFile, chromedriverVersion, platform
|
|
119
|
+
async function downloadFile(cdnUrl, useLegacyDownloadMethod, downloadedFile, chromedriverVersion, platform) {
|
|
121
120
|
const configuredfilePath = process.env.npm_config_chromedriver_filepath || process.env.CHROMEDRIVER_FILEPATH;
|
|
122
|
-
if (
|
|
121
|
+
if (configuredfilePath) {
|
|
123
122
|
console.log('Using file: ', configuredfilePath);
|
|
124
123
|
return configuredfilePath;
|
|
125
124
|
} else {
|
|
@@ -133,6 +132,7 @@ async function downloadFile(cdnUrl, useLegacyDownloadMethod, downloadedFile, chr
|
|
|
133
132
|
console.log('Downloading from file: ', formattedDownloadUrl);
|
|
134
133
|
await requestBinary(getRequestOptions(formattedDownloadUrl), downloadedFile);
|
|
135
134
|
}
|
|
135
|
+
return downloadedFile;
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
|
package/lib/chromedriver.js
CHANGED
|
@@ -17,7 +17,7 @@ function getPortFromArgs(args) {
|
|
|
17
17
|
}
|
|
18
18
|
process.env.PATH = path.join(__dirname, 'chromedriver') + path.delimiter + process.env.PATH;
|
|
19
19
|
exports.path = process.platform === 'win32' ? path.join(__dirname, 'chromedriver', 'chromedriver.exe') : path.join(__dirname, 'chromedriver', 'chromedriver');
|
|
20
|
-
exports.version = '
|
|
20
|
+
exports.version = '117.0.5938.88';
|
|
21
21
|
exports.start = function (args, returnPromise) {
|
|
22
22
|
let command = exports.path;
|
|
23
23
|
if (!fs.existsSync(command)) {
|
package/package.json
CHANGED