Comparing version 2.2.0 to 2.2.1
@@ -45,4 +45,4 @@ "use strict"; | ||
function getNegativePatternsAsPositive(patterns, ignore) { | ||
var negative = patternUtils.getNegativePatterns(patterns); | ||
var positive = negative.map(patternUtils.convertToPositivePattern).concat(ignore); | ||
var negative = patternUtils.getNegativePatterns(patterns).concat(ignore); | ||
var positive = negative.map(patternUtils.convertToPositivePattern); | ||
return positive; | ||
@@ -49,0 +49,0 @@ } |
/// <reference types="node" /> | ||
import * as readdir from '@mrmlnc/readdir-enhanced'; | ||
import Reader from './reader'; | ||
import FileSystemStream from '../adapters/fs-stream'; | ||
import { ITask } from '../managers/tasks'; | ||
@@ -8,2 +9,6 @@ import { EntryItem } from '../types/entries'; | ||
/** | ||
* Returns FileSystem adapter. | ||
*/ | ||
readonly fsAdapter: FileSystemStream; | ||
/** | ||
* Use async API to read entries for Task. | ||
@@ -23,3 +28,3 @@ */ | ||
*/ | ||
staticApi(task: ITask): NodeJS.ReadableStream; | ||
staticApi(task: ITask, options: readdir.Options): NodeJS.ReadableStream; | ||
} |
@@ -21,2 +21,12 @@ "use strict"; | ||
} | ||
Object.defineProperty(ReaderAsync.prototype, "fsAdapter", { | ||
/** | ||
* Returns FileSystem adapter. | ||
*/ | ||
get: function () { | ||
return new fs_stream_1.default(this.options); | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
/** | ||
@@ -47,3 +57,3 @@ * Use async API to read entries for Task. | ||
} | ||
return this.staticApi(task); | ||
return this.staticApi(task, options); | ||
}; | ||
@@ -59,6 +69,4 @@ /** | ||
*/ | ||
ReaderAsync.prototype.staticApi = function (task) { | ||
var fsAdapter = new fs_stream_1.default(this.options); | ||
var filter = this.entryFilter.getFilter(['**'], task.negative); | ||
return fsAdapter.read(task.patterns, filter); | ||
ReaderAsync.prototype.staticApi = function (task, options) { | ||
return this.fsAdapter.read(task.patterns, options.filter); | ||
}; | ||
@@ -65,0 +73,0 @@ return ReaderAsync; |
/// <reference types="node" /> | ||
import * as readdir from '@mrmlnc/readdir-enhanced'; | ||
import Reader from './reader'; | ||
import FileSystemStream from '../adapters/fs-stream'; | ||
import { ITask } from '../managers/tasks'; | ||
export default class ReaderStream extends Reader<NodeJS.ReadableStream> { | ||
/** | ||
* Returns FileSystem adapter. | ||
*/ | ||
readonly fsAdapter: FileSystemStream; | ||
/** | ||
* Use stream API to read entries for Task. | ||
@@ -21,3 +26,3 @@ */ | ||
*/ | ||
staticApi(task: ITask): NodeJS.ReadableStream; | ||
staticApi(task: ITask, options: readdir.Options): NodeJS.ReadableStream; | ||
} |
@@ -34,2 +34,12 @@ "use strict"; | ||
} | ||
Object.defineProperty(ReaderStream.prototype, "fsAdapter", { | ||
/** | ||
* Returns FileSystem adapter. | ||
*/ | ||
get: function () { | ||
return new fs_stream_1.default(this.options); | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
/** | ||
@@ -55,3 +65,3 @@ * Use stream API to read entries for Task. | ||
} | ||
return this.staticApi(task); | ||
return this.staticApi(task, options); | ||
}; | ||
@@ -67,6 +77,4 @@ /** | ||
*/ | ||
ReaderStream.prototype.staticApi = function (task) { | ||
var fsAdapter = new fs_stream_1.default(this.options); | ||
var filter = this.entryFilter.getFilter(['**'], task.negative); | ||
return fsAdapter.read(task.patterns, filter); | ||
ReaderStream.prototype.staticApi = function (task, options) { | ||
return this.fsAdapter.read(task.patterns, options.filter); | ||
}; | ||
@@ -73,0 +81,0 @@ return ReaderStream; |
import * as readdir from '@mrmlnc/readdir-enhanced'; | ||
import Reader from './reader'; | ||
import FileSystemSync from '../adapters/fs-sync'; | ||
import { ITask } from '../managers/tasks'; | ||
@@ -7,2 +8,6 @@ import { Entry, EntryItem } from '../types/entries'; | ||
/** | ||
* Returns FileSystem adapter. | ||
*/ | ||
readonly fsAdapter: FileSystemSync; | ||
/** | ||
* Use sync API to read entries for Task. | ||
@@ -22,3 +27,3 @@ */ | ||
*/ | ||
staticApi(task: ITask): Entry[]; | ||
staticApi(task: ITask, options: readdir.Options): Entry[]; | ||
} |
@@ -21,2 +21,12 @@ "use strict"; | ||
} | ||
Object.defineProperty(ReaderSync.prototype, "fsAdapter", { | ||
/** | ||
* Returns FileSystem adapter. | ||
*/ | ||
get: function () { | ||
return new fs_sync_1.default(this.options); | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
/** | ||
@@ -46,3 +56,3 @@ * Use sync API to read entries for Task. | ||
} | ||
return this.staticApi(task); | ||
return this.staticApi(task, options); | ||
}; | ||
@@ -58,6 +68,4 @@ /** | ||
*/ | ||
ReaderSync.prototype.staticApi = function (task) { | ||
var fsAdapter = new fs_sync_1.default(this.options); | ||
var filter = this.entryFilter.getFilter(['**'], task.negative); | ||
return fsAdapter.read(task.patterns, filter); | ||
ReaderSync.prototype.staticApi = function (task, options) { | ||
return this.fsAdapter.read(task.patterns, options.filter); | ||
}; | ||
@@ -64,0 +72,0 @@ return ReaderSync; |
{ | ||
"name": "fast-glob", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"description": "Is a faster `node-glob` alternative", | ||
@@ -26,3 +26,3 @@ "license": "MIT", | ||
"@types/easy-table": "0.0.31", | ||
"@types/execa": "^0.8.1", | ||
"@types/execa": "^0.9.0", | ||
"@types/glob": "^5.0.35", | ||
@@ -36,4 +36,4 @@ "@types/glob-parent": "^3.1.0", | ||
"@types/minimist": "^1.2.0", | ||
"@types/mocha": "^2.2.48", | ||
"@types/node": "^9.4.0", | ||
"@types/mocha": "^5.2.0", | ||
"@types/node": "^9.6.6", | ||
"@types/rimraf": "2.0.2", | ||
@@ -43,13 +43,13 @@ "bash-glob": "^2.0.0", | ||
"easy-table": "^1.1.1", | ||
"execa": "^0.9.0", | ||
"fast-glob": "^2.0.1", | ||
"execa": "^0.10.0", | ||
"fast-glob": "^2.2.0", | ||
"glob": "^7.1.2", | ||
"glob-stream": "^6.1.0", | ||
"globby": "^8.0.0", | ||
"globby": "^8.0.1", | ||
"minimist": "^1.2.0", | ||
"mocha": "^5.0.0", | ||
"mocha": "^5.1.1", | ||
"rimraf": "^2.6.2", | ||
"tslint": "^5.9.1", | ||
"tslint-config-mrmlnc": "^1.0.0", | ||
"typescript": "^2.7.1" | ||
"typescript": "^2.8.3" | ||
}, | ||
@@ -61,3 +61,3 @@ "dependencies": { | ||
"merge2": "^1.2.1", | ||
"micromatch": "^3.1.8" | ||
"micromatch": "^3.1.10" | ||
}, | ||
@@ -64,0 +64,0 @@ "scripts": { |
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
68295
1583
Updatedmicromatch@^3.1.10