diff --git a/lib/config.js b/lib/config.js index 95cdbb7..56606d5 100644 --- a/lib/config.js +++ b/lib/config.js @@ -1,8 +1,8 @@ var mkdirp = require( 'mkdirp' ), fs = require( 'fs' ), path = require( 'path' ), - package = require( '../package' ), - defaultConfigFile = require( 'osenv' ).home() + '/.config/' + package.name + '/config.json'; + packageJson = require( '../package' ), + defaultConfigFile = require( 'osenv' ).home() + '/.config/' + packageJson.name + '/config.json'; exports.defaultConfigFile = defaultConfigFile; diff --git a/lib/detect.js b/lib/detect.js index 828ac0a..cf2161e 100644 --- a/lib/detect.js +++ b/lib/detect.js @@ -7,7 +7,7 @@ var spawn = require( 'child_process' ).spawn, name: 'chrome', re: /Google Chrome (\S+)/, type: 'chrome', - profile: true, + profile: true }, 'google-chrome-canary': { name: 'canary', @@ -19,26 +19,26 @@ var spawn = require( 'child_process' ).spawn, name: 'chromium', re: /Chromium (\S+)/, type: 'chrome', - profile: true, + profile: true }, 'chromium-browser': { name: 'chromium', re: /Chromium (\S+)/, type: 'chrome', - profile: true, + profile: true }, 'firefox': { name: 'firefox', re: /Mozilla Firefox (\S+)/, type: 'firefox', - profile: true, + profile: true }, 'phantomjs': { name: 'phantomjs', re: /(\S+)/, type: 'phantom', headless: true, - profile: false, + profile: false }, 'safari': { name: 'safari', diff --git a/lib/run.js b/lib/run.js index 223dd1e..ea1d487 100644 --- a/lib/run.js +++ b/lib/run.js @@ -39,7 +39,7 @@ setups.firefox = function( browser, uri, options, callback ) { host = JSON.stringify( match[ 1 ] ), port = match[ 2 ] || 80; - _.extend( prefs, { + _.assign( prefs, { 'network.proxy.http': host, 'network.proxy.http_port': +port, 'network.proxy.type': 1, @@ -53,7 +53,7 @@ setups.firefox = function( browser, uri, options, callback ) { } if ( options.prefs ) { - _.extend( prefs, options.prefs ); + _.assign( prefs, options.prefs ); } prefs = Object.keys( prefs ).map( function( name ) { @@ -284,7 +284,7 @@ module.exports = function runBrowser( config, name, version ) { browser.tempDir = options.tempDir; - callback( null, new Instance( _.extend( {}, browser, { + callback( null, new Instance( _.assign( {}, browser, { args: args, detached: options.detached, env: env, diff --git a/package.json b/package.json index 0ba1045..91e83c8 100644 --- a/package.json +++ b/package.json @@ -11,14 +11,14 @@ "res": "res" }, "dependencies": { - "headless": "^0.1.7", - "lodash": "^2.4.1", + "headless": "^1.0.0", + "lodash": "^4.5.1", "mkdirp": "^0.5.0", "osenv": "^0.1.0", "plist": "^1.0.1", - "win-detect-browsers": "^1.0.1", + "win-detect-browsers": "^2.1.0", "uid": "0.0.2", - "rimraf": "~2.2.8" + "rimraf": "~2.5.2" }, "repository": { "type": "git", @@ -49,7 +49,7 @@ "node": ">=0.8" }, "devDependencies": { - "jscs": "^1.5.8", + "jscs": "^2.10.1", "jshint": "^2.5.2" } }