electron-chromedriver 37.2.4 → 37.3.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/chromedriver.js CHANGED
@@ -8,18 +8,20 @@ const args = process.argv.slice(2)
8
8
  const options = {
9
9
  cwd: process.cwd(),
10
10
  env: process.env,
11
- stdio: 'inherit'
11
+ stdio: 'inherit',
12
12
  }
13
13
 
14
14
  const chromeDriverProcess = ChildProcess.spawn(command, args, options)
15
15
 
16
- chromeDriverProcess.on('close', code => {
16
+ chromeDriverProcess.on('close', (code) => {
17
17
  if (code !== null && code !== 0) {
18
18
  throw new Error(`Chromedriver exited with error code: ${code}`)
19
19
  }
20
20
  })
21
21
 
22
- chromeDriverProcess.on('error', error => { throw new Error(error) })
22
+ chromeDriverProcess.on('error', (error) => {
23
+ throw new Error(error)
24
+ })
23
25
 
24
26
  const killChromeDriver = () => {
25
27
  try {
@@ -4,7 +4,7 @@ const { downloadArtifact } = require('@electron/get')
4
4
  const extractZip = require('extract-zip')
5
5
  const versionToDownload = require('./package').version
6
6
 
7
- function download (version) {
7
+ function download(version) {
8
8
  return downloadArtifact({
9
9
  version,
10
10
  artifactName: 'chromedriver',
@@ -13,20 +13,27 @@ function download (version) {
13
13
  platform: process.env.npm_config_platform,
14
14
  arch: process.env.npm_config_arch,
15
15
  rejectUnauthorized: process.env.npm_config_strict_ssl === 'true',
16
- quiet: ['info', 'verbose', 'silly', 'http'].indexOf(process.env.npm_config_loglevel) === -1
16
+ quiet:
17
+ ['info', 'verbose', 'silly', 'http'].indexOf(
18
+ process.env.npm_config_loglevel,
19
+ ) === -1,
17
20
  })
18
21
  }
19
22
 
20
- async function attemptDownload (version) {
23
+ async function attemptDownload(version) {
21
24
  // Fall back to latest stable if there is not a stamped version, for tests
22
25
  if (version === '0.0.0-development') {
23
26
  if (!process.env.ELECTRON_CHROMEDRIVER_STABLE_FALLBACK) {
24
- console.log('WARNING: chromedriver in development needs the environment variable ELECTRON_CHROMEDRIVER_STABLE_FALLBACK set')
27
+ console.log(
28
+ 'WARNING: chromedriver in development needs the environment variable ELECTRON_CHROMEDRIVER_STABLE_FALLBACK set',
29
+ )
25
30
  process.exit(1)
26
31
  }
27
32
 
28
33
  const { ElectronVersions } = require('@electron/fiddle-core')
29
- const versions = await ElectronVersions.create(undefined, { ignoreCache: true })
34
+ const versions = await ElectronVersions.create(undefined, {
35
+ ignoreCache: true,
36
+ })
30
37
  version = versions.latestStable.version
31
38
  }
32
39
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electron-chromedriver",
3
- "version": "37.2.4",
3
+ "version": "37.3.0",
4
4
  "description": "Electron ChromeDriver",
5
5
  "repository": "https://github.com/electron/chromedriver",
6
6
  "bin": {
@@ -12,8 +12,9 @@
12
12
  ],
13
13
  "scripts": {
14
14
  "install": "node ./download-chromedriver.js",
15
- "lint": "standard --fix",
16
- "test": "standard && mocha"
15
+ "prettier": "prettier --single-quote --no-semi --check \"**/*.js\"",
16
+ "prettier:write": "prettier --single-quote --no-semi --write \"**/*.js\"",
17
+ "test": "mocha && npm run prettier"
17
18
  },
18
19
  "engines": {
19
20
  "node": ">=10.12.0"
@@ -28,6 +29,6 @@
28
29
  "@continuous-auth/client": "^2.3.0",
29
30
  "@electron/fiddle-core": "^1.3.3",
30
31
  "mocha": "^10.1.0",
31
- "standard": "^13.1.0"
32
+ "prettier": "^3.6.2"
32
33
  }
33
34
  }