fsevents 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of fsevents might be problematic. Click here for more details.
- package/node_modules/are-we-there-yet/LICENSE +5 -0
- package/node_modules/are-we-there-yet/README.md +2 -1
- package/node_modules/are-we-there-yet/README.md~ +183 -0
- package/node_modules/are-we-there-yet/package.json +10 -9
- package/node_modules/async/README.md +14 -10
- package/node_modules/async/dist/async.js +22 -18
- package/node_modules/async/dist/async.min.js +1 -1
- package/node_modules/async/lib/async.js +22 -18
- package/node_modules/async/package.json +11 -10
- package/node_modules/core-util-is/package.json +2 -1
- package/node_modules/dashdash/README.md +6 -3
- package/node_modules/dashdash/lib/dashdash.js +10 -1
- package/node_modules/dashdash/package.json +9 -8
- package/node_modules/escape-string-regexp/index.js +1 -1
- package/node_modules/escape-string-regexp/package.json +17 -15
- package/node_modules/escape-string-regexp/readme.md +4 -4
- package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md +9 -0
- package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js +42 -30
- package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +9 -9
- package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js +28 -0
- package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/package.json +11 -11
- package/node_modules/graceful-fs/package.json +2 -3
- package/node_modules/isarray/package.json +2 -1
- package/node_modules/mime-db/HISTORY.md +32 -0
- package/node_modules/mime-db/README.md +1 -1
- package/node_modules/mime-db/db.json +78 -0
- package/node_modules/mime-db/package.json +15 -14
- package/node_modules/mime-types/HISTORY.md +12 -0
- package/node_modules/mime-types/package.json +11 -10
- package/node_modules/node-pre-gyp/CHANGELOG.md +8 -0
- package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +32 -0
- package/node_modules/node-pre-gyp/package.json +8 -8
- package/node_modules/{bl/node_modules/readable-stream/node_modules/process-nextick-args → process-nextick-args}/.travis.yml +6 -1
- package/node_modules/{bl/node_modules/readable-stream/node_modules/process-nextick-args → process-nextick-args}/index.js +8 -1
- package/node_modules/{bl/node_modules/readable-stream/node_modules/process-nextick-args → process-nextick-args}/package.json +13 -12
- package/node_modules/rc/lib/utils.js +1 -1
- package/node_modules/rc/package.json +11 -10
- package/node_modules/readable-stream/README.md +27 -6
- package/node_modules/{bl/node_modules/readable-stream → readable-stream}/doc/stream.markdown +608 -574
- package/node_modules/readable-stream/lib/_stream_duplex.js +18 -25
- package/node_modules/readable-stream/lib/_stream_passthrough.js +2 -21
- package/node_modules/readable-stream/lib/_stream_readable.js +117 -93
- package/node_modules/readable-stream/lib/_stream_transform.js +15 -27
- package/node_modules/readable-stream/lib/_stream_writable.js +140 -88
- package/node_modules/readable-stream/package.json +33 -25
- package/node_modules/readable-stream/readable.js +6 -1
- package/node_modules/rimraf/README.md +58 -0
- package/node_modules/rimraf/node_modules/glob/README.md +27 -45
- package/node_modules/rimraf/node_modules/glob/common.js +7 -26
- package/node_modules/rimraf/node_modules/glob/node_modules/inherits/package.json +1 -1
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md +9 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js +42 -30
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +9 -9
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js +28 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +11 -11
- package/node_modules/rimraf/node_modules/glob/package.json +11 -10
- package/node_modules/rimraf/package.json +12 -11
- package/node_modules/rimraf/rimraf.js +7 -5
- package/node_modules/sshpk/bin/sshpk-conv +1 -1
- package/node_modules/sshpk/lib/dhe.js +1 -2
- package/node_modules/sshpk/lib/ssh-buffer.js +2 -1
- package/node_modules/sshpk/package.json +13 -11
- package/node_modules/string_decoder/package.json +2 -1
- package/node_modules/tar-pack/index.js +1 -2
- package/node_modules/tar-pack/node_modules/rimraf/LICENSE +12 -20
- package/node_modules/tar-pack/node_modules/rimraf/README.md +17 -4
- package/node_modules/tar-pack/node_modules/rimraf/bin.js +11 -4
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/README.md +359 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/common.js +226 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/glob.js +752 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/.eslintrc +17 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/LICENSE +15 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/README.md +37 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/inflight.js +44 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/LICENSE +15 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/README.md +36 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json +58 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/test/basic.js +51 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/wrappy.js +33 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/package.json +67 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/test.js +97 -0
- package/node_modules/{bl/node_modules/readable-stream → tar-pack/node_modules/rimraf/node_modules/glob}/node_modules/inherits/package.json +3 -3
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/README.md +216 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/minimatch.js +912 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore +3 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md +122 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js +8 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js +191 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore +2 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml +3 -0
- package/node_modules/tar-pack/node_modules/{readable-stream/node_modules/isarray/README.md → rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md} +0 -33
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile +6 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md +89 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js +5 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js +50 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +79 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js +84 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml +4 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE +18 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown +62 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js +6 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js +13 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json +90 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js +39 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +81 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json +66 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/README.md +51 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/LICENSE +15 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/README.md +36 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/package.json +58 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/test/basic.js +51 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js +33 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/once.js +21 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/package.json +70 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/index.js +20 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/package.json +78 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/readme.md +51 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/package.json +79 -0
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/sync.js +460 -0
- package/node_modules/tar-pack/node_modules/rimraf/package.json +28 -40
- package/node_modules/tar-pack/node_modules/rimraf/rimraf.js +138 -53
- package/node_modules/tar-pack/package.json +21 -11
- package/node_modules/tunnel-agent/index.js +2 -0
- package/node_modules/tunnel-agent/package.json +10 -9
- package/node_modules/{bl/node_modules/readable-stream/node_modules/util-deprecate → util-deprecate}/package.json +3 -2
- package/node_modules/verror/package.json +3 -2
- package/package.json +2 -2
- package/CHANGELOG.md +0 -16
- package/node_modules/bl/node_modules/readable-stream/.npmignore +0 -5
- package/node_modules/bl/node_modules/readable-stream/LICENSE +0 -18
- package/node_modules/bl/node_modules/readable-stream/README.md +0 -36
- package/node_modules/bl/node_modules/readable-stream/duplex.js +0 -1
- package/node_modules/bl/node_modules/readable-stream/lib/_stream_duplex.js +0 -82
- package/node_modules/bl/node_modules/readable-stream/lib/_stream_passthrough.js +0 -27
- package/node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js +0 -973
- package/node_modules/bl/node_modules/readable-stream/lib/_stream_transform.js +0 -197
- package/node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js +0 -527
- package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/LICENSE +0 -19
- package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/README.md +0 -3
- package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/float.patch +0 -604
- package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/lib/util.js +0 -107
- package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/package.json +0 -67
- package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/test.js +0 -68
- package/node_modules/bl/node_modules/readable-stream/node_modules/isarray/README.md +0 -54
- package/node_modules/bl/node_modules/readable-stream/node_modules/isarray/build/build.js +0 -209
- package/node_modules/bl/node_modules/readable-stream/node_modules/isarray/component.json +0 -19
- package/node_modules/bl/node_modules/readable-stream/node_modules/isarray/index.js +0 -3
- package/node_modules/bl/node_modules/readable-stream/node_modules/isarray/package.json +0 -59
- package/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/.npmignore +0 -2
- package/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/LICENSE +0 -20
- package/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/README.md +0 -7
- package/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/index.js +0 -221
- package/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/package.json +0 -60
- package/node_modules/bl/node_modules/readable-stream/package.json +0 -82
- package/node_modules/bl/node_modules/readable-stream/passthrough.js +0 -1
- package/node_modules/bl/node_modules/readable-stream/readable.js +0 -12
- package/node_modules/bl/node_modules/readable-stream/transform.js +0 -1
- package/node_modules/bl/node_modules/readable-stream/writable.js +0 -1
- package/node_modules/node-pre-gyp/LICENSE +0 -27
- package/node_modules/readable-stream/float.patch +0 -923
- package/node_modules/tar-pack/node_modules/readable-stream/.npmignore +0 -5
- package/node_modules/tar-pack/node_modules/readable-stream/LICENSE +0 -18
- package/node_modules/tar-pack/node_modules/readable-stream/README.md +0 -15
- package/node_modules/tar-pack/node_modules/readable-stream/duplex.js +0 -1
- package/node_modules/tar-pack/node_modules/readable-stream/lib/_stream_duplex.js +0 -89
- package/node_modules/tar-pack/node_modules/readable-stream/lib/_stream_passthrough.js +0 -46
- package/node_modules/tar-pack/node_modules/readable-stream/lib/_stream_readable.js +0 -982
- package/node_modules/tar-pack/node_modules/readable-stream/lib/_stream_transform.js +0 -210
- package/node_modules/tar-pack/node_modules/readable-stream/lib/_stream_writable.js +0 -386
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/LICENSE +0 -19
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/README.md +0 -3
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/float.patch +0 -604
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/lib/util.js +0 -107
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/package.json +0 -67
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/test.js +0 -68
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/inherits/LICENSE +0 -16
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/inherits/README.md +0 -42
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/inherits/inherits.js +0 -1
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/inherits/inherits_browser.js +0 -23
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/inherits/package.json +0 -58
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/inherits/test.js +0 -25
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/isarray/build/build.js +0 -209
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/isarray/component.json +0 -19
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/isarray/index.js +0 -3
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/isarray/package.json +0 -59
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/string_decoder/.npmignore +0 -2
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/string_decoder/LICENSE +0 -20
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/string_decoder/README.md +0 -7
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/string_decoder/index.js +0 -221
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/string_decoder/package.json +0 -60
- package/node_modules/tar-pack/node_modules/readable-stream/package.json +0 -76
- package/node_modules/tar-pack/node_modules/readable-stream/passthrough.js +0 -1
- package/node_modules/tar-pack/node_modules/readable-stream/readable.js +0 -8
- package/node_modules/tar-pack/node_modules/readable-stream/transform.js +0 -1
- package/node_modules/tar-pack/node_modules/readable-stream/writable.js +0 -1
- package/node_modules/tar-pack/node_modules/rimraf/AUTHORS +0 -6
- package/node_modules/tar-pack/node_modules/rimraf/test/run.sh +0 -16
- package/node_modules/tar-pack/node_modules/rimraf/test/setup.sh +0 -47
- package/node_modules/tar-pack/node_modules/rimraf/test/test-async.js +0 -5
- package/node_modules/tar-pack/node_modules/rimraf/test/test-sync.js +0 -3
- /package/node_modules/{bl/node_modules/readable-stream/node_modules/process-nextick-args → process-nextick-args}/license.md +0 -0
- /package/node_modules/{bl/node_modules/readable-stream/node_modules/process-nextick-args → process-nextick-args}/readme.md +0 -0
- /package/node_modules/{bl/node_modules/readable-stream/node_modules/process-nextick-args → process-nextick-args}/test.js +0 -0
- /package/node_modules/{bl/node_modules/readable-stream → readable-stream}/.travis.yml +0 -0
- /package/node_modules/{bl/node_modules/readable-stream → readable-stream}/.zuul.yml +0 -0
- /package/node_modules/{bl/node_modules/readable-stream → readable-stream}/doc/wg-meetings/2015-01-30.md +0 -0
- /package/node_modules/{bl/node_modules/readable-stream → tar-pack/node_modules/rimraf/node_modules/glob}/node_modules/inherits/LICENSE +0 -0
- /package/node_modules/{bl/node_modules/readable-stream → tar-pack/node_modules/rimraf/node_modules/glob}/node_modules/inherits/README.md +0 -0
- /package/node_modules/{bl/node_modules/readable-stream → tar-pack/node_modules/rimraf/node_modules/glob}/node_modules/inherits/inherits.js +0 -0
- /package/node_modules/{bl/node_modules/readable-stream → tar-pack/node_modules/rimraf/node_modules/glob}/node_modules/inherits/inherits_browser.js +0 -0
- /package/node_modules/{bl/node_modules/readable-stream → tar-pack/node_modules/rimraf/node_modules/glob}/node_modules/inherits/test.js +0 -0
- /package/node_modules/{bl/node_modules/readable-stream/node_modules/util-deprecate → util-deprecate}/History.md +0 -0
- /package/node_modules/{bl/node_modules/readable-stream/node_modules/util-deprecate → util-deprecate}/LICENSE +0 -0
- /package/node_modules/{bl/node_modules/readable-stream/node_modules/util-deprecate → util-deprecate}/README.md +0 -0
- /package/node_modules/{bl/node_modules/readable-stream/node_modules/util-deprecate → util-deprecate}/browser.js +0 -0
- /package/node_modules/{bl/node_modules/readable-stream/node_modules/util-deprecate → util-deprecate}/node.js +0 -0
@@ -0,0 +1,226 @@
|
|
1
|
+
exports.alphasort = alphasort
|
2
|
+
exports.alphasorti = alphasorti
|
3
|
+
exports.setopts = setopts
|
4
|
+
exports.ownProp = ownProp
|
5
|
+
exports.makeAbs = makeAbs
|
6
|
+
exports.finish = finish
|
7
|
+
exports.mark = mark
|
8
|
+
exports.isIgnored = isIgnored
|
9
|
+
exports.childrenIgnored = childrenIgnored
|
10
|
+
|
11
|
+
function ownProp (obj, field) {
|
12
|
+
return Object.prototype.hasOwnProperty.call(obj, field)
|
13
|
+
}
|
14
|
+
|
15
|
+
var path = require("path")
|
16
|
+
var minimatch = require("minimatch")
|
17
|
+
var isAbsolute = require("path-is-absolute")
|
18
|
+
var Minimatch = minimatch.Minimatch
|
19
|
+
|
20
|
+
function alphasorti (a, b) {
|
21
|
+
return a.toLowerCase().localeCompare(b.toLowerCase())
|
22
|
+
}
|
23
|
+
|
24
|
+
function alphasort (a, b) {
|
25
|
+
return a.localeCompare(b)
|
26
|
+
}
|
27
|
+
|
28
|
+
function setupIgnores (self, options) {
|
29
|
+
self.ignore = options.ignore || []
|
30
|
+
|
31
|
+
if (!Array.isArray(self.ignore))
|
32
|
+
self.ignore = [self.ignore]
|
33
|
+
|
34
|
+
if (self.ignore.length) {
|
35
|
+
self.ignore = self.ignore.map(ignoreMap)
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
39
|
+
// ignore patterns are always in dot:true mode.
|
40
|
+
function ignoreMap (pattern) {
|
41
|
+
var gmatcher = null
|
42
|
+
if (pattern.slice(-3) === '/**') {
|
43
|
+
var gpattern = pattern.replace(/(\/\*\*)+$/, '')
|
44
|
+
gmatcher = new Minimatch(gpattern, { dot: true })
|
45
|
+
}
|
46
|
+
|
47
|
+
return {
|
48
|
+
matcher: new Minimatch(pattern, { dot: true }),
|
49
|
+
gmatcher: gmatcher
|
50
|
+
}
|
51
|
+
}
|
52
|
+
|
53
|
+
function setopts (self, pattern, options) {
|
54
|
+
if (!options)
|
55
|
+
options = {}
|
56
|
+
|
57
|
+
// base-matching: just use globstar for that.
|
58
|
+
if (options.matchBase && -1 === pattern.indexOf("/")) {
|
59
|
+
if (options.noglobstar) {
|
60
|
+
throw new Error("base matching requires globstar")
|
61
|
+
}
|
62
|
+
pattern = "**/" + pattern
|
63
|
+
}
|
64
|
+
|
65
|
+
self.silent = !!options.silent
|
66
|
+
self.pattern = pattern
|
67
|
+
self.strict = options.strict !== false
|
68
|
+
self.realpath = !!options.realpath
|
69
|
+
self.realpathCache = options.realpathCache || Object.create(null)
|
70
|
+
self.follow = !!options.follow
|
71
|
+
self.dot = !!options.dot
|
72
|
+
self.mark = !!options.mark
|
73
|
+
self.nodir = !!options.nodir
|
74
|
+
if (self.nodir)
|
75
|
+
self.mark = true
|
76
|
+
self.sync = !!options.sync
|
77
|
+
self.nounique = !!options.nounique
|
78
|
+
self.nonull = !!options.nonull
|
79
|
+
self.nosort = !!options.nosort
|
80
|
+
self.nocase = !!options.nocase
|
81
|
+
self.stat = !!options.stat
|
82
|
+
self.noprocess = !!options.noprocess
|
83
|
+
|
84
|
+
self.maxLength = options.maxLength || Infinity
|
85
|
+
self.cache = options.cache || Object.create(null)
|
86
|
+
self.statCache = options.statCache || Object.create(null)
|
87
|
+
self.symlinks = options.symlinks || Object.create(null)
|
88
|
+
|
89
|
+
setupIgnores(self, options)
|
90
|
+
|
91
|
+
self.changedCwd = false
|
92
|
+
var cwd = process.cwd()
|
93
|
+
if (!ownProp(options, "cwd"))
|
94
|
+
self.cwd = cwd
|
95
|
+
else {
|
96
|
+
self.cwd = options.cwd
|
97
|
+
self.changedCwd = path.resolve(options.cwd) !== cwd
|
98
|
+
}
|
99
|
+
|
100
|
+
self.root = options.root || path.resolve(self.cwd, "/")
|
101
|
+
self.root = path.resolve(self.root)
|
102
|
+
if (process.platform === "win32")
|
103
|
+
self.root = self.root.replace(/\\/g, "/")
|
104
|
+
|
105
|
+
self.nomount = !!options.nomount
|
106
|
+
|
107
|
+
// disable comments and negation in Minimatch.
|
108
|
+
// Note that they are not supported in Glob itself anyway.
|
109
|
+
options.nonegate = true
|
110
|
+
options.nocomment = true
|
111
|
+
|
112
|
+
self.minimatch = new Minimatch(pattern, options)
|
113
|
+
self.options = self.minimatch.options
|
114
|
+
}
|
115
|
+
|
116
|
+
function finish (self) {
|
117
|
+
var nou = self.nounique
|
118
|
+
var all = nou ? [] : Object.create(null)
|
119
|
+
|
120
|
+
for (var i = 0, l = self.matches.length; i < l; i ++) {
|
121
|
+
var matches = self.matches[i]
|
122
|
+
if (!matches || Object.keys(matches).length === 0) {
|
123
|
+
if (self.nonull) {
|
124
|
+
// do like the shell, and spit out the literal glob
|
125
|
+
var literal = self.minimatch.globSet[i]
|
126
|
+
if (nou)
|
127
|
+
all.push(literal)
|
128
|
+
else
|
129
|
+
all[literal] = true
|
130
|
+
}
|
131
|
+
} else {
|
132
|
+
// had matches
|
133
|
+
var m = Object.keys(matches)
|
134
|
+
if (nou)
|
135
|
+
all.push.apply(all, m)
|
136
|
+
else
|
137
|
+
m.forEach(function (m) {
|
138
|
+
all[m] = true
|
139
|
+
})
|
140
|
+
}
|
141
|
+
}
|
142
|
+
|
143
|
+
if (!nou)
|
144
|
+
all = Object.keys(all)
|
145
|
+
|
146
|
+
if (!self.nosort)
|
147
|
+
all = all.sort(self.nocase ? alphasorti : alphasort)
|
148
|
+
|
149
|
+
// at *some* point we statted all of these
|
150
|
+
if (self.mark) {
|
151
|
+
for (var i = 0; i < all.length; i++) {
|
152
|
+
all[i] = self._mark(all[i])
|
153
|
+
}
|
154
|
+
if (self.nodir) {
|
155
|
+
all = all.filter(function (e) {
|
156
|
+
return !(/\/$/.test(e))
|
157
|
+
})
|
158
|
+
}
|
159
|
+
}
|
160
|
+
|
161
|
+
if (self.ignore.length)
|
162
|
+
all = all.filter(function(m) {
|
163
|
+
return !isIgnored(self, m)
|
164
|
+
})
|
165
|
+
|
166
|
+
self.found = all
|
167
|
+
}
|
168
|
+
|
169
|
+
function mark (self, p) {
|
170
|
+
var abs = makeAbs(self, p)
|
171
|
+
var c = self.cache[abs]
|
172
|
+
var m = p
|
173
|
+
if (c) {
|
174
|
+
var isDir = c === 'DIR' || Array.isArray(c)
|
175
|
+
var slash = p.slice(-1) === '/'
|
176
|
+
|
177
|
+
if (isDir && !slash)
|
178
|
+
m += '/'
|
179
|
+
else if (!isDir && slash)
|
180
|
+
m = m.slice(0, -1)
|
181
|
+
|
182
|
+
if (m !== p) {
|
183
|
+
var mabs = makeAbs(self, m)
|
184
|
+
self.statCache[mabs] = self.statCache[abs]
|
185
|
+
self.cache[mabs] = self.cache[abs]
|
186
|
+
}
|
187
|
+
}
|
188
|
+
|
189
|
+
return m
|
190
|
+
}
|
191
|
+
|
192
|
+
// lotta situps...
|
193
|
+
function makeAbs (self, f) {
|
194
|
+
var abs = f
|
195
|
+
if (f.charAt(0) === '/') {
|
196
|
+
abs = path.join(self.root, f)
|
197
|
+
} else if (isAbsolute(f) || f === '') {
|
198
|
+
abs = f
|
199
|
+
} else if (self.changedCwd) {
|
200
|
+
abs = path.resolve(self.cwd, f)
|
201
|
+
} else {
|
202
|
+
abs = path.resolve(f)
|
203
|
+
}
|
204
|
+
return abs
|
205
|
+
}
|
206
|
+
|
207
|
+
|
208
|
+
// Return true, if pattern ends with globstar '**', for the accompanying parent directory.
|
209
|
+
// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents
|
210
|
+
function isIgnored (self, path) {
|
211
|
+
if (!self.ignore.length)
|
212
|
+
return false
|
213
|
+
|
214
|
+
return self.ignore.some(function(item) {
|
215
|
+
return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path))
|
216
|
+
})
|
217
|
+
}
|
218
|
+
|
219
|
+
function childrenIgnored (self, path) {
|
220
|
+
if (!self.ignore.length)
|
221
|
+
return false
|
222
|
+
|
223
|
+
return self.ignore.some(function(item) {
|
224
|
+
return !!(item.gmatcher && item.gmatcher.match(path))
|
225
|
+
})
|
226
|
+
}
|