test-exclude
Advanced tools
Comparing version
@@ -6,2 +6,10 @@ # Change Log | ||
<a name="4.2.2"></a> | ||
## [4.2.2](https://github.com/istanbuljs/istanbuljs/compare/test-exclude@4.2.1...test-exclude@4.2.2) (2018-06-06) | ||
**Note:** Version bump only for package test-exclude | ||
<a name="4.2.1"></a> | ||
@@ -8,0 +16,0 @@ ## [4.2.1](https://github.com/istanbuljs/istanbuljs/compare/test-exclude@4.2.0...test-exclude@4.2.1) (2018-03-04) |
13
index.js
@@ -1,4 +0,3 @@ | ||
const assign = require('object-assign') | ||
const arrify = require('arrify') | ||
const micromatch = require('micromatch') | ||
const minimatch = require('minimatch') | ||
const path = require('path') | ||
@@ -9,3 +8,3 @@ const readPkgUp = require('read-pkg-up') | ||
function TestExclude (opts) { | ||
assign(this, { | ||
Object.assign(this, { | ||
cwd: process.cwd(), | ||
@@ -23,3 +22,3 @@ include: false, | ||
if (!this.include && !this.exclude && this.configKey) { | ||
assign(this, this.pkgConf(this.configKey, this.configPath)) | ||
Object.assign(this, this.pkgConf(this.configKey, this.configPath)) | ||
} | ||
@@ -90,5 +89,5 @@ | ||
!this.include || | ||
micromatch.any(pathToCheck, this.include, {dot: true})) && | ||
(!micromatch.any(pathToCheck, this.exclude, {dot: true}) || | ||
micromatch.any(pathToCheck, this.excludeNegated, {dot: true})) | ||
this.include.some(include => minimatch(pathToCheck, include, {dot: true}))) && | ||
(!this.exclude.some(exclude => minimatch(pathToCheck, exclude, {dot: true})) || | ||
this.excludeNegated.some(exclude => minimatch(pathToCheck, exclude, {dot: true}))) | ||
} | ||
@@ -95,0 +94,0 @@ |
{ | ||
"name": "test-exclude", | ||
"version": "4.2.1", | ||
"version": "4.2.2", | ||
"description": "test for inclusion or exclusion of paths using pkg-conf and globs", | ||
@@ -31,18 +31,12 @@ "main": "index.js", | ||
"devDependencies": { | ||
"chai": "^3.5.0", | ||
"mocha": "^3.1.2", | ||
"standard": "^9.0.0" | ||
"chai": "^4.1.2", | ||
"mocha": "^5.2.0", | ||
"standard": "^11.0.1" | ||
}, | ||
"dependencies": { | ||
"arrify": "^1.0.1", | ||
"micromatch": "^3.1.8", | ||
"object-assign": "^4.1.0", | ||
"read-pkg-up": "^1.0.1", | ||
"minimatch": "^3.0.4", | ||
"read-pkg-up": "^3.0.0", | ||
"require-main-filename": "^1.0.1" | ||
}, | ||
"greenkeeper": { | ||
"ignore": [ | ||
"read-pkg-up" | ||
] | ||
} | ||
} |
13883
0.93%4
-20%112
-0.88%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated