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>2013-11-20 22:05:06 +0400
committerisaacs <i@izs.me>2013-11-20 22:06:42 +0400
commit1b2b78c06620ef8c65e90d6334d95e5c1a17a1b9 (patch)
treef1fc49f82161f2acb4fe04c6ba5b05e6edca74e7 /node_modules/glob
parent2c22228ceeb4ff4ee30907c696c4af11fe551169 (diff)
glob@3.2.7
Diffstat (limited to 'node_modules/glob')
-rw-r--r--node_modules/glob/glob.js5
-rw-r--r--node_modules/glob/package.json7
-rw-r--r--node_modules/glob/test/bash-results.json1
-rw-r--r--node_modules/glob/test/new-glob-optional-options.js10
4 files changed, 20 insertions, 3 deletions
diff --git a/node_modules/glob/glob.js b/node_modules/glob/glob.js
index 176be02f4..7903be18f 100644
--- a/node_modules/glob/glob.js
+++ b/node_modules/glob/glob.js
@@ -84,6 +84,11 @@ function Glob (pattern, options, cb) {
return new Glob(pattern, options, cb)
}
+ if (typeof options === "function") {
+ cb = options
+ options = null
+ }
+
if (typeof cb === "function") {
this.on("error", cb)
this.on("end", function (matches) {
diff --git a/node_modules/glob/package.json b/node_modules/glob/package.json
index 73aa885e7..3ae510111 100644
--- a/node_modules/glob/package.json
+++ b/node_modules/glob/package.json
@@ -6,7 +6,7 @@
},
"name": "glob",
"description": "a little globber",
- "version": "3.2.6",
+ "version": "3.2.7",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-glob.git"
@@ -33,6 +33,7 @@
"bugs": {
"url": "https://github.com/isaacs/node-glob/issues"
},
- "_id": "glob@3.2.6",
- "_from": "glob@latest"
+ "homepage": "https://github.com/isaacs/node-glob",
+ "_id": "glob@3.2.7",
+ "_from": "glob@~3.2.6"
}
diff --git a/node_modules/glob/test/bash-results.json b/node_modules/glob/test/bash-results.json
index 3ffadba68..593215cd9 100644
--- a/node_modules/glob/test/bash-results.json
+++ b/node_modules/glob/test/bash-results.json
@@ -295,6 +295,7 @@
"./test/cwd-test.js",
"./test/globstar-match.js",
"./test/mark.js",
+ "./test/new-glob-optional-options.js",
"./test/nocase-nomagic.js",
"./test/pause-resume.js",
"./test/root-nomount.js",
diff --git a/node_modules/glob/test/new-glob-optional-options.js b/node_modules/glob/test/new-glob-optional-options.js
new file mode 100644
index 000000000..3e7dc5acb
--- /dev/null
+++ b/node_modules/glob/test/new-glob-optional-options.js
@@ -0,0 +1,10 @@
+var Glob = require('../glob.js').Glob;
+var test = require('tap').test;
+
+test('new glob, with cb, and no options', function (t) {
+ new Glob(__filename, function(er, results) {
+ if (er) throw er;
+ t.same(results, [__filename]);
+ t.end();
+ });
+});