chromedriver 134.0.2 → 134.0.3
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 +5 -0
- package/eslint.config.cjs +51 -0
- package/install.js +15 -1
- package/package.json +10 -6
package/README.md
CHANGED
|
@@ -145,7 +145,12 @@ This variable can be used to set either a `.zip` file or the binary itself, eg:
|
|
|
145
145
|
```shell
|
|
146
146
|
CHROMEDRIVER_FILEPATH=/bin/chromedriver
|
|
147
147
|
```
|
|
148
|
+
## Installing on RISC-V 64-bit Systems
|
|
149
|
+
Chromedriver does not provide an official binary for RISC-V 64-bit architectures. To install on a RISC-V system, you must supply your own Chromedriver binary using the `--chromedriver_filepath` option. For example:
|
|
148
150
|
|
|
151
|
+
```bash
|
|
152
|
+
npm install chromedriver --chromedriver_filepath=/path/to/chromedriver
|
|
153
|
+
```
|
|
149
154
|
## Custom download options
|
|
150
155
|
|
|
151
156
|
Install through a proxy.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
const globals = require("globals");
|
|
2
|
+
const js = require("@eslint/js");
|
|
3
|
+
|
|
4
|
+
const { FlatCompat } = require("@eslint/eslintrc");
|
|
5
|
+
|
|
6
|
+
const compat = new FlatCompat({
|
|
7
|
+
baseDirectory: __dirname,
|
|
8
|
+
recommendedConfig: js.configs.recommended,
|
|
9
|
+
allConfig: js.configs.all
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
module.exports = [...compat.extends("eslint:recommended"), {
|
|
13
|
+
languageOptions: {
|
|
14
|
+
globals: {
|
|
15
|
+
...Object.fromEntries(Object.entries(globals.browser).map(([key]) => [key, "off"])),
|
|
16
|
+
...globals.commonjs,
|
|
17
|
+
...globals.node,
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
ecmaVersion: 2020,
|
|
21
|
+
sourceType: "commonjs",
|
|
22
|
+
|
|
23
|
+
parserOptions: {
|
|
24
|
+
ecmaFeatures: {
|
|
25
|
+
jsx: false,
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
rules: {
|
|
31
|
+
"no-const-assign": "warn",
|
|
32
|
+
"no-this-before-super": "warn",
|
|
33
|
+
"no-undef": "warn",
|
|
34
|
+
"no-unreachable": "warn",
|
|
35
|
+
"no-unused-vars": "warn",
|
|
36
|
+
"constructor-super": "warn",
|
|
37
|
+
"valid-typeof": "warn",
|
|
38
|
+
semi: "error",
|
|
39
|
+
"no-console": "off",
|
|
40
|
+
"no-var": "error",
|
|
41
|
+
"prefer-const": "error",
|
|
42
|
+
},
|
|
43
|
+
}, {
|
|
44
|
+
files: ["tests/**/*"],
|
|
45
|
+
|
|
46
|
+
languageOptions: {
|
|
47
|
+
globals: {
|
|
48
|
+
...globals.jest,
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
}];
|
package/install.js
CHANGED
|
@@ -90,6 +90,20 @@ class Installer {
|
|
|
90
90
|
if (thePlatform === 'linux') {
|
|
91
91
|
if (process.arch === 'arm64' || process.arch === 's390x' || process.arch === 'x64') {
|
|
92
92
|
return 'linux64';
|
|
93
|
+
} else if (process.arch === 'riscv64') {
|
|
94
|
+
// Check if --chromedriver_filepath is provided via env vars
|
|
95
|
+
const configuredfilePath = process.env.npm_config_chromedriver_filepath || process.env.CHROMEDRIVER_FILEPATH;
|
|
96
|
+
if (!configuredfilePath) {
|
|
97
|
+
console.error(
|
|
98
|
+
'Error: RISC-V detected: No official Chromedriver binary is available for RISC-V 64-bit. ' +
|
|
99
|
+
'Please provide a local Chromedriver binary using the --chromedriver_filepath option. ' +
|
|
100
|
+
'Example: npm install chromedriver --chromedriver_filepath=/path/to/chromedriver ' +
|
|
101
|
+
'You may need to build Chromedriver from source or obtain it from a third-party source.'
|
|
102
|
+
);
|
|
103
|
+
process.exit(1);
|
|
104
|
+
}
|
|
105
|
+
// Return a placeholder platform; actual file will come from configuredfilePath
|
|
106
|
+
return 'linux64'; // Compatible with downstream logic, though download is skipped
|
|
93
107
|
} else {
|
|
94
108
|
console.error('Only Linux 64 bits supported.');
|
|
95
109
|
process.exit(1);
|
|
@@ -186,7 +200,7 @@ class Installer {
|
|
|
186
200
|
deferred.resolve(false);
|
|
187
201
|
});
|
|
188
202
|
}
|
|
189
|
-
catch
|
|
203
|
+
catch {
|
|
190
204
|
deferred.resolve(false);
|
|
191
205
|
}
|
|
192
206
|
return deferred.promise;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chromedriver",
|
|
3
|
-
"version": "134.0.
|
|
3
|
+
"version": "134.0.3",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"chromedriver",
|
|
6
6
|
"selenium"
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"typecheck": "tsc",
|
|
28
28
|
"test": "jest",
|
|
29
29
|
"test:ci": "jest --ci --reporters=default --reporters=jest-junit",
|
|
30
|
-
"lint": "eslint"
|
|
30
|
+
"lint": "eslint --max-warnings=0"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@testim/chrome-version": "^1.1.4",
|
|
@@ -39,12 +39,16 @@
|
|
|
39
39
|
"tcp-port-used": "^1.0.2"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@
|
|
43
|
-
"eslint": "^
|
|
42
|
+
"@eslint/eslintrc": "^3.3.0",
|
|
43
|
+
"@eslint/js": "^9.22.0",
|
|
44
|
+
"@types/jest": "^29.5.14",
|
|
45
|
+
"@types/node": "^22.13.10",
|
|
46
|
+
"eslint": "^9.22.0",
|
|
47
|
+
"globals": "^16.0.0",
|
|
44
48
|
"jest": "^29.7.0",
|
|
45
49
|
"jest-junit": "^16.0.0",
|
|
46
|
-
"semver": "^7.
|
|
47
|
-
"typescript": "^5.
|
|
50
|
+
"semver": "^7.7.1",
|
|
51
|
+
"typescript": "^5.8.2"
|
|
48
52
|
},
|
|
49
53
|
"engines": {
|
|
50
54
|
"node": ">=18"
|