Socket
Socket
Sign inDemoInstall

fast-glob

Package Overview
Dependencies
80
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.2.4 to 2.2.5

out/utils/stream.d.ts

2

out/adapters/fs-stream.js

@@ -8,3 +8,3 @@ "use strict";

return extendStatics(d, b);
}
};
return function (d, b) {

@@ -11,0 +11,0 @@ extendStatics(d, b);

@@ -8,3 +8,3 @@ "use strict";

return extendStatics(d, b);
}
};
return function (d, b) {

@@ -11,0 +11,0 @@ extendStatics(d, b);

"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -18,6 +29,3 @@ var path = require("path");

FileSystem.prototype.makeEntry = function (stat, pattern) {
return Object.assign(stat, {
path: pattern,
depth: pattern.split('/').length
});
return __assign({}, stat, { path: pattern, depth: pattern.split('/').length });
};

@@ -24,0 +32,0 @@ return FileSystem;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var merge2 = require("merge2");
var optionsManager = require("./managers/options");

@@ -10,2 +9,3 @@ var taskManager = require("./managers/tasks");

var arrayUtils = require("./utils/array");
var streamUtils = require("./utils/stream");
/**

@@ -40,3 +40,3 @@ * Synchronous API.

var works = getWorks(source, reader_stream_1.default, opts);
return merge2(works);
return streamUtils.merge(works);
}

@@ -43,0 +43,0 @@ exports.stream = stream;

"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
function prepare(options) {
var opts = Object.assign({
cwd: process.cwd(),
deep: true,
ignore: [],
dot: false,
stats: false,
onlyFiles: true,
onlyDirectories: false,
followSymlinkedDirectories: true,
unique: true,
markDirectories: false,
absolute: false,
nobrace: false,
brace: true,
noglobstar: false,
globstar: true,
noext: false,
extension: true,
nocase: false,
case: true,
matchBase: false,
transform: null
}, options);
var opts = __assign({ cwd: process.cwd(), deep: true, ignore: [], dot: false, stats: false, onlyFiles: true, onlyDirectories: false, followSymlinkedDirectories: true, unique: true, markDirectories: false, absolute: false, nobrace: false, brace: true, noglobstar: false, globstar: true, noext: false, extension: true, nocase: false, case: true, matchBase: false, transform: null }, options);
if (opts.onlyDirectories) {

@@ -28,0 +17,0 @@ opts.onlyFiles = false;

@@ -81,7 +81,7 @@ "use strict";

dynamic: dynamic,
patterns: [].concat(positive, negative.map(patternUtils.convertToNegativePattern)),
positive: positive,
negative: negative
negative: negative,
patterns: [].concat(positive, negative.map(patternUtils.convertToNegativePattern))
};
}
exports.convertPatternGroupToTask = convertPatternGroupToTask;

@@ -5,3 +5,3 @@ import micromatch = require('micromatch');

import { Pattern } from '../../types/patterns';
export default class DeepFilter {
export default class EntryFilter {
private readonly options;

@@ -8,0 +8,0 @@ private readonly micromatchOptions;

@@ -5,4 +5,4 @@ "use strict";

var patternUtils = require("../../utils/pattern");
var DeepFilter = /** @class */ (function () {
function DeepFilter(options, micromatchOptions) {
var EntryFilter = /** @class */ (function () {
function EntryFilter(options, micromatchOptions) {
this.options = options;

@@ -15,3 +15,3 @@ this.micromatchOptions = micromatchOptions;

*/
DeepFilter.prototype.getFilter = function (positive, negative) {
EntryFilter.prototype.getFilter = function (positive, negative) {
var _this = this;

@@ -25,3 +25,3 @@ var positiveRe = patternUtils.convertPatternsToRe(positive, this.micromatchOptions);

*/
DeepFilter.prototype.filter = function (entry, positiveRe, negativeRe) {
EntryFilter.prototype.filter = function (entry, positiveRe, negativeRe) {
// Exclude duplicate results

@@ -46,3 +46,3 @@ if (this.options.unique) {

*/
DeepFilter.prototype.isDuplicateEntry = function (entry) {
EntryFilter.prototype.isDuplicateEntry = function (entry) {
return this.index.has(entry.path);

@@ -53,3 +53,3 @@ };

*/
DeepFilter.prototype.createIndexRecord = function (entry) {
EntryFilter.prototype.createIndexRecord = function (entry) {
this.index.set(entry.path, undefined);

@@ -60,3 +60,3 @@ };

*/
DeepFilter.prototype.onlyFileFilter = function (entry) {
EntryFilter.prototype.onlyFileFilter = function (entry) {
return this.options.onlyFiles && !entry.isFile();

@@ -67,3 +67,3 @@ };

*/
DeepFilter.prototype.onlyDirectoryFilter = function (entry) {
EntryFilter.prototype.onlyDirectoryFilter = function (entry) {
return this.options.onlyDirectories && !entry.isDirectory();

@@ -74,3 +74,3 @@ };

*/
DeepFilter.prototype.isSkippedByAbsoluteNegativePatterns = function (entry, negativeRe) {
EntryFilter.prototype.isSkippedByAbsoluteNegativePatterns = function (entry, negativeRe) {
if (!this.options.absolute) {

@@ -88,7 +88,7 @@ return false;

*/
DeepFilter.prototype.isMatchToPatterns = function (filepath, patternsRe) {
EntryFilter.prototype.isMatchToPatterns = function (filepath, patternsRe) {
return patternUtils.matchAny(filepath, patternsRe) || patternUtils.matchAny(filepath + '/', patternsRe);
};
return DeepFilter;
return EntryFilter;
}());
exports.default = DeepFilter;
exports.default = EntryFilter;

@@ -8,3 +8,3 @@ "use strict";

return extendStatics(d, b);
}
};
return function (d, b) {

@@ -11,0 +11,0 @@ extendStatics(d, b);

@@ -8,3 +8,3 @@ "use strict";

return extendStatics(d, b);
}
};
return function (d, b) {

@@ -58,3 +58,3 @@ extendStatics(d, b);

return readable
.once('error', function (err) { return _this.isEnoentCodeError(err) ? null : transform.emit('error', err); })
.on('error', function (err) { return _this.isEnoentCodeError(err) ? null : transform.emit('error', err); })
.pipe(transform);

@@ -61,0 +61,0 @@ };

@@ -8,3 +8,3 @@ "use strict";

return extendStatics(d, b);
}
};
return function (d, b) {

@@ -11,0 +11,0 @@ extendStatics(d, b);

{
"name": "fast-glob",
"version": "2.2.4",
"version": "2.2.5",
"description": "Is a faster `node-glob` alternative",

@@ -50,4 +50,4 @@ "license": "MIT",

"tiny-glob": "^0.2.3",
"tslint": "^5.11.0",
"tslint-config-mrmlnc": "^1.0.0",
"tslint": "^5.12.0",
"tslint-config-mrmlnc": "^2.0.1",
"typescript": "^3.1.3"

@@ -54,0 +54,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc