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 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
- const downloadedFile = getDownloadFilePath(useLegacyMethod, tmpPath, platform);
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, detectChromedriverVersion);
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, detectChromedriverVersion) {
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 (detectChromedriverVersion && configuredfilePath) {
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
 
@@ -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 = '116.0.5845.96';
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chromedriver",
3
- "version": "116.0.0",
3
+ "version": "117.0.1",
4
4
  "keywords": [
5
5
  "chromedriver",
6
6
  "selenium"
@@ -41,6 +41,6 @@
41
41
  "typescript": "^5.1.6"
42
42
  },
43
43
  "engines": {
44
- "node": ">=16"
44
+ "node": ">=18"
45
45
  }
46
46
  }