Dependency updates & replacing shelljs with which
* Replace shelljs with which
* Update all npm dependencies
* Fix new eslint complaints
diff --git a/package.json b/package.json
index 6034e33..e7b92ba 100644
--- a/package.json
+++ b/package.json
@@ -24,22 +24,22 @@
"email": "dev@cordova.apache.org"
},
"dependencies": {
- "chalk": "^1.1.1",
+ "chalk": "^2.4.1",
"compression": "^1.6.0",
"express": "^4.13.3",
"opn": "^5.3.0",
- "shelljs": "^0.5.3"
+ "which": "^1.3.0"
},
"devDependencies": {
- "jasmine": "^2.5.2",
- "eslint": "^4.0.0",
- "eslint-config-semistandard": "^11.0.0",
- "eslint-config-standard": "^10.2.1",
- "eslint-plugin-import": "^2.3.0",
- "eslint-plugin-node": "^5.0.0",
- "eslint-plugin-promise": "^3.5.0",
- "eslint-plugin-standard": "^3.0.1",
- "rewire": "^2.5.2"
+ "jasmine": "^3.3.0",
+ "eslint": "^5.0.0",
+ "eslint-config-semistandard": "^13.0.0",
+ "eslint-config-standard": "^12.0.0",
+ "eslint-plugin-import": "^2.14.0",
+ "eslint-plugin-node": "^8.0.0",
+ "eslint-plugin-promise": "^4.0.0",
+ "eslint-plugin-standard": "^4.0.0",
+ "rewire": "^4.0.1"
},
"engines": {
"node": ">= 6",
diff --git a/src/browser.js b/src/browser.js
index cbd77eb..289ac68 100644
--- a/src/browser.js
+++ b/src/browser.js
@@ -22,6 +22,7 @@
var child_process = require('child_process');
var fs = require('fs');
var open = require('opn');
+var which = require('which');
var exec = require('./exec');
var NOT_INSTALLED = 'The browser target is not installed: %target%';
@@ -206,7 +207,7 @@
// since that is what all the supported browsers use. Check path (simple but usually won't get a hit)
var promise = new Promise(function (resolve, reject) {
- if (require('shelljs').which(browser)) {
+ if (which.sync(browser, { nothrow: true })) {
return resolve();
} else {
var regQPre = 'reg QUERY "HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\';
diff --git a/src/exec.js b/src/exec.js
index 76d4d0c..a76a83d 100644
--- a/src/exec.js
+++ b/src/exec.js
@@ -30,7 +30,7 @@
module.exports = function (cmd, opt_cwd) {
return new Promise(function (resolve, reject) {
try {
- var opt = {cwd: opt_cwd, maxBuffer: 1024000};
+ var opt = { cwd: opt_cwd, maxBuffer: 1024000 };
var timerID = 0;
if (process.platform === 'linux') {
timerID = setTimeout(function () {