fast-glob
Advanced tools
Comparing version 3.2.7 to 3.2.8
"use strict"; | ||
const taskManager = require("./managers/tasks"); | ||
const patternManager = require("./managers/patterns"); | ||
const async_1 = require("./providers/async"); | ||
@@ -36,3 +37,3 @@ const stream_1 = require("./providers/stream"); | ||
assertPatternsInput(source); | ||
const patterns = [].concat(source); | ||
const patterns = patternManager.transform([].concat(source)); | ||
const settings = new settings_1.default(options); | ||
@@ -55,3 +56,3 @@ return taskManager.generate(patterns, settings); | ||
function getWorks(source, _Provider, options) { | ||
const patterns = [].concat(source); | ||
const patterns = patternManager.transform([].concat(source)); | ||
const settings = new settings_1.default(options); | ||
@@ -58,0 +59,0 @@ const tasks = taskManager.generate(patterns, settings); |
@@ -15,3 +15,7 @@ import Settings from '../../settings'; | ||
private _isSkippedByAbsoluteNegativePatterns; | ||
/** | ||
* First, just trying to apply patterns to the path. | ||
* Second, trying to apply patterns to the path with final slash. | ||
*/ | ||
private _isMatchToPatterns; | ||
} |
@@ -51,7 +51,11 @@ "use strict"; | ||
} | ||
/** | ||
* First, just trying to apply patterns to the path. | ||
* Second, trying to apply patterns to the path with final slash. | ||
*/ | ||
_isMatchToPatterns(entryPath, patternsRe) { | ||
const filepath = utils.path.removeLeadingDotSegment(entryPath); | ||
return utils.pattern.matchAny(filepath, patternsRe); | ||
return utils.pattern.matchAny(filepath, patternsRe) || utils.pattern.matchAny(filepath + '/', patternsRe); | ||
} | ||
} | ||
exports.default = EntryFilter; |
@@ -10,6 +10,6 @@ "use strict"; | ||
const COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/; | ||
const REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[.*]/; | ||
const REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\(.*\|.*\)/; | ||
const GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\(.*\)/; | ||
const BRACE_EXPANSIONS_SYMBOLS_RE = /{.*(?:,|\.\.).*}/; | ||
const REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[[^[]*]/; | ||
const REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/; | ||
const GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\([^(]*\)/; | ||
const BRACE_EXPANSIONS_SYMBOLS_RE = /{[^,.{]*(?:,|\.\.)[^,.{]*}/; | ||
function isStaticPattern(pattern, options = {}) { | ||
@@ -16,0 +16,0 @@ return !isDynamicPattern(pattern, options); |
{ | ||
"name": "fast-glob", | ||
"version": "3.2.7", | ||
"version": "3.2.8", | ||
"description": "It's a very fast and efficient glob library for Node.js", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -440,3 +440,3 @@ # fast-glob | ||
* path (`string`) — full path relative to the pattern base directory | ||
* dirent ([`fs.Dirent`][node_js_fs_class_fs_dirent]) — instance of `fs.Direct` | ||
* dirent ([`fs.Dirent`][node_js_fs_class_fs_dirent]) — instance of `fs.Dirent` | ||
@@ -443,0 +443,0 @@ > :book: An object is an internal representation of entry, so getting it does not affect performance. |
88283
55
1525