Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2014-05-20 02:20:47 +0400
committerisaacs <i@izs.me>2014-05-20 02:21:35 +0400
commit015af8f0c42c1fd87e6521130e645b73f4559ddb (patch)
tree15b19402be0fdf3fc3f09969d238a3abe881dc36 /node_modules/minimatch
parent69bc6b5f01242b29527042bc5280087657fd6784 (diff)
Bump many minor dep versions
abbrev columnify fstream-npm glob ini minimatch npmconf
Diffstat (limited to 'node_modules/minimatch')
-rw-r--r--node_modules/minimatch/README.md4
-rw-r--r--node_modules/minimatch/minimatch.js14
-rw-r--r--node_modules/minimatch/node_modules/sigmund/package.json24
-rw-r--r--node_modules/minimatch/package.json26
-rw-r--r--node_modules/minimatch/test/defaults.js2
5 files changed, 52 insertions, 18 deletions
diff --git a/node_modules/minimatch/README.md b/node_modules/minimatch/README.md
index 978268e27..5b3967ea9 100644
--- a/node_modules/minimatch/README.md
+++ b/node_modules/minimatch/README.md
@@ -157,8 +157,8 @@ Perform a case-insensitive match.
### nonull
When a match is not found by `minimatch.match`, return a list containing
-the pattern itself. When set, an empty list is returned if there are
-no matches.
+the pattern itself if this option is set. When not set, an empty list
+is returned if there are no matches.
### matchBase
diff --git a/node_modules/minimatch/minimatch.js b/node_modules/minimatch/minimatch.js
index c633f89fa..453967894 100644
--- a/node_modules/minimatch/minimatch.js
+++ b/node_modules/minimatch/minimatch.js
@@ -813,11 +813,12 @@ function makeRe () {
}
minimatch.match = function (list, pattern, options) {
+ options = options || {}
var mm = new Minimatch(pattern, options)
list = list.filter(function (f) {
return mm.match(f)
})
- if (options.nonull && !list.length) {
+ if (mm.options.nonull && !list.length) {
list.push(pattern)
}
return list
@@ -853,12 +854,17 @@ function match (f, partial) {
var set = this.set
this.debug(this.pattern, "set", set)
- var splitFile = path.basename(f.join("/")).split("/")
+ // Find the basename of the path by looking for the last non-empty segment
+ var filename;
+ for (var i = f.length - 1; i >= 0; i--) {
+ filename = f[i]
+ if (filename) break
+ }
for (var i = 0, l = set.length; i < l; i ++) {
var pattern = set[i], file = f
if (options.matchBase && pattern.length === 1) {
- file = splitFile
+ file = [filename]
}
var hit = this.matchOne(file, pattern, partial)
if (hit) {
@@ -975,7 +981,7 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) {
}
// no match was found.
// However, in partial mode, we can't say this is necessarily over.
- // If there's more *pattern* left, then
+ // If there's more *pattern* left, then
if (partial) {
// ran out of file
this.debug("\n>>> no match, partial?", file, fr, pattern, pr)
diff --git a/node_modules/minimatch/node_modules/sigmund/package.json b/node_modules/minimatch/node_modules/sigmund/package.json
index cb7e2bd4b..6d0305d0d 100644
--- a/node_modules/minimatch/node_modules/sigmund/package.json
+++ b/node_modules/minimatch/node_modules/sigmund/package.json
@@ -32,11 +32,23 @@
},
"license": "BSD",
"readme": "# sigmund\n\nQuick and dirty signatures for Objects.\n\nThis is like a much faster `deepEquals` comparison, which returns a\nstring key suitable for caches and the like.\n\n## Usage\n\n```javascript\nfunction doSomething (someObj) {\n var key = sigmund(someObj, maxDepth) // max depth defaults to 10\n var cached = cache.get(key)\n if (cached) return cached)\n\n var result = expensiveCalculation(someObj)\n cache.set(key, result)\n return result\n}\n```\n\nThe resulting key will be as unique and reproducible as calling\n`JSON.stringify` or `util.inspect` on the object, but is much faster.\nIn order to achieve this speed, some differences are glossed over.\nFor example, the object `{0:'foo'}` will be treated identically to the\narray `['foo']`.\n\nAlso, just as there is no way to summon the soul from the scribblings\nof a cocain-addled psychoanalyst, there is no way to revive the object\nfrom the signature string that sigmund gives you. In fact, it's\nbarely even readable.\n\nAs with `sys.inspect` and `JSON.stringify`, larger objects will\nproduce larger signature strings.\n\nBecause sigmund is a bit less strict than the more thorough\nalternatives, the strings will be shorter, and also there is a\nslightly higher chance for collisions. For example, these objects\nhave the same signature:\n\n var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]}\n var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']}\n\nLike a good Freudian, sigmund is most effective when you already have\nsome understanding of what you're looking for. It can help you help\nyourself, but you must be willing to do some work as well.\n\nCycles are handled, and cyclical objects are silently omitted (though\nthe key is included in the signature output.)\n\nThe second argument is the maximum depth, which defaults to 10,\nbecause that is the maximum object traversal depth covered by most\ninsurance carriers.\n",
- "readmeFilename": "README.md",
- "bugs": {
- "url": "https://github.com/isaacs/sigmund/issues"
- },
- "homepage": "https://github.com/isaacs/sigmund",
"_id": "sigmund@1.0.0",
- "_from": "sigmund@~1.0.0"
+ "dist": {
+ "shasum": "66a2b3a749ae8b5fb89efd4fcc01dc94fbe02296",
+ "tarball": "http://registry.npmjs.org/sigmund/-/sigmund-1.0.0.tgz"
+ },
+ "_npmVersion": "1.1.48",
+ "_npmUser": {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "_shasum": "66a2b3a749ae8b5fb89efd4fcc01dc94fbe02296",
+ "_from": "sigmund@~1.0.0",
+ "_resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.0.tgz"
}
diff --git a/node_modules/minimatch/package.json b/node_modules/minimatch/package.json
index 9dedca512..36d7df35d 100644
--- a/node_modules/minimatch/package.json
+++ b/node_modules/minimatch/package.json
@@ -6,7 +6,7 @@
},
"name": "minimatch",
"description": "a glob matcher in javascript",
- "version": "0.2.14",
+ "version": "0.3.0",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/minimatch.git"
@@ -29,12 +29,28 @@
"type": "MIT",
"url": "http://github.com/isaacs/minimatch/raw/master/LICENSE"
},
- "readme": "# minimatch\n\nA minimal matching utility.\n\n[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nEventually, it will replace the C binding in node-glob.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\nminimatch(\"bar.foo\", \"*.+(bar|foo)\", { debug: true }) // true, and noisy!\n```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n## Minimatch Class\n\nCreate a minimatch object by instanting the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The options supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n Each row in the\n array corresponds to a brace-expanded pattern. Each item in the row\n corresponds to a single path-part. For example, the pattern\n `{a,b/c}/d` would expand to a set of patterns like:\n\n [ [ a, d ]\n , [ b, c, d ] ]\n\n If a portion of the pattern doesn't have any \"magic\" in it\n (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n will be left as a string rather than converted to a regular\n expression.\n\n* `regexp` Created by the `makeRe` method. A single regular expression\n expressing the entire pattern. This is useful in cases where you wish\n to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if necessary, and return it.\n Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n filename, and match it against a single row in the `regExpSet`. This\n method is mainly for internal use, but is exposed so that it can be\n used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n## Functions\n\nThe top-level exported function has a `cache` property, which is an LRU\ncache set to store 100 items. So, calling these methods repeatedly\nwith the same pattern and options will use the same Minimatch object,\nsaving the cost of parsing it multiple times.\n\n### minimatch(path, pattern, options)\n\nMain export. Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minimatch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`. Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob. If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not explicitly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself. When set, an empty list is returned if there are\nno matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes. For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not.\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n",
- "readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/isaacs/minimatch/issues"
},
"homepage": "https://github.com/isaacs/minimatch",
- "_id": "minimatch@0.2.14",
- "_from": "minimatch@latest"
+ "_id": "minimatch@0.3.0",
+ "_shasum": "275d8edaac4f1bb3326472089e7949c8394699dd",
+ "_from": "minimatch@latest",
+ "_npmVersion": "1.4.10",
+ "_npmUser": {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "dist": {
+ "shasum": "275d8edaac4f1bb3326472089e7949c8394699dd",
+ "tarball": "http://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz"
}
diff --git a/node_modules/minimatch/test/defaults.js b/node_modules/minimatch/test/defaults.js
index 25f1f601c..75e05712d 100644
--- a/node_modules/minimatch/test/defaults.js
+++ b/node_modules/minimatch/test/defaults.js
@@ -237,7 +237,7 @@ tap.test("basic tests", function (t) {
var pattern = c[0]
, expect = c[1].sort(alpha)
- , options = c[2] || {}
+ , options = c[2]
, f = c[3] || files
, tapOpts = c[4] || {}