diff options
author | isaacs <i@izs.me> | 2014-06-29 21:26:48 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2014-06-29 21:26:48 +0400 |
commit | 9652678045d1e703fc5c821bf75ba229bbec6424 (patch) | |
tree | 2c2c839c82f1bc69415008b4f36c0bcf8d56cdd4 | |
parent | 0305df7e976a11584b589010d26e0cfb7e847f92 (diff) |
glob@4.0.3
-rw-r--r-- | node_modules/glob/glob.js | 6 | ||||
-rw-r--r-- | node_modules/glob/package.json | 36 | ||||
-rw-r--r-- | node_modules/glob/test/bash-results.json | 1 | ||||
-rw-r--r-- | node_modules/glob/test/error-callback.js | 4 | ||||
-rw-r--r-- | node_modules/glob/test/nocase-nomagic.js | 3 | ||||
-rw-r--r-- | package.json | 2 |
6 files changed, 23 insertions, 29 deletions
diff --git a/node_modules/glob/glob.js b/node_modules/glob/glob.js index b55ac8c09..36bbba84c 100644 --- a/node_modules/glob/glob.js +++ b/node_modules/glob/glob.js @@ -36,8 +36,10 @@ module.exports = glob -var fs = require("fs") -, minimatch = require("minimatch") +var fs +try { fs = require("graceful-fs") } catch (e) { fs = require("fs") } + +var minimatch = require("minimatch") , Minimatch = minimatch.Minimatch , inherits = require("inherits") , EE = require("events").EventEmitter diff --git a/node_modules/glob/package.json b/node_modules/glob/package.json index 2e0b69603..f479f06eb 100644 --- a/node_modules/glob/package.json +++ b/node_modules/glob/package.json @@ -6,7 +6,7 @@ }, "name": "glob", "description": "a little globber", - "version": "4.0.2", + "version": "4.0.3", "repository": { "type": "git", "url": "git://github.com/isaacs/node-glob.git" @@ -15,10 +15,14 @@ "engines": { "node": "*" }, + "optionalDependencies": { + "graceful-fs": "^3.0.2" + }, "dependencies": { "inherits": "2", "minimatch": "^0.3.0", - "once": "^1.3.0" + "once": "^1.3.0", + "graceful-fs": "^3.0.2" }, "devDependencies": { "tap": "~0.4.0", @@ -30,30 +34,14 @@ "test-regen": "TEST_REGEN=1 node test/00-setup.js" }, "license": "BSD", - "gitHead": "4e85a5bcb2f28f82fa9836b6b2baba8af8e31e96", + "readme": "# Glob\n\nMatch files using the patterns the shell uses, like stars and stuff.\n\nThis is a glob implementation in JavaScript. It uses the `minimatch`\nlibrary to do its matching.\n\n## Attention: node-glob users!\n\nThe API has changed dramatically between 2.x and 3.x. This library is\nnow 100% JavaScript, and the integer flags have been replaced with an\noptions object.\n\nAlso, there's an event emitter class, proper tests, and all the other\nthings you've come to expect from node modules.\n\nAnd best of all, no compilation!\n\n## Usage\n\n```javascript\nvar glob = require(\"glob\")\n\n// options is optional\nglob(\"**/*.js\", options, function (er, files) {\n // files is an array of filenames.\n // If the `nonull` option is set, and nothing\n // was found, then files is [\"**/*.js\"]\n // er is an error object or null.\n})\n```\n\n## Features\n\nPlease see the [minimatch\ndocumentation](https://github.com/isaacs/minimatch) for more details.\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* [minimatch documentation](https://github.com/isaacs/minimatch)\n\n## glob(pattern, [options], cb)\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* `cb` {Function}\n * `err` {Error | null}\n * `matches` {Array<String>} filenames found matching the pattern\n\nPerform an asynchronous glob search.\n\n## glob.sync(pattern, [options])\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* return: {Array<String>} filenames found matching the pattern\n\nPerform a synchronous glob search.\n\n## Class: glob.Glob\n\nCreate a Glob object by instanting the `glob.Glob` class.\n\n```javascript\nvar Glob = require(\"glob\").Glob\nvar mg = new Glob(pattern, options, cb)\n```\n\nIt's an EventEmitter, and starts walking the filesystem to find matches\nimmediately.\n\n### new glob.Glob(pattern, [options], [cb])\n\n* `pattern` {String} pattern to search for\n* `options` {Object}\n* `cb` {Function} Called when an error occurs, or matches are found\n * `err` {Error | null}\n * `matches` {Array<String>} filenames found matching the pattern\n\nNote that if the `sync` flag is set in the options, then matches will\nbe immediately available on the `g.found` member.\n\n### Properties\n\n* `minimatch` The minimatch object that the glob uses.\n* `options` The options object passed in.\n* `error` The error encountered. When an error is encountered, the\n glob object is in an undefined state, and should be discarded.\n* `aborted` Boolean which is set to true when calling `abort()`. There\n is no way at this time to continue a glob search after aborting, but\n you can re-use the statCache to avoid having to duplicate syscalls.\n* `statCache` Collection of all the stat results the glob search\n performed.\n* `cache` Convenience object. Each field has the following possible\n values:\n * `false` - Path does not exist\n * `true` - Path exists\n * `1` - Path exists, and is not a directory\n * `2` - Path exists, and is a directory\n * `[file, entries, ...]` - Path exists, is a directory, and the\n array value is the results of `fs.readdir`\n\n### Events\n\n* `end` When the matching is finished, this is emitted with all the\n matches found. If the `nonull` option is set, and no match was found,\n then the `matches` list contains the original pattern. The matches\n are sorted, unless the `nosort` flag is set.\n* `match` Every time a match is found, this is emitted with the matched.\n* `error` Emitted when an unexpected error is encountered, or whenever\n any fs error occurs if `options.strict` is set.\n* `abort` When `abort()` is called, this event is raised.\n\n### Methods\n\n* `abort` Stop the search.\n\n### Options\n\nAll the options that can be passed to Minimatch can also be passed to\nGlob to change pattern matching behavior. Also, some have been added,\nor have glob-specific ramifications.\n\nAll options are false by default, unless otherwise noted.\n\nAll options are added to the glob object, as well.\n\n* `cwd` The current working directory in which to search. Defaults\n to `process.cwd()`.\n* `root` The place where patterns starting with `/` will be mounted\n onto. Defaults to `path.resolve(options.cwd, \"/\")` (`/` on Unix\n systems, and `C:\\` or some such on Windows.)\n* `dot` Include `.dot` files in normal matches and `globstar` matches.\n Note that an explicit dot in a portion of the pattern will always\n match dot files.\n* `nomount` By default, a pattern starting with a forward-slash will be\n \"mounted\" onto the root setting, so that a valid filesystem path is\n returned. Set this flag to disable that behavior.\n* `mark` Add a `/` character to directory matches. Note that this\n requires additional stat calls.\n* `nosort` Don't sort the results.\n* `stat` Set to true to stat *all* results. This reduces performance\n somewhat, and is completely unnecessary, unless `readdir` is presumed\n to be an untrustworthy indicator of file existence. It will cause\n ELOOP to be triggered one level sooner in the case of cyclical\n symbolic links.\n* `silent` When an unusual error is encountered\n when attempting to read a directory, a warning will be printed to\n stderr. Set the `silent` option to true to suppress these warnings.\n* `strict` When an unusual error is encountered\n when attempting to read a directory, the process will just continue on\n in search of other matches. Set the `strict` option to raise an error\n in these cases.\n* `cache` See `cache` property above. Pass in a previously generated\n cache object to save some fs calls.\n* `statCache` A cache of results of filesystem information, to prevent\n unnecessary stat calls. While it should not normally be necessary to\n set this, you may pass the statCache from one glob() call to the\n options object of another, if you know that the filesystem will not\n change between calls. (See \"Race Conditions\" below.)\n* `sync` Perform a synchronous glob search.\n* `nounique` In some cases, brace-expanded patterns can result in the\n same file showing up multiple times in the result set. By default,\n this implementation prevents duplicates in the result set.\n Set this flag to disable that behavior.\n* `nonull` Set to never return an empty set, instead returning a set\n containing the pattern itself. This is the default in glob(3).\n* `nocase` Perform a case-insensitive match. Note that case-insensitive\n filesystems will sometimes result in glob returning results that are\n case-insensitively matched anyway, since readdir and stat will not\n raise an error.\n* `debug` Set to enable debug logging in minimatch and glob.\n* `globDebug` Set to enable debug logging in glob, but not minimatch.\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between node-glob 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 glob returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`glob.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\n## Windows\n\n**Please only use forward-slashes in glob expressions.**\n\nThough windows uses either `/` or `\\` as its path separator, only `/`\ncharacters are used by this glob implementation. You must use\nforward-slashes **only** in glob expressions. Back-slashes will always\nbe interpreted as escape characters, not path separators.\n\nResults from absolute patterns such as `/foo/*` are mounted onto the\nroot setting using `path.join`. On windows, this will by default result\nin `/foo/*` matching `C:\\foo\\bar.txt`.\n\n## Race Conditions\n\nGlob searching, by its very nature, is susceptible to race conditions,\nsince it relies on directory walking and such.\n\nAs a result, it is possible that a file that exists when glob looks for\nit may have been deleted or modified by the time it returns the result.\n\nAs part of its internal implementation, this program caches all stat\nand readdir calls that it makes, in order to cut down on system\noverhead. However, this also makes it even more susceptible to races,\nespecially if the cache or statCache objects are reused between glob\ncalls.\n\nUsers are thus advised not to use a glob result as a guarantee of\nfilesystem state in the face of rapid changes. For the vast majority\nof operations, this is never a problem.\n", + "readmeFilename": "README.md", + "gitHead": "3e6881cb2c584f540c814476629b5bbdfccf36f2", "bugs": { "url": "https://github.com/isaacs/node-glob/issues" }, "homepage": "https://github.com/isaacs/node-glob", - "_id": "glob@4.0.2", - "_shasum": "d57dbdf54984dd7635c8247d1f2ebde2e81f4ee1", - "_from": "glob@latest", - "_npmVersion": "1.4.13", - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "dist": { - "shasum": "d57dbdf54984dd7635c8247d1f2ebde2e81f4ee1", - "tarball": "http://registry.npmjs.org/glob/-/glob-4.0.2.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/glob/-/glob-4.0.2.tgz", - "readme": "ERROR: No README data found!" + "_id": "glob@4.0.3", + "_shasum": "cb30c860359801cb7d56436976888fc4a09a35db", + "_from": "glob@latest" } diff --git a/node_modules/glob/test/bash-results.json b/node_modules/glob/test/bash-results.json index 726d332e7..9b5796d6c 100644 --- a/node_modules/glob/test/bash-results.json +++ b/node_modules/glob/test/bash-results.json @@ -283,6 +283,7 @@ "{./*/*,/tmp/glob-test/*}": [ "./examples/g.js", "./examples/usr-local.js", + "./node_modules/graceful-fs", "./node_modules/inherits", "./node_modules/minimatch", "./node_modules/mkdirp", diff --git a/node_modules/glob/test/error-callback.js b/node_modules/glob/test/error-callback.js index 0b64aadf3..629eb2843 100644 --- a/node_modules/glob/test/error-callback.js +++ b/node_modules/glob/test/error-callback.js @@ -1,4 +1,6 @@ -var fs = require('fs') +var fs +try { fs = require('graceful-fs') } catch (e) { fs = require('fs') } +var fs = require('graceful-fs') var test = require('tap').test var glob = require('../') diff --git a/node_modules/glob/test/nocase-nomagic.js b/node_modules/glob/test/nocase-nomagic.js index 162aaa1a6..5a29b0859 100644 --- a/node_modules/glob/test/nocase-nomagic.js +++ b/node_modules/glob/test/nocase-nomagic.js @@ -1,4 +1,5 @@ -var fs = require('fs'); +var fs +try { fs = require('graceful-fs') } catch (e) { fs = require('fs') } var test = require('tap').test; var glob = require('../'); diff --git a/package.json b/package.json index 9e439be8c..4dc781fc6 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "fstream-npm": "~0.1.7", "github-url-from-git": "1.1.1", "github-url-from-username-repo": "~0.2.0", - "glob": "~4.0.2", + "glob": "~4.0.3", "graceful-fs": "~3.0.0", "inflight": "~1.0.1", "ini": "~1.2.0", |