fsevents 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of fsevents might be problematic. Click here for more details.
- package/node_modules/ansi/History.md +7 -0
- package/node_modules/ansi/LICENSE +24 -0
- package/node_modules/ansi/lib/ansi.js +2 -2
- package/node_modules/ansi/package.json +15 -10
- package/node_modules/ansi-regex/package.json +1 -0
- package/node_modules/ansi-styles/package.json +1 -0
- package/node_modules/are-we-there-yet/.npmignore +2 -0
- package/node_modules/are-we-there-yet/index.js +20 -18
- package/node_modules/are-we-there-yet/package.json +15 -13
- package/node_modules/asn1/package.json +3 -1
- package/node_modules/assert-plus/README.md +50 -21
- package/node_modules/assert-plus/assert.js +168 -207
- package/node_modules/assert-plus/package.json +55 -15
- package/node_modules/async/README.md +86 -4
- package/node_modules/async/dist/async.js +4 -3
- package/node_modules/async/dist/async.min.js +1 -1
- package/node_modules/async/lib/async.js +4 -3
- package/node_modules/async/package.json +10 -10
- package/node_modules/aws-sign2/package.json +1 -0
- package/node_modules/aws4/.npmignore +3 -0
- package/node_modules/aws4/.tern-port +1 -0
- package/node_modules/{tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match → aws4}/.travis.yml +2 -0
- package/node_modules/{tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md → aws4/LICENSE} +1 -3
- package/node_modules/aws4/README.md +510 -0
- package/node_modules/aws4/aws4.js +313 -0
- package/node_modules/aws4/example.js +372 -0
- package/node_modules/aws4/node_modules/lru-cache/.npmignore +1 -0
- package/node_modules/aws4/node_modules/lru-cache/.travis.yml +8 -0
- package/node_modules/aws4/node_modules/lru-cache/CONTRIBUTORS +14 -0
- package/node_modules/aws4/node_modules/lru-cache/README.md +137 -0
- package/node_modules/aws4/node_modules/lru-cache/lib/lru-cache.js +334 -0
- package/node_modules/aws4/node_modules/lru-cache/package.json +66 -0
- package/node_modules/aws4/node_modules/lru-cache/test/basic.js +396 -0
- package/node_modules/aws4/node_modules/lru-cache/test/foreach.js +120 -0
- package/node_modules/aws4/node_modules/lru-cache/test/memory-leak.js +51 -0
- package/node_modules/aws4/node_modules/lru-cache/test/serialize.js +216 -0
- package/node_modules/aws4/package.json +113 -0
- package/node_modules/bl/.travis.yml +5 -6
- package/node_modules/bl/bl.js +5 -0
- package/node_modules/bl/package.json +16 -13
- package/node_modules/bl/test/test.js +554 -6
- package/node_modules/block-stream/package.json +1 -0
- package/node_modules/boom/package.json +1 -0
- package/node_modules/caseless/package.json +1 -0
- package/node_modules/chalk/package.json +1 -0
- package/node_modules/combined-stream/package.json +1 -0
- package/node_modules/commander/package.json +1 -0
- package/node_modules/core-util-is/package.json +2 -2
- package/node_modules/cryptiles/package.json +1 -0
- package/node_modules/dashdash/README.md +70 -7
- package/node_modules/dashdash/etc/dashdash.bash_completion.in +388 -0
- package/node_modules/dashdash/lib/dashdash.js +202 -2
- package/node_modules/dashdash/package.json +12 -9
- package/node_modules/debug/.jshintrc +3 -0
- package/node_modules/debug/.npmignore +6 -0
- package/node_modules/debug/History.md +195 -0
- package/node_modules/debug/Makefile +36 -0
- package/node_modules/debug/Readme.md +86 -13
- package/node_modules/debug/bower.json +28 -0
- package/node_modules/debug/browser.js +168 -0
- package/node_modules/debug/component.json +19 -0
- package/node_modules/debug/debug.js +132 -72
- package/node_modules/debug/node.js +209 -0
- package/node_modules/debug/package.json +32 -22
- package/node_modules/deep-extend/README.md +51 -50
- package/node_modules/deep-extend/package.json +14 -16
- package/node_modules/delayed-stream/package.json +1 -0
- package/node_modules/delegates/History.md +6 -0
- package/node_modules/delegates/License +20 -0
- package/node_modules/delegates/package.json +17 -13
- package/node_modules/ecc-jsbn/package.json +3 -1
- package/node_modules/escape-string-regexp/package.json +2 -2
- package/node_modules/extend/package.json +1 -0
- package/node_modules/extsprintf/package.json +4 -2
- package/node_modules/forever-agent/package.json +1 -0
- package/node_modules/form-data/package.json +1 -0
- package/node_modules/fstream/package.json +1 -0
- package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +1 -0
- package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json +1 -0
- package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/package.json +1 -0
- package/node_modules/fstream-ignore/node_modules/minimatch/package.json +1 -0
- package/node_modules/fstream-ignore/package.json +3 -1
- package/node_modules/gauge/package.json +14 -12
- package/node_modules/gauge/progress-bar.js +4 -5
- package/node_modules/gauge/test/progress-bar.js +1 -1
- package/node_modules/generate-function/package.json +1 -0
- package/node_modules/generate-object-property/package.json +1 -0
- package/node_modules/graceful-fs/README.md +17 -0
- package/node_modules/graceful-fs/graceful-fs.js +2 -0
- package/node_modules/graceful-fs/package.json +16 -11
- package/node_modules/graceful-readlink/package.json +1 -0
- package/node_modules/har-validator/README.md +45 -122
- package/node_modules/har-validator/package.json +16 -16
- package/node_modules/has-ansi/package.json +1 -0
- package/node_modules/has-unicode/README.md +6 -3
- package/node_modules/has-unicode/index.js +7 -3
- package/node_modules/has-unicode/package.json +15 -13
- package/node_modules/has-unicode/test/index.js +1 -1
- package/node_modules/hawk/README.md +634 -634
- package/node_modules/hawk/bower.json +24 -24
- package/node_modules/hawk/component.json +18 -18
- package/node_modules/hawk/dist/client.js +343 -340
- package/node_modules/hawk/example/usage.js +78 -78
- package/node_modules/hawk/lib/browser.js +637 -637
- package/node_modules/hawk/lib/client.js +369 -369
- package/node_modules/hawk/lib/crypto.js +126 -126
- package/node_modules/hawk/lib/index.js +15 -15
- package/node_modules/hawk/lib/server.js +548 -540
- package/node_modules/hawk/lib/utils.js +184 -164
- package/node_modules/hawk/package.json +9 -8
- package/node_modules/hawk/test/browser.js +1492 -1492
- package/node_modules/hawk/test/client.js +440 -440
- package/node_modules/hawk/test/crypto.js +70 -70
- package/node_modules/hawk/test/index.js +378 -378
- package/node_modules/hawk/test/readme.js +95 -95
- package/node_modules/hawk/test/server.js +1329 -1302
- package/node_modules/hawk/test/uri.js +838 -838
- package/node_modules/hawk/test/utils.js +149 -121
- package/node_modules/hoek/package.json +1 -0
- package/node_modules/http-signature/CHANGES.md +7 -0
- package/node_modules/http-signature/http_signing.md +71 -3
- package/node_modules/http-signature/lib/signer.js +5 -0
- package/node_modules/http-signature/package.json +13 -11
- package/node_modules/ini/package.json +3 -1
- package/node_modules/is-my-json-valid/formats.js +1 -1
- package/node_modules/is-my-json-valid/package.json +11 -10
- package/node_modules/is-property/package.json +1 -0
- package/node_modules/is-typedarray/package.json +3 -1
- package/node_modules/isarray/package.json +2 -2
- package/node_modules/isstream/package.json +1 -0
- package/node_modules/jodid25519/package.json +3 -1
- package/node_modules/jsbn/package.json +3 -1
- package/node_modules/json-schema/package.json +2 -1
- package/node_modules/json-stringify-safe/package.json +1 -0
- package/node_modules/jsonpointer/package.json +1 -0
- package/node_modules/jsprim/package.json +3 -1
- package/node_modules/lodash._basetostring/package.json +4 -4
- package/node_modules/lodash._createpadding/package.json +3 -2
- package/node_modules/lodash._root/LICENSE +22 -0
- package/node_modules/lodash._root/README.md +18 -0
- package/node_modules/lodash._root/index.js +53 -0
- package/node_modules/lodash._root/package.json +77 -0
- package/node_modules/lodash.pad/LICENSE +2 -2
- package/node_modules/lodash.pad/README.md +4 -6
- package/node_modules/lodash.pad/index.js +347 -15
- package/node_modules/lodash.pad/package.json +20 -34
- package/node_modules/lodash.padleft/package.json +3 -1
- package/node_modules/lodash.padright/package.json +3 -1
- package/node_modules/lodash.repeat/LICENSE +2 -2
- package/node_modules/lodash.repeat/README.md +4 -6
- package/node_modules/lodash.repeat/index.js +262 -11
- package/node_modules/lodash.repeat/package.json +21 -34
- package/node_modules/mime-db/package.json +2 -2
- package/node_modules/mime-types/package.json +2 -2
- package/node_modules/ms/.npmignore +5 -0
- package/node_modules/{deep-extend → ms}/LICENSE +2 -2
- package/node_modules/ms/README.md +35 -0
- package/node_modules/ms/index.js +125 -0
- package/node_modules/ms/package.json +56 -0
- package/node_modules/node-pre-gyp/CHANGELOG.md +8 -0
- package/node_modules/node-pre-gyp/LICENSE +27 -0
- package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +36 -0
- package/node_modules/node-pre-gyp/package.json +23 -22
- package/node_modules/node-uuid/package.json +1 -0
- package/node_modules/npmlog/package.json +18 -16
- package/node_modules/oauth-sign/index.js +2 -0
- package/node_modules/oauth-sign/package.json +10 -9
- package/node_modules/once/README.md +18 -0
- package/node_modules/once/once.js +8 -6
- package/node_modules/once/package.json +20 -12
- package/node_modules/pinkie/index.js +3 -3
- package/node_modules/pinkie/package.json +10 -9
- package/node_modules/pinkie/readme.md +1 -1
- package/node_modules/pinkie-promise/package.json +1 -0
- package/node_modules/process-nextick-args/package.json +2 -2
- package/node_modules/qs/.eslintrc +17 -0
- package/node_modules/qs/.travis.yml +66 -5
- package/node_modules/qs/CHANGELOG.md +86 -75
- package/node_modules/qs/README.md +85 -81
- package/node_modules/qs/bower.json +1 -1
- package/node_modules/qs/component.json +1 -1
- package/node_modules/qs/dist/qs.js +108 -177
- package/node_modules/qs/lib/index.js +1 -7
- package/node_modules/qs/lib/parse.js +26 -49
- package/node_modules/qs/lib/stringify.js +22 -46
- package/node_modules/qs/lib/utils.js +45 -73
- package/node_modules/qs/package.json +51 -28
- package/node_modules/qs/test/index.js +5 -0
- package/node_modules/qs/test/parse.js +236 -321
- package/node_modules/qs/test/stringify.js +139 -197
- package/node_modules/qs/test/utils.js +6 -25
- package/node_modules/rc/node_modules/minimist/package.json +1 -0
- package/node_modules/rc/package.json +1 -0
- package/node_modules/readable-stream/package.json +1 -0
- package/node_modules/request/CHANGELOG.md +16 -1
- package/node_modules/request/README.md +1 -1
- package/node_modules/request/lib/har.js +3 -2
- package/node_modules/request/lib/multipart.js +3 -0
- package/node_modules/request/lib/tunnel.js +0 -2
- package/node_modules/request/package.json +20 -17
- package/node_modules/request/request.js +50 -26
- package/node_modules/rimraf/README.md +1 -1
- package/node_modules/rimraf/node_modules/glob/README.md +2 -2
- package/node_modules/rimraf/node_modules/glob/glob.js +14 -1
- package/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json +1 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/inflight/package.json +1 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/inherits/package.json +2 -1
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +1 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json +1 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +1 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json +1 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/package.json +1 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/once/package.json +1 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/package.json +1 -0
- package/node_modules/rimraf/node_modules/glob/package.json +11 -11
- package/node_modules/rimraf/package.json +13 -12
- package/node_modules/semver/package.json +3 -1
- package/node_modules/sntp/package.json +1 -0
- package/node_modules/sshpk/.npmignore +1 -0
- package/node_modules/sshpk/bin/sshpk-sign +176 -0
- package/node_modules/sshpk/bin/sshpk-verify +166 -0
- package/node_modules/sshpk/lib/ed-compat.js +2 -0
- package/node_modules/sshpk/lib/key.js +6 -0
- package/node_modules/sshpk/man/man1/sshpk-conv.1 +135 -0
- package/node_modules/sshpk/man/man1/sshpk-sign.1 +81 -0
- package/node_modules/sshpk/man/man1/sshpk-verify.1 +68 -0
- package/node_modules/sshpk/package.json +18 -9
- package/node_modules/string_decoder/package.json +2 -2
- package/node_modules/stringstream/package.json +1 -0
- package/node_modules/strip-ansi/package.json +1 -0
- package/node_modules/strip-json-comments/package.json +1 -0
- package/node_modules/supports-color/package.json +1 -0
- package/node_modules/tar/package.json +1 -0
- package/node_modules/tar-pack/README.md +2 -2
- package/node_modules/tar-pack/package.json +25 -26
- package/node_modules/tough-cookie/package.json +1 -0
- package/node_modules/tunnel-agent/package.json +1 -0
- package/node_modules/tweetnacl/README.md +1 -1
- package/node_modules/tweetnacl/package.json +13 -11
- package/node_modules/uid-number/package.json +14 -13
- package/node_modules/uid-number/uid-number.js +9 -4
- package/node_modules/util-deprecate/package.json +2 -2
- package/node_modules/verror/package.json +1 -0
- package/node_modules/{tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy → wrappy}/package.json +3 -2
- package/node_modules/xtend/package.json +1 -0
- package/package.json +2 -2
- package/node_modules/are-we-there-yet/README.md~ +0 -183
- package/node_modules/bl/test/basic-test.js +0 -541
- package/node_modules/bl/test/sauce.js +0 -38
- package/node_modules/debug/index.js +0 -5
- package/node_modules/debug/lib/debug.js +0 -147
- package/node_modules/deep-extend/test/index.spec.js +0 -220
- package/node_modules/deep-extend/test/mocha.opts +0 -1
- package/node_modules/gauge/README.md~ +0 -161
- package/node_modules/has-unicode/README.md~ +0 -4
- package/node_modules/once/LICENSE +0 -27
- package/node_modules/once/test/once.js +0 -18
- package/node_modules/sshpk/node_modules/assert-plus/README.md +0 -155
- package/node_modules/sshpk/node_modules/assert-plus/assert.js +0 -206
- package/node_modules/sshpk/node_modules/assert-plus/package.json +0 -88
- package/node_modules/tar-pack/node_modules/rimraf/README.md +0 -43
- package/node_modules/tar-pack/node_modules/rimraf/bin.js +0 -40
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/README.md +0 -359
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/common.js +0 -226
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/glob.js +0 -752
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/.eslintrc +0 -17
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/README.md +0 -37
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/inflight.js +0 -44
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json +0 -58
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/package.json +0 -67
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/test.js +0 -97
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inherits/LICENSE +0 -16
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inherits/README.md +0 -42
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inherits/inherits.js +0 -1
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inherits/inherits_browser.js +0 -23
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inherits/package.json +0 -58
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inherits/test.js +0 -25
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/README.md +0 -216
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/minimatch.js +0 -912
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore +0 -3
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md +0 -122
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js +0 -8
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js +0 -191
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore +0 -2
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile +0 -6
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md +0 -89
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js +0 -5
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js +0 -50
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +0 -79
- 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 +0 -84
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml +0 -4
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE +0 -18
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown +0 -62
- 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 +0 -6
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js +0 -13
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json +0 -90
- 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 +0 -39
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +0 -81
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json +0 -66
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/README.md +0 -51
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/LICENSE +0 -15
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/README.md +0 -36
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/test/basic.js +0 -51
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js +0 -33
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/once.js +0 -21
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/package.json +0 -70
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/index.js +0 -20
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/package.json +0 -78
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/readme.md +0 -51
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/package.json +0 -79
- package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/sync.js +0 -460
- package/node_modules/tar-pack/node_modules/rimraf/package.json +0 -69
- package/node_modules/tar-pack/node_modules/rimraf/rimraf.js +0 -333
- package/node_modules/uid-number/LICENCE +0 -25
- /package/node_modules/{sshpk/node_modules/assert-plus → assert-plus}/AUTHORS +0 -0
- /package/node_modules/{sshpk/node_modules/assert-plus → assert-plus}/CHANGES.md +0 -0
- /package/node_modules/{tar-pack/node_modules/rimraf → aws4/node_modules/lru-cache}/LICENSE +0 -0
- /package/node_modules/{tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight → uid-number}/LICENSE +0 -0
- /package/node_modules/{tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy → wrappy}/LICENSE +0 -0
- /package/node_modules/{tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy → wrappy}/README.md +0 -0
- /package/node_modules/{tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy → wrappy}/test/basic.js +0 -0
- /package/node_modules/{tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy → wrappy}/wrappy.js +0 -0
@@ -1,359 +0,0 @@
|
|
1
|
-
[![Build Status](https://travis-ci.org/isaacs/node-glob.svg?branch=master)](https://travis-ci.org/isaacs/node-glob/) [![Dependency Status](https://david-dm.org/isaacs/node-glob.svg)](https://david-dm.org/isaacs/node-glob) [![devDependency Status](https://david-dm.org/isaacs/node-glob/dev-status.svg)](https://david-dm.org/isaacs/node-glob#info=devDependencies) [![optionalDependency Status](https://david-dm.org/isaacs/node-glob/optional-status.svg)](https://david-dm.org/isaacs/node-glob#info=optionalDependencies)
|
2
|
-
|
3
|
-
# Glob
|
4
|
-
|
5
|
-
Match files using the patterns the shell uses, like stars and stuff.
|
6
|
-
|
7
|
-
This is a glob implementation in JavaScript. It uses the `minimatch`
|
8
|
-
library to do its matching.
|
9
|
-
|
10
|
-
![](oh-my-glob.gif)
|
11
|
-
|
12
|
-
## Usage
|
13
|
-
|
14
|
-
```javascript
|
15
|
-
var glob = require("glob")
|
16
|
-
|
17
|
-
// options is optional
|
18
|
-
glob("**/*.js", options, function (er, files) {
|
19
|
-
// files is an array of filenames.
|
20
|
-
// If the `nonull` option is set, and nothing
|
21
|
-
// was found, then files is ["**/*.js"]
|
22
|
-
// er is an error object or null.
|
23
|
-
})
|
24
|
-
```
|
25
|
-
|
26
|
-
## Glob Primer
|
27
|
-
|
28
|
-
"Globs" are the patterns you type when you do stuff like `ls *.js` on
|
29
|
-
the command line, or put `build/*` in a `.gitignore` file.
|
30
|
-
|
31
|
-
Before parsing the path part patterns, braced sections are expanded
|
32
|
-
into a set. Braced sections start with `{` and end with `}`, with any
|
33
|
-
number of comma-delimited sections within. Braced sections may contain
|
34
|
-
slash characters, so `a{/b/c,bcd}` would expand into `a/b/c` and `abcd`.
|
35
|
-
|
36
|
-
The following characters have special magic meaning when used in a
|
37
|
-
path portion:
|
38
|
-
|
39
|
-
* `*` Matches 0 or more characters in a single path portion
|
40
|
-
* `?` Matches 1 character
|
41
|
-
* `[...]` Matches a range of characters, similar to a RegExp range.
|
42
|
-
If the first character of the range is `!` or `^` then it matches
|
43
|
-
any character not in the range.
|
44
|
-
* `!(pattern|pattern|pattern)` Matches anything that does not match
|
45
|
-
any of the patterns provided.
|
46
|
-
* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the
|
47
|
-
patterns provided.
|
48
|
-
* `+(pattern|pattern|pattern)` Matches one or more occurrences of the
|
49
|
-
patterns provided.
|
50
|
-
* `*(a|b|c)` Matches zero or more occurrences of the patterns provided
|
51
|
-
* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns
|
52
|
-
provided
|
53
|
-
* `**` If a "globstar" is alone in a path portion, then it matches
|
54
|
-
zero or more directories and subdirectories searching for matches.
|
55
|
-
It does not crawl symlinked directories.
|
56
|
-
|
57
|
-
### Dots
|
58
|
-
|
59
|
-
If a file or directory path portion has a `.` as the first character,
|
60
|
-
then it will not match any glob pattern unless that pattern's
|
61
|
-
corresponding path part also has a `.` as its first character.
|
62
|
-
|
63
|
-
For example, the pattern `a/.*/c` would match the file at `a/.b/c`.
|
64
|
-
However the pattern `a/*/c` would not, because `*` does not start with
|
65
|
-
a dot character.
|
66
|
-
|
67
|
-
You can make glob treat dots as normal characters by setting
|
68
|
-
`dot:true` in the options.
|
69
|
-
|
70
|
-
### Basename Matching
|
71
|
-
|
72
|
-
If you set `matchBase:true` in the options, and the pattern has no
|
73
|
-
slashes in it, then it will seek for any file anywhere in the tree
|
74
|
-
with a matching basename. For example, `*.js` would match
|
75
|
-
`test/simple/basic.js`.
|
76
|
-
|
77
|
-
### Empty Sets
|
78
|
-
|
79
|
-
If no matching files are found, then an empty array is returned. This
|
80
|
-
differs from the shell, where the pattern itself is returned. For
|
81
|
-
example:
|
82
|
-
|
83
|
-
$ echo a*s*d*f
|
84
|
-
a*s*d*f
|
85
|
-
|
86
|
-
To get the bash-style behavior, set the `nonull:true` in the options.
|
87
|
-
|
88
|
-
### See Also:
|
89
|
-
|
90
|
-
* `man sh`
|
91
|
-
* `man bash` (Search for "Pattern Matching")
|
92
|
-
* `man 3 fnmatch`
|
93
|
-
* `man 5 gitignore`
|
94
|
-
* [minimatch documentation](https://github.com/isaacs/minimatch)
|
95
|
-
|
96
|
-
## glob.hasMagic(pattern, [options])
|
97
|
-
|
98
|
-
Returns `true` if there are any special characters in the pattern, and
|
99
|
-
`false` otherwise.
|
100
|
-
|
101
|
-
Note that the options affect the results. If `noext:true` is set in
|
102
|
-
the options object, then `+(a|b)` will not be considered a magic
|
103
|
-
pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}`
|
104
|
-
then that is considered magical, unless `nobrace:true` is set in the
|
105
|
-
options.
|
106
|
-
|
107
|
-
## glob(pattern, [options], cb)
|
108
|
-
|
109
|
-
* `pattern` `{String}` Pattern to be matched
|
110
|
-
* `options` `{Object}`
|
111
|
-
* `cb` `{Function}`
|
112
|
-
* `err` `{Error | null}`
|
113
|
-
* `matches` `{Array<String>}` filenames found matching the pattern
|
114
|
-
|
115
|
-
Perform an asynchronous glob search.
|
116
|
-
|
117
|
-
## glob.sync(pattern, [options])
|
118
|
-
|
119
|
-
* `pattern` `{String}` Pattern to be matched
|
120
|
-
* `options` `{Object}`
|
121
|
-
* return: `{Array<String>}` filenames found matching the pattern
|
122
|
-
|
123
|
-
Perform a synchronous glob search.
|
124
|
-
|
125
|
-
## Class: glob.Glob
|
126
|
-
|
127
|
-
Create a Glob object by instantiating the `glob.Glob` class.
|
128
|
-
|
129
|
-
```javascript
|
130
|
-
var Glob = require("glob").Glob
|
131
|
-
var mg = new Glob(pattern, options, cb)
|
132
|
-
```
|
133
|
-
|
134
|
-
It's an EventEmitter, and starts walking the filesystem to find matches
|
135
|
-
immediately.
|
136
|
-
|
137
|
-
### new glob.Glob(pattern, [options], [cb])
|
138
|
-
|
139
|
-
* `pattern` `{String}` pattern to search for
|
140
|
-
* `options` `{Object}`
|
141
|
-
* `cb` `{Function}` Called when an error occurs, or matches are found
|
142
|
-
* `err` `{Error | null}`
|
143
|
-
* `matches` `{Array<String>}` filenames found matching the pattern
|
144
|
-
|
145
|
-
Note that if the `sync` flag is set in the options, then matches will
|
146
|
-
be immediately available on the `g.found` member.
|
147
|
-
|
148
|
-
### Properties
|
149
|
-
|
150
|
-
* `minimatch` The minimatch object that the glob uses.
|
151
|
-
* `options` The options object passed in.
|
152
|
-
* `aborted` Boolean which is set to true when calling `abort()`. There
|
153
|
-
is no way at this time to continue a glob search after aborting, but
|
154
|
-
you can re-use the statCache to avoid having to duplicate syscalls.
|
155
|
-
* `cache` Convenience object. Each field has the following possible
|
156
|
-
values:
|
157
|
-
* `false` - Path does not exist
|
158
|
-
* `true` - Path exists
|
159
|
-
* `'FILE'` - Path exists, and is not a directory
|
160
|
-
* `'DIR'` - Path exists, and is a directory
|
161
|
-
* `[file, entries, ...]` - Path exists, is a directory, and the
|
162
|
-
array value is the results of `fs.readdir`
|
163
|
-
* `statCache` Cache of `fs.stat` results, to prevent statting the same
|
164
|
-
path multiple times.
|
165
|
-
* `symlinks` A record of which paths are symbolic links, which is
|
166
|
-
relevant in resolving `**` patterns.
|
167
|
-
* `realpathCache` An optional object which is passed to `fs.realpath`
|
168
|
-
to minimize unnecessary syscalls. It is stored on the instantiated
|
169
|
-
Glob object, and may be re-used.
|
170
|
-
|
171
|
-
### Events
|
172
|
-
|
173
|
-
* `end` When the matching is finished, this is emitted with all the
|
174
|
-
matches found. If the `nonull` option is set, and no match was found,
|
175
|
-
then the `matches` list contains the original pattern. The matches
|
176
|
-
are sorted, unless the `nosort` flag is set.
|
177
|
-
* `match` Every time a match is found, this is emitted with the specific
|
178
|
-
thing that matched. It is not deduplicated or resolved to a realpath.
|
179
|
-
* `error` Emitted when an unexpected error is encountered, or whenever
|
180
|
-
any fs error occurs if `options.strict` is set.
|
181
|
-
* `abort` When `abort()` is called, this event is raised.
|
182
|
-
|
183
|
-
### Methods
|
184
|
-
|
185
|
-
* `pause` Temporarily stop the search
|
186
|
-
* `resume` Resume the search
|
187
|
-
* `abort` Stop the search forever
|
188
|
-
|
189
|
-
### Options
|
190
|
-
|
191
|
-
All the options that can be passed to Minimatch can also be passed to
|
192
|
-
Glob to change pattern matching behavior. Also, some have been added,
|
193
|
-
or have glob-specific ramifications.
|
194
|
-
|
195
|
-
All options are false by default, unless otherwise noted.
|
196
|
-
|
197
|
-
All options are added to the Glob object, as well.
|
198
|
-
|
199
|
-
If you are running many `glob` operations, you can pass a Glob object
|
200
|
-
as the `options` argument to a subsequent operation to shortcut some
|
201
|
-
`stat` and `readdir` calls. At the very least, you may pass in shared
|
202
|
-
`symlinks`, `statCache`, `realpathCache`, and `cache` options, so that
|
203
|
-
parallel glob operations will be sped up by sharing information about
|
204
|
-
the filesystem.
|
205
|
-
|
206
|
-
* `cwd` The current working directory in which to search. Defaults
|
207
|
-
to `process.cwd()`.
|
208
|
-
* `root` The place where patterns starting with `/` will be mounted
|
209
|
-
onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix
|
210
|
-
systems, and `C:\` or some such on Windows.)
|
211
|
-
* `dot` Include `.dot` files in normal matches and `globstar` matches.
|
212
|
-
Note that an explicit dot in a portion of the pattern will always
|
213
|
-
match dot files.
|
214
|
-
* `nomount` By default, a pattern starting with a forward-slash will be
|
215
|
-
"mounted" onto the root setting, so that a valid filesystem path is
|
216
|
-
returned. Set this flag to disable that behavior.
|
217
|
-
* `mark` Add a `/` character to directory matches. Note that this
|
218
|
-
requires additional stat calls.
|
219
|
-
* `nosort` Don't sort the results.
|
220
|
-
* `stat` Set to true to stat *all* results. This reduces performance
|
221
|
-
somewhat, and is completely unnecessary, unless `readdir` is presumed
|
222
|
-
to be an untrustworthy indicator of file existence.
|
223
|
-
* `silent` When an unusual error is encountered when attempting to
|
224
|
-
read a directory, a warning will be printed to stderr. Set the
|
225
|
-
`silent` option to true to suppress these warnings.
|
226
|
-
* `strict` When an unusual error is encountered when attempting to
|
227
|
-
read a directory, the process will just continue on in search of
|
228
|
-
other matches. Set the `strict` option to raise an error in these
|
229
|
-
cases.
|
230
|
-
* `cache` See `cache` property above. Pass in a previously generated
|
231
|
-
cache object to save some fs calls.
|
232
|
-
* `statCache` A cache of results of filesystem information, to prevent
|
233
|
-
unnecessary stat calls. While it should not normally be necessary
|
234
|
-
to set this, you may pass the statCache from one glob() call to the
|
235
|
-
options object of another, if you know that the filesystem will not
|
236
|
-
change between calls. (See "Race Conditions" below.)
|
237
|
-
* `symlinks` A cache of known symbolic links. You may pass in a
|
238
|
-
previously generated `symlinks` object to save `lstat` calls when
|
239
|
-
resolving `**` matches.
|
240
|
-
* `sync` DEPRECATED: use `glob.sync(pattern, opts)` instead.
|
241
|
-
* `nounique` In some cases, brace-expanded patterns can result in the
|
242
|
-
same file showing up multiple times in the result set. By default,
|
243
|
-
this implementation prevents duplicates in the result set. Set this
|
244
|
-
flag to disable that behavior.
|
245
|
-
* `nonull` Set to never return an empty set, instead returning a set
|
246
|
-
containing the pattern itself. This is the default in glob(3).
|
247
|
-
* `debug` Set to enable debug logging in minimatch and glob.
|
248
|
-
* `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets.
|
249
|
-
* `noglobstar` Do not match `**` against multiple filenames. (Ie,
|
250
|
-
treat it as a normal `*` instead.)
|
251
|
-
* `noext` Do not match `+(a|b)` "extglob" patterns.
|
252
|
-
* `nocase` Perform a case-insensitive match. Note: on
|
253
|
-
case-insensitive filesystems, non-magic patterns will match by
|
254
|
-
default, since `stat` and `readdir` will not raise errors.
|
255
|
-
* `matchBase` Perform a basename-only match if the pattern does not
|
256
|
-
contain any slash characters. That is, `*.js` would be treated as
|
257
|
-
equivalent to `**/*.js`, matching all js files in all directories.
|
258
|
-
* `nodir` Do not match directories, only files. (Note: to match
|
259
|
-
*only* directories, simply put a `/` at the end of the pattern.)
|
260
|
-
* `ignore` Add a pattern or an array of glob patterns to exclude matches.
|
261
|
-
Note: `ignore` patterns are *always* in `dot:true` mode, regardless
|
262
|
-
of any other settings.
|
263
|
-
* `follow` Follow symlinked directories when expanding `**` patterns.
|
264
|
-
Note that this can result in a lot of duplicate references in the
|
265
|
-
presence of cyclic links.
|
266
|
-
* `realpath` Set to true to call `fs.realpath` on all of the results.
|
267
|
-
In the case of a symlink that cannot be resolved, the full absolute
|
268
|
-
path to the matched entry is returned (though it will usually be a
|
269
|
-
broken symlink)
|
270
|
-
|
271
|
-
## Comparisons to other fnmatch/glob implementations
|
272
|
-
|
273
|
-
While strict compliance with the existing standards is a worthwhile
|
274
|
-
goal, some discrepancies exist between node-glob and other
|
275
|
-
implementations, and are intentional.
|
276
|
-
|
277
|
-
The double-star character `**` is supported by default, unless the
|
278
|
-
`noglobstar` flag is set. This is supported in the manner of bsdglob
|
279
|
-
and bash 4.3, where `**` only has special significance if it is the only
|
280
|
-
thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
|
281
|
-
`a/**b` will not.
|
282
|
-
|
283
|
-
Note that symlinked directories are not crawled as part of a `**`,
|
284
|
-
though their contents may match against subsequent portions of the
|
285
|
-
pattern. This prevents infinite loops and duplicates and the like.
|
286
|
-
|
287
|
-
If an escaped pattern has no matches, and the `nonull` flag is set,
|
288
|
-
then glob returns the pattern as-provided, rather than
|
289
|
-
interpreting the character escapes. For example,
|
290
|
-
`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
|
291
|
-
`"*a?"`. This is akin to setting the `nullglob` option in bash, except
|
292
|
-
that it does not resolve escaped pattern characters.
|
293
|
-
|
294
|
-
If brace expansion is not disabled, then it is performed before any
|
295
|
-
other interpretation of the glob pattern. Thus, a pattern like
|
296
|
-
`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
|
297
|
-
**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
|
298
|
-
checked for validity. Since those two are valid, matching proceeds.
|
299
|
-
|
300
|
-
### Comments and Negation
|
301
|
-
|
302
|
-
Previously, this module let you mark a pattern as a "comment" if it
|
303
|
-
started with a `#` character, or a "negated" pattern if it started
|
304
|
-
with a `!` character.
|
305
|
-
|
306
|
-
These options were deprecated in version 5, and removed in version 6.
|
307
|
-
|
308
|
-
To specify things that should not match, use the `ignore` option.
|
309
|
-
|
310
|
-
## Windows
|
311
|
-
|
312
|
-
**Please only use forward-slashes in glob expressions.**
|
313
|
-
|
314
|
-
Though windows uses either `/` or `\` as its path separator, only `/`
|
315
|
-
characters are used by this glob implementation. You must use
|
316
|
-
forward-slashes **only** in glob expressions. Back-slashes will always
|
317
|
-
be interpreted as escape characters, not path separators.
|
318
|
-
|
319
|
-
Results from absolute patterns such as `/foo/*` are mounted onto the
|
320
|
-
root setting using `path.join`. On windows, this will by default result
|
321
|
-
in `/foo/*` matching `C:\foo\bar.txt`.
|
322
|
-
|
323
|
-
## Race Conditions
|
324
|
-
|
325
|
-
Glob searching, by its very nature, is susceptible to race conditions,
|
326
|
-
since it relies on directory walking and such.
|
327
|
-
|
328
|
-
As a result, it is possible that a file that exists when glob looks for
|
329
|
-
it may have been deleted or modified by the time it returns the result.
|
330
|
-
|
331
|
-
As part of its internal implementation, this program caches all stat
|
332
|
-
and readdir calls that it makes, in order to cut down on system
|
333
|
-
overhead. However, this also makes it even more susceptible to races,
|
334
|
-
especially if the cache or statCache objects are reused between glob
|
335
|
-
calls.
|
336
|
-
|
337
|
-
Users are thus advised not to use a glob result as a guarantee of
|
338
|
-
filesystem state in the face of rapid changes. For the vast majority
|
339
|
-
of operations, this is never a problem.
|
340
|
-
|
341
|
-
## Contributing
|
342
|
-
|
343
|
-
Any change to behavior (including bugfixes) must come with a test.
|
344
|
-
|
345
|
-
Patches that fail tests or reduce performance will be rejected.
|
346
|
-
|
347
|
-
```
|
348
|
-
# to run tests
|
349
|
-
npm test
|
350
|
-
|
351
|
-
# to re-generate test fixtures
|
352
|
-
npm run test-regen
|
353
|
-
|
354
|
-
# to benchmark against bash/zsh
|
355
|
-
npm run bench
|
356
|
-
|
357
|
-
# to profile javascript
|
358
|
-
npm run prof
|
359
|
-
```
|
@@ -1,226 +0,0 @@
|
|
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
|
-
}
|