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.5 to 2.2.6

16

out/adapters/fs.js
"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 });

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

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

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

"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 = __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 = 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);
if (opts.onlyDirectories) {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

*/
EntryFilter.prototype.isMatchToPatterns = function (filepath, patternsRe) {
DeepFilter.prototype.isMatchToPatterns = function (filepath, patternsRe) {
return patternUtils.matchAny(filepath, patternsRe) || patternUtils.matchAny(filepath + '/', patternsRe);
};
return EntryFilter;
return DeepFilter;
}());
exports.default = EntryFilter;
exports.default = DeepFilter;
{
"name": "fast-glob",
"version": "2.2.5",
"version": "2.2.6",
"description": "Is a faster `node-glob` alternative",

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

"tiny-glob": "^0.2.3",
"tslint": "^5.12.0",
"tslint-config-mrmlnc": "^2.0.1",
"tslint": "^5.11.0",
"tslint-config-mrmlnc": "^1.0.0",
"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