chromedriver 95.0.0 → 97.0.2

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
@@ -10,11 +10,15 @@ const child_process = require('child_process');
10
10
  const os = require('os');
11
11
  const url = require('url');
12
12
  const https = require('https');
13
+ const { promisify } = require('util');
14
+ const { finished } = require('stream');
13
15
  const extractZip = require('extract-zip');
14
16
  const { getChromeVersion } = require('@testim/chrome-version');
15
17
  const HttpsProxyAgent = require('https-proxy-agent');
16
18
  const getProxyForUrl = require("proxy-from-env").getProxyForUrl;
17
19
 
20
+ const finishedAsync = promisify(finished);
21
+
18
22
  const skipDownload = process.env.npm_config_chromedriver_skip_download || process.env.CHROMEDRIVER_SKIP_DOWNLOAD;
19
23
  if (skipDownload === 'true') {
20
24
  console.log('Found CHROMEDRIVER_SKIP_DOWNLOAD variable, skipping installation.');
@@ -256,10 +260,11 @@ async function requestBinary(requestOptions, filePath) {
256
260
  console.error('Error status code:', error.response.status);
257
261
  if (error.response.data) {
258
262
  error.response.data.on('data', data => console.error(data.toString('utf8')));
259
- await new Promise((resolve) => {
260
- error.response.data.on('finish', resolve);
261
- error.response.data.on('error', resolve);
262
- });
263
+ try {
264
+ await finishedAsync(error.response.data)
265
+ } catch (error) {
266
+ console.error('Error downloading entire response:', error);
267
+ }
263
268
  }
264
269
  }
265
270
  throw new Error('Error with http(s) request: ' + error);
@@ -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 = '95.0.4638.17';
20
+ exports.version = '97.0.4692.71';
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": "95.0.0",
3
+ "version": "97.0.2",
4
4
  "keywords": [
5
5
  "chromedriver",
6
6
  "selenium"
@@ -26,8 +26,8 @@
26
26
  "update-chromedriver": "node update.js"
27
27
  },
28
28
  "dependencies": {
29
- "@testim/chrome-version": "^1.0.7",
30
- "axios": "^0.21.2",
29
+ "@testim/chrome-version": "^1.1.2",
30
+ "axios": "^0.24.0",
31
31
  "del": "^6.0.0",
32
32
  "extract-zip": "^2.0.1",
33
33
  "https-proxy-agent": "^5.0.0",