chromedriver 114.0.2 → 115.0.0

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/README.md CHANGED
@@ -36,9 +36,9 @@ force it always download by configuring it:
36
36
  npm install chromedriver --chromedriver-force-download
37
37
  ```
38
38
 
39
- Or add property into your [`.npmrc`](https://docs.npmjs.com/files/npmrc) file.
39
+ Or add property to your [`.npmrc`](https://docs.npmjs.com/files/npmrc) file.
40
40
 
41
- ```
41
+ ```ini
42
42
  chromedriver_force_download=true
43
43
  ```
44
44
 
@@ -50,23 +50,65 @@ CHROMEDRIVER_FORCE_DOWNLOAD=true npm install chromedriver
50
50
 
51
51
  ## Custom binaries url
52
52
 
53
- To use a mirror of the ChromeDriver binaries use npm config property `chromedriver_cdnurl`.
54
- Default is `https://chromedriver.storage.googleapis.com`.
53
+ This allows you to use your own endpoints for metadata and binaries. It is useful in air gapped
54
+ scenarios or if you have download restrictions, such as firewalls.
55
+
56
+ This was changed for version 115 and greater
57
+ ([see details](https://groups.google.com/g/chromedriver-users/c/clpipqvOGjE)),
58
+ but implemented in this package starting with version
59
+ `114.0.2`. To see the configuration to prior versions check out this
60
+ [README.md](https://github.com/giggio/node-chromedriver/tree/114.0.1#custom-binaries-url)
61
+ at the latest tag where it was using the legacy urls (`114.0.1`).
62
+
63
+ ### For versions >= 115
64
+
65
+ There are two urls that need to be configured, one for metadata and one for binaries.
66
+ The one for metadata is the "CDN url", and the one for binaries is the "CDN binaries url".
67
+ See [Chrome for Testing](https://googlechromelabs.github.io/chrome-for-testing/) to understand
68
+ how these urls work.
69
+
70
+ Npm config:
71
+ For metadata use `chromedriver_cdnurl`. The default is `https://googlechromelabs.github.io`.
72
+ For binaries use `chromedriver_cdnurl`. The default is `https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing`.
73
+
74
+ ```shell
75
+ npm install chromedriver --chromedriver_cdnurl=https://npmmirror.com/metadata --chromedriver_cdnbinariesurl=https://npmmirror.com/binaries
76
+ ```
77
+
78
+ Or add these properties to your [`.npmrc`](https://docs.npmjs.com/cli/configuring-npm/npmrc) file:
79
+
80
+ ```ini
81
+ chromedriver_cdnurl=https://npmmirror.com/metadata
82
+ chromedriver_cdnbinariesurl=https://npmmirror.com/binaries
83
+ ```
84
+
85
+ Another option is to use the environment variables `CHROMEDRIVER_CDNURL` and `CHROMEDRIVER_CDNBINARIESURL`.
55
86
 
56
87
  ```shell
57
- npm install chromedriver --chromedriver_cdnurl=https://npmmirror.com/mirrors/chromedriver
88
+ CHROMEDRIVER_CDNURL=https://npmmirror.com/metadata CHROMEDRIVER_CDNBINARIESURL=https://npmmirror.com/binaries npm install chromedriver
58
89
  ```
59
90
 
60
- Or add property into your [`.npmrc`](https://docs.npmjs.com/files/npmrc) file.
91
+ ### For versions < 115
92
+
93
+ There is one url to both metadata and binaries.
94
+
95
+ To use a mirror of the ChromeDriver binaries use npm config property `chromedriver_legacy_cdnurl`.
96
+ Default is `https://chromedriver.storage.googleapis.com`.
61
97
 
98
+ ```shell
99
+ npm install chromedriver --chromedriver_legacy_cdnurl=https://npmmirror.com/mirrors/chromedriver --chromedriver_version=LATEST_114
62
100
  ```
63
- chromedriver_cdnurl=https://npmmirror.com/mirrors/chromedriver
101
+
102
+ Or add a property to your [`.npmrc`](https://docs.npmjs.com/files/npmrc) file:
103
+
104
+ ```ini
105
+ chromedriver_legacy_cdnurl=https://npmmirror.com/mirrors/chromedriver
64
106
  ```
65
107
 
66
- Another option is to use PATH variable `CHROMEDRIVER_CDNURL`.
108
+ Another option is to use the environment variable `CHROMEDRIVER_LEGACY_CDNURL`.
67
109
 
68
110
  ```shell
69
- CHROMEDRIVER_CDNURL=https://npmmirror.com/mirrors/chromedriver npm install chromedriver
111
+ CHROMEDRIVER_LEGACY_CDNURL=https://npmmirror.com/mirrors/chromedriver npm install chromedriver --chromedriver_version=LATEST_114
70
112
  ```
71
113
 
72
114
  ## Custom binaries file
@@ -77,9 +119,9 @@ To get the chromedriver from the filesystem instead of a web request use the npm
77
119
  npm install chromedriver --chromedriver_filepath=/path/to/chromedriver_mac64.zip
78
120
  ```
79
121
 
80
- Or add property into your [`.npmrc`](https://docs.npmjs.com/files/npmrc) file.
122
+ Or add property to your [`.npmrc`](https://docs.npmjs.com/files/npmrc) file.
81
123
 
82
- ```
124
+ ```ini
83
125
  chromedriver_filepath=/path/to/chromedriver_mac64.zip
84
126
  ```
85
127
 
@@ -120,9 +162,9 @@ To achieve this you can use the npm config property `chromedriver_skip_download`
120
162
  npm install chromedriver --chromedriver_skip_download=true
121
163
  ```
122
164
 
123
- Or add property into your [`.npmrc`](https://docs.npmjs.com/files/npmrc) file.
165
+ Or add property to your [`.npmrc`](https://docs.npmjs.com/files/npmrc) file.
124
166
 
125
- ```
167
+ ```ini
126
168
  chromedriver_skip_download=true
127
169
  ```
128
170
 
@@ -218,9 +260,9 @@ use `LATEST` as the version number:
218
260
  npm install chromedriver --chromedriver_version=LATEST
219
261
  ```
220
262
 
221
- Or add property into your [`.npmrc`](https://docs.npmjs.com/files/npmrc) file.
263
+ Or add property to your [`.npmrc`](https://docs.npmjs.com/files/npmrc) file.
222
264
 
223
- ```
265
+ ```ini
224
266
  chromedriver_version=LATEST
225
267
  ```
226
268
 
@@ -252,9 +294,9 @@ you can use the npm config property `detect_chromedriver_version`.
252
294
  npm install chromedriver --detect_chromedriver_version
253
295
  ```
254
296
 
255
- Or add property into your [`.npmrc`](https://docs.npmjs.com/files/npmrc) file.
297
+ Or add property to your [`.npmrc`](https://docs.npmjs.com/files/npmrc) file.
256
298
 
257
- ```
299
+ ```ini
258
300
  detect_chromedriver_version=true
259
301
  ```
260
302
 
@@ -275,9 +317,9 @@ If you don't have Chrome installed, you can check for Chromium version instead b
275
317
  npm install chromedriver --include_chromium
276
318
  ```
277
319
 
278
- Or add property into your [`.npmrc`](https://docs.npmjs.com/files/npmrc) file.
320
+ Or add property to your [`.npmrc`](https://docs.npmjs.com/files/npmrc) file.
279
321
 
280
- ```
322
+ ```ini
281
323
  include_chromium=true
282
324
  ```
283
325
 
package/install.js CHANGED
@@ -26,10 +26,8 @@ if (skipDownload) {
26
26
  }
27
27
 
28
28
  (async function install() {
29
- let cdnUrl = process.env.npm_config_chromedriver_cdnurl || process.env.CHROMEDRIVER_CDNURL || 'https://googlechromelabs.github.io';
30
- const legacyCdnUrl = process.env.npm_config_chromedriver_legacy_cdnurl || process.env.CHROMEDRIVER_LEGACY_CDNURL || 'https://chromedriver.storage.googleapis.com';
31
- // adapt http://chromedriver.storage.googleapis.com/
32
- cdnUrl = cdnUrl.replace(/\/+$/, '');
29
+ const cdnUrl = (process.env.npm_config_chromedriver_cdnurl || process.env.CHROMEDRIVER_CDNURL || 'https://googlechromelabs.github.io').replace(/\/+$/, '');
30
+ const legacyCdnUrl = (process.env.npm_config_chromedriver_legacy_cdnurl || process.env.CHROMEDRIVER_LEGACY_CDNURL || 'https://chromedriver.storage.googleapis.com').replace(/\/+$/, '');
33
31
  let chromedriverVersion = process.env.npm_config_chromedriver_version || process.env.CHROMEDRIVER_VERSION || helper.version;
34
32
  const detectChromedriverVersion = (process.env.npm_config_detect_chromedriver_version || process.env.DETECT_CHROMEDRIVER_VERSION) === 'true';
35
33
  try {
@@ -65,7 +63,8 @@ if (skipDownload) {
65
63
  const chromedriverIsAvailable = await verifyIfChromedriverIsAvailableAndHasCorrectVersion(chromedriverVersion, chromedriverBinaryFilePath);
66
64
  if (!chromedriverIsAvailable) {
67
65
  console.log('Current existing ChromeDriver binary is unavailable, proceeding with download and extraction.');
68
- await downloadFile(useLegacyMethod ? legacyCdnUrl : cdnUrl, useLegacyMethod, downloadedFile, chromedriverVersion, platform, detectChromedriverVersion);
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);
69
68
  await extractDownload(extractDirectory, chromedriverBinaryFilePath, downloadedFile);
70
69
  }
71
70
  const libPath = path.join(__dirname, 'lib', 'chromedriver');
@@ -130,8 +129,7 @@ async function downloadFile(cdnUrl, useLegacyDownloadMethod, downloadedFile, chr
130
129
  console.log('Downloading from file: ', formattedDownloadUrl);
131
130
  await requestBinary(getRequestOptions(formattedDownloadUrl), downloadedFile);
132
131
  } else {
133
- const dlBaseUrl = 'https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing'; // todo: make this configurable?
134
- const formattedDownloadUrl = `${dlBaseUrl}/${chromedriverVersion}/${platform}/${fileName}`;
132
+ const formattedDownloadUrl = `${cdnUrl}/${chromedriverVersion}/${platform}/${fileName}`;
135
133
  console.log('Downloading from file: ', formattedDownloadUrl);
136
134
  await requestBinary(getRequestOptions(formattedDownloadUrl), downloadedFile);
137
135
  }
@@ -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 = '114.0.5735.90';
20
+ exports.version = '115.0.5790.102';
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": "114.0.2",
3
+ "version": "115.0.0",
4
4
  "keywords": [
5
5
  "chromedriver",
6
6
  "selenium"
@@ -30,17 +30,17 @@
30
30
  "dependencies": {
31
31
  "@testim/chrome-version": "^1.1.3",
32
32
  "axios": "^1.4.0",
33
- "compare-versions": "^5.0.3",
33
+ "compare-versions": "^6.0.0",
34
34
  "extract-zip": "^2.0.1",
35
35
  "https-proxy-agent": "^5.0.1",
36
36
  "proxy-from-env": "^1.1.0",
37
37
  "tcp-port-used": "^1.0.1"
38
38
  },
39
39
  "devDependencies": {
40
- "eslint": "^8.42.0",
41
- "typescript": "^5.1.3"
40
+ "eslint": "^8.45.0",
41
+ "typescript": "^5.1.6"
42
42
  },
43
43
  "engines": {
44
44
  "node": ">=16"
45
45
  }
46
- }
46
+ }