Skip to content

Commit 115f85f

Browse files
authored
build(dev-deps): switch from standard to prettier (#158)
1 parent 79eae94 commit 115f85f

File tree

8 files changed

+187
-4129
lines changed

8 files changed

+187
-4129
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
node-version: 14.21.3
4141
runs-on: "${{ matrix.os }}"
4242
steps:
43+
- run: git config --global core.autocrlf input
4344
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
4445
- name: "Use Node.js ${{ matrix.node-version }}"
4546
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3

chromedriver.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,20 @@ const args = process.argv.slice(2)
88
const options = {
99
cwd: process.cwd(),
1010
env: process.env,
11-
stdio: 'inherit'
11+
stdio: 'inherit',
1212
}
1313

1414
const chromeDriverProcess = ChildProcess.spawn(command, args, options)
1515

16-
chromeDriverProcess.on('close', code => {
16+
chromeDriverProcess.on('close', (code) => {
1717
if (code !== null && code !== 0) {
1818
throw new Error(`Chromedriver exited with error code: ${code}`)
1919
}
2020
})
2121

22-
chromeDriverProcess.on('error', error => { throw new Error(error) })
22+
chromeDriverProcess.on('error', (error) => {
23+
throw new Error(error)
24+
})
2325

2426
const killChromeDriver = () => {
2527
try {

download-chromedriver.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const { downloadArtifact } = require('@electron/get')
44
const extractZip = require('extract-zip')
55
const versionToDownload = require('./package').version
66

7-
function download (version) {
7+
function download(version) {
88
return downloadArtifact({
99
version,
1010
artifactName: 'chromedriver',
@@ -13,20 +13,27 @@ function download (version) {
1313
platform: process.env.npm_config_platform,
1414
arch: process.env.npm_config_arch,
1515
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,
1720
})
1821
}
1922

20-
async function attemptDownload (version) {
23+
async function attemptDownload(version) {
2124
// Fall back to latest stable if there is not a stamped version, for tests
2225
if (version === '0.0.0-development') {
2326
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+
)
2530
process.exit(1)
2631
}
2732

2833
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+
})
3037
version = versions.latestStable.version
3138
}
3239

0 commit comments

Comments
 (0)