selenium-standalone
Advanced tools
Comparing version 8.0.9 to 8.0.10
@@ -101,5 +101,5 @@ const tarStream = require('tar-stream'); | ||
function isUpToDate(url, requestOpts, hash, cb) { | ||
async function isUpToDate(url, requestOpts, hash) { | ||
if (!hash) { | ||
return cb(false); | ||
return false; | ||
} | ||
@@ -113,3 +113,3 @@ | ||
if (hash && url.includes('edgedriver')) { | ||
return cb(true); | ||
return true; | ||
} | ||
@@ -122,17 +122,13 @@ | ||
}); | ||
got(url, options) | ||
.then((res) => { | ||
if (res.statusCode === 304) { | ||
return cb(true); | ||
} | ||
cb(false); | ||
}) | ||
.catch((err) => { | ||
logError( | ||
`Could not request headers from ${url}: ` + | ||
(err.response ? err.response.statusCode : err.message) + | ||
', continue without checking for latest version.' | ||
); | ||
return cb(true); | ||
}); | ||
try { | ||
const response = await got(url, options); | ||
return response.statusCode === 304; | ||
} catch (err) { | ||
logError( | ||
`Could not request headers from ${url}: ` + | ||
(err.response ? err.response.statusCode : err.message) + | ||
', continue without checking for latest version.' | ||
); | ||
return true; | ||
} | ||
} | ||
@@ -139,0 +135,0 @@ |
@@ -119,3 +119,3 @@ /* eslint-disable no-shadow */ | ||
const hash = await new Promise((resolve) => checksum(opts.to, resolve)); | ||
const isLatest = await new Promise((resolve) => isUpToDate(opts.from, requestOpts, hash, resolve)); | ||
const isLatest = await isUpToDate(opts.from, requestOpts, hash); | ||
@@ -122,0 +122,0 @@ // File already exists. Prevent download/installation. |
{ | ||
"name": "selenium-standalone", | ||
"version": "8.0.9", | ||
"version": "8.0.10", | ||
"description": "installs a `selenium-standalone` command line to install and start a standalone selenium server", | ||
@@ -43,3 +43,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"commander": "^8.3.0", | ||
"commander": "^9.0.0", | ||
"cross-spawn": "^7.0.3", | ||
@@ -60,10 +60,10 @@ "debug": "^4.3.1", | ||
"devDependencies": { | ||
"chai": "4.3.4", | ||
"chai": "4.3.6", | ||
"doctoc": "2.1.0", | ||
"eslint": "8.7.0", | ||
"eslint-config-prettier": "8.3.0", | ||
"eslint": "8.10.0", | ||
"eslint-config-prettier": "8.5.0", | ||
"eslint-plugin-prettier": "4.0.0", | ||
"husky": "7.0.4", | ||
"json": "11.0.0", | ||
"mocha": "9.1.4", | ||
"mocha": "9.2.1", | ||
"mversion": "2.0.1", | ||
@@ -70,0 +70,0 @@ "npm-run-all": "^4.1.5", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
84896
1266
+ Addedcommander@9.5.0(transitive)
- Removedcommander@8.3.0(transitive)
Updatedcommander@^9.0.0