@@ -40239,6 +40239,7 @@ module.exports = FastGlob;
4023940239"use strict";
4024040240
4024140241Object.defineProperty(exports, "__esModule", { value: true });
40242+ exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0;
4024240243const utils = __webpack_require__(292);
4024340244function generate(patterns, settings) {
4024440245 const positivePatterns = getPositivePatterns(patterns);
@@ -40310,6 +40311,7 @@ exports.convertPatternGroupToTask = convertPatternGroupToTask;
4031040311"use strict";
4031140312
4031240313Object.defineProperty(exports, "__esModule", { value: true });
40314+ exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = void 0;
4031340315const array = __webpack_require__(293);
4031440316exports.array = array;
4031540317const errno = __webpack_require__(294);
@@ -40333,6 +40335,7 @@ exports.string = string;
4033340335"use strict";
4033440336
4033540337Object.defineProperty(exports, "__esModule", { value: true });
40338+ exports.splitWhen = exports.flatten = void 0;
4033640339function flatten(items) {
4033740340 return items.reduce((collection, item) => [].concat(collection, item), []);
4033840341}
@@ -40361,6 +40364,7 @@ exports.splitWhen = splitWhen;
4036140364"use strict";
4036240365
4036340366Object.defineProperty(exports, "__esModule", { value: true });
40367+ exports.isEnoentCodeError = void 0;
4036440368function isEnoentCodeError(error) {
4036540369 return error.code === 'ENOENT';
4036640370}
@@ -40374,6 +40378,7 @@ exports.isEnoentCodeError = isEnoentCodeError;
4037440378"use strict";
4037540379
4037640380Object.defineProperty(exports, "__esModule", { value: true });
40381+ exports.createDirentFromStats = void 0;
4037740382class DirentFromStats {
4037840383 constructor(name, stats) {
4037940384 this.name = name;
@@ -40399,6 +40404,7 @@ exports.createDirentFromStats = createDirentFromStats;
4039940404"use strict";
4040040405
4040140406Object.defineProperty(exports, "__esModule", { value: true });
40407+ exports.removeLeadingDotSegment = exports.escape = exports.makeAbsolute = exports.unixify = void 0;
4040240408const path = __webpack_require__(4);
4040340409const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; // ./ or .\\
4040440410const UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;
@@ -40438,6 +40444,7 @@ exports.removeLeadingDotSegment = removeLeadingDotSegment;
4043840444"use strict";
4043940445
4044040446Object.defineProperty(exports, "__esModule", { value: true });
40447+ exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0;
4044140448const path = __webpack_require__(4);
4044240449const globParent = __webpack_require__(298);
4044340450const micromatch = __webpack_require__(301);
@@ -40454,6 +40461,14 @@ function isStaticPattern(pattern, options = {}) {
4045440461}
4045540462exports.isStaticPattern = isStaticPattern;
4045640463function isDynamicPattern(pattern, options = {}) {
40464+ /**
40465+ * A special case with an empty string is necessary for matching patterns that start with a forward slash.
40466+ * An empty string cannot be a dynamic pattern.
40467+ * For example, the pattern `/lib/*` will be spread into parts: '', 'lib', '*'.
40468+ */
40469+ if (pattern === '') {
40470+ return false;
40471+ }
4045740472 /**
4045840473 * When the `caseSensitiveMatch` option is disabled, all patterns must be marked as dynamic, because we cannot check
4045940474 * filepath directly (without read directory).
@@ -40528,12 +40543,23 @@ function expandBraceExpansion(pattern) {
4052840543}
4052940544exports.expandBraceExpansion = expandBraceExpansion;
4053040545function getPatternParts(pattern, options) {
40531- const info = picomatch.scan(pattern, Object.assign(Object.assign({}, options), { parts: true }));
40532- // See micromatch/picomatch#58 for more details
40533- if (info.parts.length === 0) {
40534- return [pattern];
40546+ let { parts } = picomatch.scan(pattern, Object.assign(Object.assign({}, options), { parts: true }));
40547+ /**
40548+ * The scan method returns an empty array in some cases.
40549+ * See micromatch/picomatch#58 for more details.
40550+ */
40551+ if (parts.length === 0) {
40552+ parts = [pattern];
40553+ }
40554+ /**
40555+ * The scan method does not return an empty part for the pattern with a forward slash.
40556+ * This is another part of micromatch/picomatch#58.
40557+ */
40558+ if (parts[0].startsWith('/')) {
40559+ parts[0] = parts[0].slice(1);
40560+ parts.unshift('');
4053540561 }
40536- return info. parts;
40562+ return parts;
4053740563}
4053840564exports.getPatternParts = getPatternParts;
4053940565function makeRe(pattern, options) {
@@ -44746,6 +44772,7 @@ module.exports = parse;
4474644772"use strict";
4474744773
4474844774Object.defineProperty(exports, "__esModule", { value: true });
44775+ exports.merge = void 0;
4474944776const merge2 = __webpack_require__(284);
4475044777function merge(streams) {
4475144778 const mergedStream = merge2(streams);
@@ -44769,6 +44796,7 @@ function propagateCloseEventToSources(streams) {
4476944796"use strict";
4477044797
4477144798Object.defineProperty(exports, "__esModule", { value: true });
44799+ exports.isEmpty = exports.isString = void 0;
4477244800function isString(input) {
4477344801 return typeof input === 'string';
4477444802}
@@ -46097,8 +46125,7 @@ class DeepFilter {
4609746125 return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions);
4609846126 }
4609946127 _filter(basePath, entry, matcher, negativeRe) {
46100- const depth = this._getEntryLevel(basePath, entry.path);
46101- if (this._isSkippedByDeep(depth)) {
46128+ if (this._isSkippedByDeep(basePath, entry.path)) {
4610246129 return false;
4610346130 }
4610446131 if (this._isSkippedSymbolicLink(entry)) {
@@ -46110,22 +46137,31 @@ class DeepFilter {
4611046137 }
4611146138 return this._isSkippedByNegativePatterns(filepath, negativeRe);
4611246139 }
46113- _isSkippedByDeep(entryDepth) {
46114- return entryDepth >= this._settings.deep;
46115- }
46116- _isSkippedSymbolicLink(entry) {
46117- return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink();
46140+ _isSkippedByDeep(basePath, entryPath) {
46141+ /**
46142+ * Avoid unnecessary depth calculations when it doesn't matter.
46143+ */
46144+ if (this._settings.deep === Infinity) {
46145+ return false;
46146+ }
46147+ return this._getEntryLevel(basePath, entryPath) >= this._settings.deep;
4611846148 }
4611946149 _getEntryLevel(basePath, entryPath) {
46120- const basePathDepth = basePath.split('/').length;
4612146150 const entryPathDepth = entryPath.split('/').length;
46122- return entryPathDepth - (basePath === '' ? 0 : basePathDepth);
46151+ if (basePath === '') {
46152+ return entryPathDepth;
46153+ }
46154+ const basePathDepth = basePath.split('/').length;
46155+ return entryPathDepth - basePathDepth;
46156+ }
46157+ _isSkippedSymbolicLink(entry) {
46158+ return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink();
4612346159 }
4612446160 _isSkippedByPositivePatterns(entryPath, matcher) {
4612546161 return !this._settings.baseNameMatch && !matcher.match(entryPath);
4612646162 }
46127- _isSkippedByNegativePatterns(entryPath, negativeRe ) {
46128- return !utils.pattern.matchAny(entryPath, negativeRe );
46163+ _isSkippedByNegativePatterns(entryPath, patternsRe ) {
46164+ return !utils.pattern.matchAny(entryPath, patternsRe );
4612946165 }
4613046166}
4613146167exports.default = DeepFilter;
@@ -46253,20 +46289,21 @@ class EntryFilter {
4625346289 return (entry) => this._filter(entry, positiveRe, negativeRe);
4625446290 }
4625546291 _filter(entry, positiveRe, negativeRe) {
46256- if (this._settings.unique) {
46257- if (this._isDuplicateEntry(entry)) {
46258- return false;
46259- }
46260- this._createIndexRecord(entry);
46292+ if (this._settings.unique && this._isDuplicateEntry(entry)) {
46293+ return false;
4626146294 }
4626246295 if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) {
4626346296 return false;
4626446297 }
46265- if (this._isSkippedByAbsoluteNegativePatterns(entry, negativeRe)) {
46298+ if (this._isSkippedByAbsoluteNegativePatterns(entry.path , negativeRe)) {
4626646299 return false;
4626746300 }
4626846301 const filepath = this._settings.baseNameMatch ? entry.name : entry.path;
46269- return this._isMatchToPatterns(filepath, positiveRe) && !this._isMatchToPatterns(entry.path, negativeRe);
46302+ const isMatched = this._isMatchToPatterns(filepath, positiveRe) && !this._isMatchToPatterns(entry.path, negativeRe);
46303+ if (this._settings.unique && isMatched) {
46304+ this._createIndexRecord(entry);
46305+ }
46306+ return isMatched;
4627046307 }
4627146308 _isDuplicateEntry(entry) {
4627246309 return this.index.has(entry.path);
@@ -46280,12 +46317,12 @@ class EntryFilter {
4628046317 _onlyDirectoryFilter(entry) {
4628146318 return this._settings.onlyDirectories && !entry.dirent.isDirectory();
4628246319 }
46283- _isSkippedByAbsoluteNegativePatterns(entry, negativeRe ) {
46320+ _isSkippedByAbsoluteNegativePatterns(entryPath, patternsRe ) {
4628446321 if (!this._settings.absolute) {
4628546322 return false;
4628646323 }
46287- const fullpath = utils.path.makeAbsolute(this._settings.cwd, entry.path );
46288- return this._isMatchToPatterns (fullpath, negativeRe );
46324+ const fullpath = utils.path.makeAbsolute(this._settings.cwd, entryPath );
46325+ return utils.pattern.matchAny (fullpath, patternsRe );
4628946326 }
4629046327 _isMatchToPatterns(entryPath, patternsRe) {
4629146328 const filepath = utils.path.removeLeadingDotSegment(entryPath);
@@ -46475,6 +46512,7 @@ exports.default = ReaderSync;
4647546512"use strict";
4647646513
4647746514Object.defineProperty(exports, "__esModule", { value: true });
46515+ exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
4647846516const fs = __webpack_require__(132);
4647946517const os = __webpack_require__(121);
4648046518const CPU_COUNT = os.cpus().length;
0 commit comments