Comparing version 1.0.1 to 1.0.2
@@ -37,3 +37,3 @@ /** | ||
* | ||
* If `names` is empty, all installed browsers will be used. | ||
* If `names` is empty, or contains `all`, all installed browsers will be used. | ||
* | ||
@@ -45,3 +45,3 @@ * @param {!Array<string>} names | ||
if (names.indexOf('all') !== -1) { | ||
names = module.exports.supported(); | ||
names = []; | ||
} | ||
@@ -60,2 +60,7 @@ | ||
var installed = _.keys(installedByName); | ||
// Opting to use everything? | ||
if (names.length === 0) { | ||
names = installed; | ||
} | ||
var missing = _.difference(names, installed); | ||
@@ -62,0 +67,0 @@ if (missing.length > 0) { |
{ | ||
"name": "wct-local", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "WCT plugin that enables support for local browsers via Selenium", | ||
@@ -49,3 +49,3 @@ "keywords": [ | ||
"launchpad": "^0.4.4", | ||
"lodash": "^2.4.1", | ||
"lodash": "^3.0.1", | ||
"selenium-standalone": "^3.2.0", | ||
@@ -52,0 +52,0 @@ "which": "^1.0.8" |
@@ -0,3 +1,8 @@ | ||
[![NPM version](http://img.shields.io/npm/v/wct-local.svg?style=flat-square)](https://npmjs.org/package/wct-local) | ||
[![Build Status](http://img.shields.io/travis/Polymer/wct-local.svg?style=flat-square)](https://travis-ci.org/Polymer/wct-local) | ||
[![Dependency Status](http://img.shields.io/david/Polymer/wct-local.svg?style=flat-square)](https://david-dm.org/Polymer/wct-local) | ||
[![Gitter](http://img.shields.io/badge/gitter-join%20chat%20%E2%86%92-brightgreen.svg?style=flat-square)](https://gitter.im/Polymer/web-component-tester) | ||
Local browser support for [web-component-tester](https://github.com/Polymer/web-component-tester). | ||
This is currently a dependency of WCT, and tested via it. |
@@ -10,3 +10,19 @@ /** | ||
*/ | ||
var selenium = require('selenium-standalone'); | ||
// Work around a potential npm race condition: | ||
// https://github.com/npm/npm/issues/6624 | ||
function requireSelenium(done, attempt) { | ||
attempt = attempt || 0; | ||
var selenium; | ||
try { | ||
selenium = require('selenium-standalone'); | ||
} catch (error) { | ||
if (attempt > 3) { throw error; } | ||
setTimeout( | ||
requireSelenium.bind(null, done, attempt + 1), | ||
Math.pow(2, attempt) // Exponential backoff to play it safe. | ||
); | ||
} | ||
// All is well. | ||
done(selenium); | ||
} | ||
@@ -35,9 +51,11 @@ var BASE_VERSION = '2.44.0'; | ||
logger: console.log.bind(console), | ||
} | ||
}; | ||
selenium.install(config, function(error) { | ||
if (error) { | ||
console.log(error) | ||
proess.exit(1); | ||
} | ||
requireSelenium(function(selenium) { | ||
selenium.install(config, function(error) { | ||
if (error) { | ||
console.log(error); | ||
proess.exit(1); | ||
} | ||
}); | ||
}); |
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
15461
377
9
Updatedlodash@^3.0.1