Socket
Socket
Sign inDemoInstall

micromatch

Package Overview
Dependencies
36
Maintainers
3
Versions
66
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.3.5 to 2.3.6

9

index.js

@@ -40,3 +40,3 @@ /*!

var glob = patterns[i++];
if (glob.charCodeAt(0) === 33 /* ! */) {
if (typeof glob === 'string' && glob.charCodeAt(0) === 33 /* ! */) {
omit.push.apply(omit, match(files, glob.slice(1), opts));

@@ -153,3 +153,3 @@ } else {

return function (fp) {
return function(fp) {
if (fp == null) return [];

@@ -357,3 +357,3 @@ var len = patternMatchers.length, i = 0;

// we're only here if a bad pattern was used and the user
// passed `options.silent`, match nothing
// passed `options.silent`, so match nothing
return /$^/;

@@ -381,3 +381,3 @@ }

/**
* Wrap `toRegex` to memoize the generated regex
* Wrap `toRegex` to memoize the generated regex when
* the string and options don't change

@@ -416,2 +416,3 @@ */

/* eslint no-multi-spaces: 0 */
micromatch.any = any;

@@ -418,0 +419,0 @@ micromatch.braces = micromatch.braceExpand = utils.braces;

@@ -26,3 +26,3 @@ 'use strict';

'[': /\[/g,
']': /\]/g,
']': /\]/g
};

@@ -44,3 +44,3 @@

'[': '__UNESC_LTBRACK__',
']': '__UNESC_RTBRACK__',
']': '__UNESC_RTBRACK__'
};

@@ -64,3 +64,3 @@

'[': '__TEMP_LTBRACK__',
']': '__TEMP_RTBRACK__',
']': '__TEMP_RTBRACK__'
};

@@ -67,0 +67,0 @@

@@ -121,3 +121,2 @@ /*!

// special patterns

@@ -140,7 +139,7 @@ glob._replace('[!', '[^');

if (opts.globstar !== false && glob.pattern === '**') {
glob.pattern = globstar(opts.dot);
glob.pattern = globstar(opts.dot);
} else {
// '/*/*/*' => '(?:/*){3}'
glob._replace(/(\/\*)+/g, function (match) {
glob._replace(/(\/\*)+/g, function(match) {
var len = match.length / 2;

@@ -186,3 +185,3 @@ if (len === 1) { return match; }

glob._replace(/\?+/g, function (match) {
glob._replace(/\?+/g, function(match) {
var len = match.length;

@@ -261,3 +260,3 @@ if (len === 1) {

function negateSlash(str) {
return str.replace(/\[\^([^\]]*?)\]/g, function (match, inner) {
return str.replace(/\[\^([^\]]*?)\]/g, function(match, inner) {
if (inner.indexOf('/') === -1) {

@@ -294,2 +293,3 @@ inner = '\\/' + inner;

/* eslint no-multi-spaces: 0 */
var qmark = '[^/]';

@@ -296,0 +296,0 @@ var star = qmark + '*?';

'use strict';
var win32 = process && process.platform === 'win32';
var path = require('path');
var fileRe = require('filename-regex');
var win32 = process && process.platform === 'win32';
var utils = require('lazy-cache')(require);

@@ -13,2 +13,3 @@

/* eslint-disable no-undef */
var fn = require;

@@ -35,2 +36,8 @@ require = utils;

/**
* Restore `require`
*/
require = fn;
/**
* Get the filename of a filepath

@@ -56,3 +63,3 @@ *

utils.isPath = function isPath(pattern, opts) {
return function (fp) {
return function(fp) {
return pattern === utils.unixify(fp, opts);

@@ -71,3 +78,3 @@ };

utils.hasPath = function hasPath(pattern, opts) {
return function (fp) {
return function(fp) {
return utils.unixify(pattern, opts).indexOf(fp) !== -1;

@@ -101,3 +108,3 @@ };

utils.hasFilename = function hasFilename(re) {
return function (fp) {
return function(fp) {
var name = utils.filename(fp);

@@ -154,8 +161,2 @@ return name && re.test(name);

/**
* Restore `require`
*/
require = fn;
/**
* Expose `utils`

@@ -162,0 +163,0 @@ */

{
"name": "micromatch",
"description": "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just use `micromatch.isMatch()` instead of `minimatch()`, or use `micromatch()` instead of `multimatch()`.",
"version": "2.3.5",
"version": "2.3.6",
"homepage": "https://github.com/jonschlinkert/micromatch",

@@ -26,3 +26,3 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",

"array-unique": "^0.2.1",
"braces": "^1.8.1",
"braces": "^1.8.2",
"expand-brackets": "^0.1.4",

@@ -34,4 +34,4 @@ "extglob": "^0.3.1",

"kind-of": "^3.0.2",
"lazy-cache": "^0.2.3",
"normalize-path": "^2.0.0",
"lazy-cache": "^1.0.0",
"normalize-path": "^2.0.1",
"object.omit": "^2.0.0",

@@ -45,11 +45,10 @@ "parse-glob": "^3.0.4",

"gulp": "^3.9.0",
"gulp-eslint": "^1.1.1",
"gulp-istanbul": "^0.10.1",
"gulp-jshint": "^1.11.2",
"gulp-mocha": "^2.1.3",
"jshint-stylish": "^2.0.1",
"minimatch": "^3.0.0",
"minimist": "^1.2.0",
"mocha": "^2.3.3",
"mocha": "*",
"multimatch": "^2.0.0",
"should": "^7.1.0",
"should": "*",
"write": "^0.2.1"

@@ -86,7 +85,2 @@ },

"verb": {
"deps": {
"ignore": [
"browser.js"
]
},
"related": {

@@ -93,0 +87,0 @@ "list": [

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