aboutsummaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/minimatch
diff options
context:
space:
mode:
authorKat Marchán <kzm@sykosomatic.org>2015-07-31 17:08:03 -0700
committerJeremiah Senkpiel <fishrock123@rocketmail.com>2015-08-01 09:45:44 -0700
commitbf63266460f79d1e8ca71fbfd5898211c438ce80 (patch)
tree618e302343a5215270c6416420a374dd1ba9feb3 /deps/npm/node_modules/minimatch
parentd5ab92bcc1f0ddf7ea87a8322824a688dfd43bf5 (diff)
downloadandroid-node-v8-bf63266460f79d1e8ca71fbfd5898211c438ce80.tar.gz
android-node-v8-bf63266460f79d1e8ca71fbfd5898211c438ce80.tar.bz2
android-node-v8-bf63266460f79d1e8ca71fbfd5898211c438ce80.zip
deps: upgrade to npm 2.13.3
PR-URL: https://github.com/nodejs/io.js/pull/2284 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Diffstat (limited to 'deps/npm/node_modules/minimatch')
-rw-r--r--deps/npm/node_modules/minimatch/browser.js64
-rw-r--r--deps/npm/node_modules/minimatch/minimatch.js59
-rw-r--r--deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json4
-rw-r--r--deps/npm/node_modules/minimatch/package.json27
4 files changed, 122 insertions, 32 deletions
diff --git a/deps/npm/node_modules/minimatch/browser.js b/deps/npm/node_modules/minimatch/browser.js
index 967b45c0d6..7d0515920e 100644
--- a/deps/npm/node_modules/minimatch/browser.js
+++ b/deps/npm/node_modules/minimatch/browser.js
@@ -1,4 +1,4 @@
-(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){
+(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.minimatch = f()}})(function(){var define,module,exports;return (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){
module.exports = minimatch
minimatch.Minimatch = Minimatch
@@ -273,6 +273,7 @@ function parse (pattern, isSub) {
var escaping = false
// ? => one single character
var patternListStack = []
+ var negativeLists = []
var plType
var stateChar
var inClass = false
@@ -373,9 +374,13 @@ function parse (pattern, isSub) {
}
plType = stateChar
- patternListStack.push({ type: plType, start: i - 1, reStart: re.length })
+ patternListStack.push({
+ type: plType,
+ start: i - 1,
+ reStart: re.length
+ })
// negation is (?:(?!js)[^/]*)
- re += stateChar === '!' ? '(?:(?!' : '(?:'
+ re += stateChar === '!' ? '(?:(?!(?:' : '(?:'
this.debug('plType %j %j', stateChar, re)
stateChar = false
continue
@@ -389,12 +394,15 @@ function parse (pattern, isSub) {
clearStateChar()
hasMagic = true
re += ')'
- plType = patternListStack.pop().type
+ var pl = patternListStack.pop()
+ plType = pl.type
// negation is (?:(?!js)[^/]*)
// The others are (?:<pattern>)<type>
switch (plType) {
case '!':
- re += '[^/]*?)'
+ negativeLists.push(pl)
+ re += ')[^/]*?)'
+ pl.reEnd = re.length
break
case '?':
case '+':
@@ -508,7 +516,7 @@ function parse (pattern, isSub) {
// and escape any | chars that were passed through as-is for the regexp.
// Go through and escape them, taking care not to double-escape any
// | chars that were already escaped.
- for (var pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
+ for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
var tail = re.slice(pl.reStart + 3)
// maybe some even number of \, then maybe 1 \, followed by a |
tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) {
@@ -551,12 +559,49 @@ function parse (pattern, isSub) {
case '(': addPatternStart = true
}
+ // Hack to work around lack of negative lookbehind in JS
+ // A pattern like: *.!(x).!(y|z) needs to ensure that a name
+ // like 'a.xyz.yz' doesn't match. So, the first negative
+ // lookahead, has to look ALL the way ahead, to the end of
+ // the pattern.
+ for (var n = negativeLists.length - 1; n > -1; n--) {
+ var nl = negativeLists[n]
+
+ var nlBefore = re.slice(0, nl.reStart)
+ var nlFirst = re.slice(nl.reStart, nl.reEnd - 8)
+ var nlLast = re.slice(nl.reEnd - 8, nl.reEnd)
+ var nlAfter = re.slice(nl.reEnd)
+
+ nlLast += nlAfter
+
+ // Handle nested stuff like *(*.js|!(*.json)), where open parens
+ // mean that we should *not* include the ) in the bit that is considered
+ // "after" the negated section.
+ var openParensBefore = nlBefore.split('(').length - 1
+ var cleanAfter = nlAfter
+ for (i = 0; i < openParensBefore; i++) {
+ cleanAfter = cleanAfter.replace(/\)[+*?]?/, '')
+ }
+ nlAfter = cleanAfter
+
+ var dollar = ''
+ if (nlAfter === '' && isSub !== SUBPARSE) {
+ dollar = '$'
+ }
+ var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast
+ re = newRe
+ }
+
// if the re is not "" at this point, then we need to make sure
// it doesn't match against an empty path part.
// Otherwise a/* will match a/, which it should not.
- if (re !== '' && hasMagic) re = '(?=.)' + re
+ if (re !== '' && hasMagic) {
+ re = '(?=.)' + re
+ }
- if (addPatternStart) re = patternStart + re
+ if (addPatternStart) {
+ re = patternStart + re
+ }
// parsing just a piece of a larger pattern.
if (isSub === SUBPARSE) {
@@ -1110,4 +1155,5 @@ module.exports = function (xs, fn) {
return res;
};
-},{}]},{},[1]);
+},{}]},{},[1])(1)
+}); \ No newline at end of file
diff --git a/deps/npm/node_modules/minimatch/minimatch.js b/deps/npm/node_modules/minimatch/minimatch.js
index 5e13d6d5b2..ec4c05c570 100644
--- a/deps/npm/node_modules/minimatch/minimatch.js
+++ b/deps/npm/node_modules/minimatch/minimatch.js
@@ -272,6 +272,7 @@ function parse (pattern, isSub) {
var escaping = false
// ? => one single character
var patternListStack = []
+ var negativeLists = []
var plType
var stateChar
var inClass = false
@@ -372,9 +373,13 @@ function parse (pattern, isSub) {
}
plType = stateChar
- patternListStack.push({ type: plType, start: i - 1, reStart: re.length })
+ patternListStack.push({
+ type: plType,
+ start: i - 1,
+ reStart: re.length
+ })
// negation is (?:(?!js)[^/]*)
- re += stateChar === '!' ? '(?:(?!' : '(?:'
+ re += stateChar === '!' ? '(?:(?!(?:' : '(?:'
this.debug('plType %j %j', stateChar, re)
stateChar = false
continue
@@ -388,12 +393,15 @@ function parse (pattern, isSub) {
clearStateChar()
hasMagic = true
re += ')'
- plType = patternListStack.pop().type
+ var pl = patternListStack.pop()
+ plType = pl.type
// negation is (?:(?!js)[^/]*)
// The others are (?:<pattern>)<type>
switch (plType) {
case '!':
- re += '[^/]*?)'
+ negativeLists.push(pl)
+ re += ')[^/]*?)'
+ pl.reEnd = re.length
break
case '?':
case '+':
@@ -507,7 +515,7 @@ function parse (pattern, isSub) {
// and escape any | chars that were passed through as-is for the regexp.
// Go through and escape them, taking care not to double-escape any
// | chars that were already escaped.
- for (var pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
+ for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
var tail = re.slice(pl.reStart + 3)
// maybe some even number of \, then maybe 1 \, followed by a |
tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) {
@@ -550,12 +558,49 @@ function parse (pattern, isSub) {
case '(': addPatternStart = true
}
+ // Hack to work around lack of negative lookbehind in JS
+ // A pattern like: *.!(x).!(y|z) needs to ensure that a name
+ // like 'a.xyz.yz' doesn't match. So, the first negative
+ // lookahead, has to look ALL the way ahead, to the end of
+ // the pattern.
+ for (var n = negativeLists.length - 1; n > -1; n--) {
+ var nl = negativeLists[n]
+
+ var nlBefore = re.slice(0, nl.reStart)
+ var nlFirst = re.slice(nl.reStart, nl.reEnd - 8)
+ var nlLast = re.slice(nl.reEnd - 8, nl.reEnd)
+ var nlAfter = re.slice(nl.reEnd)
+
+ nlLast += nlAfter
+
+ // Handle nested stuff like *(*.js|!(*.json)), where open parens
+ // mean that we should *not* include the ) in the bit that is considered
+ // "after" the negated section.
+ var openParensBefore = nlBefore.split('(').length - 1
+ var cleanAfter = nlAfter
+ for (i = 0; i < openParensBefore; i++) {
+ cleanAfter = cleanAfter.replace(/\)[+*?]?/, '')
+ }
+ nlAfter = cleanAfter
+
+ var dollar = ''
+ if (nlAfter === '' && isSub !== SUBPARSE) {
+ dollar = '$'
+ }
+ var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast
+ re = newRe
+ }
+
// if the re is not "" at this point, then we need to make sure
// it doesn't match against an empty path part.
// Otherwise a/* will match a/, which it should not.
- if (re !== '' && hasMagic) re = '(?=.)' + re
+ if (re !== '' && hasMagic) {
+ re = '(?=.)' + re
+ }
- if (addPatternStart) re = patternStart + re
+ if (addPatternStart) {
+ re = patternStart + re
+ }
// parsing just a piece of a larger pattern.
if (isSub === SUBPARSE) {
diff --git a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json
index b516138098..2f1bd3d5d2 100644
--- a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json
+++ b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json
@@ -63,7 +63,7 @@
"_id": "concat-map@0.0.1",
"dist": {
"shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b",
- "tarball": "http://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz"
+ "tarball": "https://registrytwo.npmjs.com/concat-map/-/concat-map-0.0.1.tgz"
},
"_from": "concat-map@0.0.1",
"_npmVersion": "1.3.21",
@@ -78,6 +78,6 @@
}
],
"_shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b",
- "_resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "_resolved": "https://registrytwo.npmjs.com/concat-map/-/concat-map-0.0.1.tgz",
"readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/minimatch/package.json b/deps/npm/node_modules/minimatch/package.json
index 2cacae2109..c7c9a089ce 100644
--- a/deps/npm/node_modules/minimatch/package.json
+++ b/deps/npm/node_modules/minimatch/package.json
@@ -6,16 +6,16 @@
},
"name": "minimatch",
"description": "a glob matcher in javascript",
- "version": "2.0.8",
+ "version": "2.0.10",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/minimatch.git"
},
"main": "minimatch.js",
"scripts": {
- "pretest": "standard minimatch.js test/*.js",
+ "posttest": "standard minimatch.js test/*.js",
"test": "tap test/*.js",
- "prepublish": "browserify -o browser.js -e minimatch.js --bare"
+ "prepublish": "browserify -o browser.js -e minimatch.js -s minimatch --bare"
},
"engines": {
"node": "*"
@@ -26,30 +26,30 @@
"devDependencies": {
"browserify": "^9.0.3",
"standard": "^3.7.2",
- "tap": ""
+ "tap": "^1.2.0"
},
"license": "ISC",
"files": [
"minimatch.js",
"browser.js"
],
- "gitHead": "0bc7d9c4b2bc816502184862b45bd090de3406a3",
+ "gitHead": "6afb85f0c324b321f76a38df81891e562693e257",
"bugs": {
"url": "https://github.com/isaacs/minimatch/issues"
},
"homepage": "https://github.com/isaacs/minimatch#readme",
- "_id": "minimatch@2.0.8",
- "_shasum": "0bc20f6bf3570a698ef0ddff902063c6cabda6bf",
- "_from": "minimatch@>=2.0.8 <2.1.0",
- "_npmVersion": "2.10.0",
- "_nodeVersion": "2.0.1",
+ "_id": "minimatch@2.0.10",
+ "_shasum": "8d087c39c6b38c001b97fca7ce6d0e1e80afbac7",
+ "_from": "minimatch@2.0.10",
+ "_npmVersion": "3.1.0",
+ "_nodeVersion": "2.2.1",
"_npmUser": {
"name": "isaacs",
"email": "isaacs@npmjs.com"
},
"dist": {
- "shasum": "0bc20f6bf3570a698ef0ddff902063c6cabda6bf",
- "tarball": "http://registry.npmjs.org/minimatch/-/minimatch-2.0.8.tgz"
+ "shasum": "8d087c39c6b38c001b97fca7ce6d0e1e80afbac7",
+ "tarball": "http://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz"
},
"maintainers": [
{
@@ -58,6 +58,5 @@
}
],
"directories": {},
- "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.8.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz"
}