Comparing version 0.10.0 to 0.11.0
@@ -0,1 +1,5 @@ | ||
## 0.11.0 - 2016-08-01 | ||
* Added capability to run tests matched by masks | ||
## 0.10.0 - 2016-08-01 | ||
@@ -2,0 +6,0 @@ |
'use strict'; | ||
var q = require('q'), | ||
fs = require('q-io/fs'), | ||
_ = require('lodash'); | ||
const q = require('q'); | ||
const qfs = require('q-io/fs'); | ||
const _ = require('lodash'); | ||
const glob = require('glob'); | ||
function expandPath(path) { | ||
return fs.stat(path) | ||
.then(function(stat) { | ||
if (!stat.isDirectory()) { | ||
return [path]; | ||
} | ||
return fs.listTree(path, function(path) { | ||
return fs.extension(path) === '.js'; | ||
}); | ||
}) | ||
.catch(function(e) { | ||
return []; | ||
}) | ||
.then(function(paths) { | ||
return paths.map(fs.absolute.bind(fs)); | ||
}); | ||
} | ||
const getFilesByMask = (path) => q.denodeify(glob)(path); | ||
exports.expandPaths = function expandPaths(paths) { | ||
const listJsFiles = (path) => { | ||
return qfs.listTree(path) | ||
.then((paths) => paths.filter((path) => qfs.extension(path) === '.js')); | ||
}; | ||
const expandPath = (path) => { | ||
return qfs.stat(path) | ||
.then((stat) => stat.isDirectory() ? listJsFiles(path) : [path]) | ||
.then((paths) => paths.map((path) => qfs.absolute(path))); | ||
}; | ||
const processPaths = (paths, callback) => { | ||
return _(paths) | ||
.map(expandPath) | ||
.map(callback) | ||
.thru(q.all).value() | ||
.then(_.flatten); | ||
.then(_.flatten) | ||
.then(_.uniq); | ||
}; | ||
exports.expandPaths = (paths) => { | ||
return processPaths(paths, getFilesByMask) | ||
.then((matchedPaths) => processPaths(matchedPaths, expandPath)); | ||
}; |
{ | ||
"name": "hermione", | ||
"version": "0.10.0", | ||
"version": "0.11.0", | ||
"description": "Tests framework based on mocha and wdio", | ||
@@ -27,6 +27,6 @@ "main": "lib/hermione.js", | ||
"dependencies": { | ||
"qemitter": "^1.1.0", | ||
"chalk": "^1.1.1", | ||
"clear-require": "^1.0.1", | ||
"commander": "^2.9.0", | ||
"glob": "^7.0.5", | ||
"inherit": "^2.2.2", | ||
@@ -38,2 +38,3 @@ "lodash": "~3.10.1", | ||
"q-promise-utils": "^1.0.0", | ||
"qemitter": "^1.1.0", | ||
"teamcity-service-messages": "^0.1.6", | ||
@@ -40,0 +41,0 @@ "urijs": "^1.17.0", |
@@ -290,2 +290,5 @@ Hermione | ||
{ | ||
files: 'tests/desktop/*.hermione.js' // run tests matched with a mask | ||
}, | ||
{ | ||
files: 'tests/touch', // run tests associated with this path in a browser with id `browser` | ||
@@ -292,0 +295,0 @@ browsers: ['browser'] // which is configured in option `browsers` |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
229951
464
14
1191
3
+ Addedglob@^7.0.5
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedfs.realpath@1.0.0(transitive)
+ Addedglob@7.2.3(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedwrappy@1.0.2(transitive)