Socket
Socket
Sign inDemoInstall

minimatch

Package Overview
Dependencies
Maintainers
1
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minimatch - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

a

23

browser.js

@@ -446,2 +446,25 @@ (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

// handle the case where we left a class open.
// "[z-a]" is valid, equivalent to "\[z-a\]"
if (inClass) {
// split where the last [ was, make sure we don't have
// an invalid re. if so, re-walk the contents of the
// would-be class to re-translate any characters that
// were passed through as-is
// TODO: It would probably be faster to determine this
// without a try/catch and a new RegExp, but it's tricky
// to do safely. For now, this is safe and works.
var cs = pattern.substring(classStart + 1, i)
try {
new RegExp('[' + cs + ']')
} catch (er) {
// not a valid class!
var sp = this.parse(cs, SUBPARSE)
re = re.substr(0, reClassStart) + "\\[" + sp[0]
hasMagic = hasMagic || sp[1]
inClass = false
continue
}
}
// finish up the class.

@@ -448,0 +471,0 @@ hasMagic = true

@@ -444,2 +444,25 @@ module.exports = minimatch

// handle the case where we left a class open.
// "[z-a]" is valid, equivalent to "\[z-a\]"
if (inClass) {
// split where the last [ was, make sure we don't have
// an invalid re. if so, re-walk the contents of the
// would-be class to re-translate any characters that
// were passed through as-is
// TODO: It would probably be faster to determine this
// without a try/catch and a new RegExp, but it's tricky
// to do safely. For now, this is safe and works.
var cs = pattern.substring(classStart + 1, i)
try {
new RegExp('[' + cs + ']')
} catch (er) {
// not a valid class!
var sp = this.parse(cs, SUBPARSE)
re = re.substr(0, reClassStart) + "\\[" + sp[0]
hasMagic = hasMagic || sp[1]
inClass = false
continue
}
}
// finish up the class.

@@ -446,0 +469,0 @@ hasMagic = true

2

package.json

@@ -5,3 +5,3 @@ {

"description": "a glob matcher in javascript",
"version": "2.0.1",
"version": "2.0.2",
"repository": {

@@ -8,0 +8,0 @@ "type": "git",

@@ -254,3 +254,5 @@ // http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test

, 'a/b/.x/c/d/e' ] ]
, "https://github.com/isaacs/minimatch/issues/59",
, ["[z-a]", []]
, ["a/[2015-03-10T00:23:08.647Z]/z", []]
]

@@ -351,3 +353,6 @@

'/^(?:(?!\\.)(?=.)[^/]*?\\.(?:(?!js)[^/]*?))$/',
'/^(?:(?:(?!(?:\\/|^)\\.).)*?\\/\\.x\\/(?:(?!(?:\\/|^)\\.).)*?)$/' ]
'/^(?:(?:(?!(?:\\/|^)\\.).)*?\\/\\.x\\/(?:(?!(?:\\/|^)\\.).)*?)$/',
'/^(?:\\[z\\-a\\])$/',
'/^(?:a\\/\\[2015\\-03\\-10T00:23:08\\.647Z\\]\\/z)$/'
]
var re = 0;

@@ -373,3 +378,5 @@

var expectRe = regexps[re++]
expectRe = '/' + expectRe.slice(1, -1).replace(new RegExp('([^\\\\])/', 'g'), '$1\\\/') + '/'
tapOpts.re = String(r) || JSON.stringify(r)
tapOpts.re = '/' + tapOpts.re.slice(1, -1).replace(new RegExp('([^\\\\])/', 'g'), '$1\\\/') + '/'
tapOpts.files = JSON.stringify(f)

@@ -376,0 +383,0 @@ tapOpts.pattern = pattern

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc