Skip to content

Commit b62bef3

Browse files
committedJan 28, 2020
Bump version to 79.0.2 and reformat some files
1 parent 67253e1 commit b62bef3

File tree

5 files changed

+31
-27
lines changed

5 files changed

+31
-27
lines changed
 

‎.vscode/settings.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
22
"vsicons.presets.angular": false,
33
"editor.formatOnSave": true,
4-
"eslint.autoFixOnSave": true
4+
"eslint.autoFixOnSave": true,
5+
"editor.codeActionsOnSave": {
6+
"source.fixAll.eslint": true
7+
}
58
}

‎README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ npm config set https-proxy http://[user:pwd]@domain.tld:port
105105
```
106106

107107
Use different User-Agent.
108+
108109
```shell
109110
npm config set user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0"
110111
```
@@ -183,7 +184,7 @@ You can also use the start and stop methods:
183184
var chromedriver = require('chromedriver');
184185

185186
args = [
186-
// optional arguments
187+
// optional arguments
187188
];
188189
chromedriver.start(args);
189190
// run your tests

‎install.js

+23-23
Original file line numberDiff line numberDiff line change
@@ -72,23 +72,23 @@ Promise.resolve().then(function () {
7272
}
7373
}
7474
})
75-
.then(() => {
76-
tmpPath = findSuitableTempDirectory();
77-
chromedriverBinaryFilePath = path.resolve(tmpPath, chromedriverBinaryFileName );
78-
})
79-
.then(verifyIfChromedriverIsAvailableAndHasCorrectVersion)
80-
.then(chromedriverIsAvailable => {
81-
if (chromedriverIsAvailable) return;
82-
console.log('Current existing ChromeDriver binary is unavailable, proceeding with download and extraction.');
83-
return downloadFile().then(extractDownload);
84-
})
85-
.then(() => copyIntoPlace(tmpPath, libPath))
86-
.then(fixFilePermissions)
87-
.then(() => console.log('Done. ChromeDriver binary available at', helper.path))
88-
.catch(function (err) {
89-
console.error('ChromeDriver installation failed', err);
90-
process.exit(1);
91-
});
75+
.then(() => {
76+
tmpPath = findSuitableTempDirectory();
77+
chromedriverBinaryFilePath = path.resolve(tmpPath, chromedriverBinaryFileName);
78+
})
79+
.then(verifyIfChromedriverIsAvailableAndHasCorrectVersion)
80+
.then(chromedriverIsAvailable => {
81+
if (chromedriverIsAvailable) return;
82+
console.log('Current existing ChromeDriver binary is unavailable, proceeding with download and extraction.');
83+
return downloadFile().then(extractDownload);
84+
})
85+
.then(() => copyIntoPlace(tmpPath, libPath))
86+
.then(fixFilePermissions)
87+
.then(() => console.log('Done. ChromeDriver binary available at', helper.path))
88+
.catch(function (err) {
89+
console.error('ChromeDriver installation failed', err);
90+
process.exit(1);
91+
});
9292

9393
function downloadFile() {
9494
if (detect_chromedriver_version !== 'true' && configuredfilePath) {
@@ -176,7 +176,7 @@ function findSuitableTempDirectory() {
176176

177177

178178
function getRequestOptions(downloadPath) {
179-
const options = {uri: downloadPath, method: 'GET'};
179+
const options = { uri: downloadPath, method: 'GET' };
180180
const protocol = options.uri.substring(0, options.uri.indexOf('//'));
181181
const proxyUrl = protocol === 'https:'
182182
? process.env.npm_config_https_proxy
@@ -201,7 +201,7 @@ function getRequestOptions(downloadPath) {
201201

202202
if (!ca && process.env.npm_config_cafile) {
203203
try {
204-
ca = fs.readFileSync(process.env.npm_config_cafile, {encoding: 'utf8'})
204+
ca = fs.readFileSync(process.env.npm_config_cafile, { encoding: 'utf8' })
205205
.split(/\n(?=-----BEGIN CERTIFICATE-----)/g);
206206

207207
// Comments at the beginning of the file result in the first
@@ -226,7 +226,7 @@ function getRequestOptions(downloadPath) {
226226

227227
// Use specific User-Agent
228228
if (process.env.npm_config_user_agent) {
229-
options.headers = {'User-Agent': process.env.npm_config_user_agent};
229+
options.headers = { 'User-Agent': process.env.npm_config_user_agent };
230230
}
231231

232232
return options;
@@ -297,21 +297,21 @@ function extractDownload() {
297297

298298
function copyIntoPlace(originPath, targetPath) {
299299
return del(targetPath)
300-
.then(function() {
300+
.then(function () {
301301
console.log("Copying to target path", targetPath);
302302
fs.mkdirSync(targetPath);
303303

304304
// Look for the extracted directory, so we can rename it.
305305
const files = fs.readdirSync(originPath);
306-
const promises = files.map(function(name) {
306+
const promises = files.map(function (name) {
307307
const deferred = new Deferred();
308308

309309
const file = path.join(originPath, name);
310310
const reader = fs.createReadStream(file);
311311

312312
const targetFile = path.join(targetPath, name);
313313
const writer = fs.createWriteStream(targetFile);
314-
writer.on("close", function() {
314+
writer.on("close", function () {
315315
deferred.resolve(true);
316316
});
317317

‎package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "chromedriver",
3-
"version": "79.0.1",
3+
"version": "79.0.2",
44
"keywords": [
55
"chromedriver",
66
"selenium"

0 commit comments

Comments
 (0)
Please sign in to comment.