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
@@ -0,0 +1,396 @@
|
|
1
|
+
var test = require("tap").test
|
2
|
+
, LRU = require("../")
|
3
|
+
|
4
|
+
test("basic", function (t) {
|
5
|
+
var cache = new LRU({max: 10})
|
6
|
+
cache.set("key", "value")
|
7
|
+
t.equal(cache.get("key"), "value")
|
8
|
+
t.equal(cache.get("nada"), undefined)
|
9
|
+
t.equal(cache.length, 1)
|
10
|
+
t.equal(cache.max, 10)
|
11
|
+
t.end()
|
12
|
+
})
|
13
|
+
|
14
|
+
test("least recently set", function (t) {
|
15
|
+
var cache = new LRU(2)
|
16
|
+
cache.set("a", "A")
|
17
|
+
cache.set("b", "B")
|
18
|
+
cache.set("c", "C")
|
19
|
+
t.equal(cache.get("c"), "C")
|
20
|
+
t.equal(cache.get("b"), "B")
|
21
|
+
t.equal(cache.get("a"), undefined)
|
22
|
+
t.end()
|
23
|
+
})
|
24
|
+
|
25
|
+
test("lru recently gotten", function (t) {
|
26
|
+
var cache = new LRU(2)
|
27
|
+
cache.set("a", "A")
|
28
|
+
cache.set("b", "B")
|
29
|
+
cache.get("a")
|
30
|
+
cache.set("c", "C")
|
31
|
+
t.equal(cache.get("c"), "C")
|
32
|
+
t.equal(cache.get("b"), undefined)
|
33
|
+
t.equal(cache.get("a"), "A")
|
34
|
+
t.end()
|
35
|
+
})
|
36
|
+
|
37
|
+
test("del", function (t) {
|
38
|
+
var cache = new LRU(2)
|
39
|
+
cache.set("a", "A")
|
40
|
+
cache.del("a")
|
41
|
+
t.equal(cache.get("a"), undefined)
|
42
|
+
t.end()
|
43
|
+
})
|
44
|
+
|
45
|
+
test("max", function (t) {
|
46
|
+
var cache = new LRU(3)
|
47
|
+
|
48
|
+
// test changing the max, verify that the LRU items get dropped.
|
49
|
+
cache.max = 100
|
50
|
+
for (var i = 0; i < 100; i ++) cache.set(i, i)
|
51
|
+
t.equal(cache.length, 100)
|
52
|
+
for (var i = 0; i < 100; i ++) {
|
53
|
+
t.equal(cache.get(i), i)
|
54
|
+
}
|
55
|
+
cache.max = 3
|
56
|
+
t.equal(cache.length, 3)
|
57
|
+
for (var i = 0; i < 97; i ++) {
|
58
|
+
t.equal(cache.get(i), undefined)
|
59
|
+
}
|
60
|
+
for (var i = 98; i < 100; i ++) {
|
61
|
+
t.equal(cache.get(i), i)
|
62
|
+
}
|
63
|
+
|
64
|
+
// now remove the max restriction, and try again.
|
65
|
+
cache.max = "hello"
|
66
|
+
for (var i = 0; i < 100; i ++) cache.set(i, i)
|
67
|
+
t.equal(cache.length, 100)
|
68
|
+
for (var i = 0; i < 100; i ++) {
|
69
|
+
t.equal(cache.get(i), i)
|
70
|
+
}
|
71
|
+
// should trigger an immediate resize
|
72
|
+
cache.max = 3
|
73
|
+
t.equal(cache.length, 3)
|
74
|
+
for (var i = 0; i < 97; i ++) {
|
75
|
+
t.equal(cache.get(i), undefined)
|
76
|
+
}
|
77
|
+
for (var i = 98; i < 100; i ++) {
|
78
|
+
t.equal(cache.get(i), i)
|
79
|
+
}
|
80
|
+
t.end()
|
81
|
+
})
|
82
|
+
|
83
|
+
test("reset", function (t) {
|
84
|
+
var cache = new LRU(10)
|
85
|
+
cache.set("a", "A")
|
86
|
+
cache.set("b", "B")
|
87
|
+
cache.reset()
|
88
|
+
t.equal(cache.length, 0)
|
89
|
+
t.equal(cache.max, 10)
|
90
|
+
t.equal(cache.get("a"), undefined)
|
91
|
+
t.equal(cache.get("b"), undefined)
|
92
|
+
t.end()
|
93
|
+
})
|
94
|
+
|
95
|
+
|
96
|
+
test("basic with weighed length", function (t) {
|
97
|
+
var cache = new LRU({
|
98
|
+
max: 100,
|
99
|
+
length: function (item) { return item.size }
|
100
|
+
})
|
101
|
+
cache.set("key", {val: "value", size: 50})
|
102
|
+
t.equal(cache.get("key").val, "value")
|
103
|
+
t.equal(cache.get("nada"), undefined)
|
104
|
+
t.equal(cache.lengthCalculator(cache.get("key")), 50)
|
105
|
+
t.equal(cache.length, 50)
|
106
|
+
t.equal(cache.max, 100)
|
107
|
+
t.end()
|
108
|
+
})
|
109
|
+
|
110
|
+
|
111
|
+
test("weighed length item too large", function (t) {
|
112
|
+
var cache = new LRU({
|
113
|
+
max: 10,
|
114
|
+
length: function (item) { return item.size }
|
115
|
+
})
|
116
|
+
t.equal(cache.max, 10)
|
117
|
+
|
118
|
+
// should fall out immediately
|
119
|
+
cache.set("key", {val: "value", size: 50})
|
120
|
+
|
121
|
+
t.equal(cache.length, 0)
|
122
|
+
t.equal(cache.get("key"), undefined)
|
123
|
+
t.end()
|
124
|
+
})
|
125
|
+
|
126
|
+
test("least recently set with weighed length", function (t) {
|
127
|
+
var cache = new LRU({
|
128
|
+
max:8,
|
129
|
+
length: function (item) { return item.length }
|
130
|
+
})
|
131
|
+
cache.set("a", "A")
|
132
|
+
cache.set("b", "BB")
|
133
|
+
cache.set("c", "CCC")
|
134
|
+
cache.set("d", "DDDD")
|
135
|
+
t.equal(cache.get("d"), "DDDD")
|
136
|
+
t.equal(cache.get("c"), "CCC")
|
137
|
+
t.equal(cache.get("b"), undefined)
|
138
|
+
t.equal(cache.get("a"), undefined)
|
139
|
+
t.end()
|
140
|
+
})
|
141
|
+
|
142
|
+
test("lru recently gotten with weighed length", function (t) {
|
143
|
+
var cache = new LRU({
|
144
|
+
max: 8,
|
145
|
+
length: function (item) { return item.length }
|
146
|
+
})
|
147
|
+
cache.set("a", "A")
|
148
|
+
cache.set("b", "BB")
|
149
|
+
cache.set("c", "CCC")
|
150
|
+
cache.get("a")
|
151
|
+
cache.get("b")
|
152
|
+
cache.set("d", "DDDD")
|
153
|
+
t.equal(cache.get("c"), undefined)
|
154
|
+
t.equal(cache.get("d"), "DDDD")
|
155
|
+
t.equal(cache.get("b"), "BB")
|
156
|
+
t.equal(cache.get("a"), "A")
|
157
|
+
t.end()
|
158
|
+
})
|
159
|
+
|
160
|
+
test("lru recently updated with weighed length", function (t) {
|
161
|
+
var cache = new LRU({
|
162
|
+
max: 8,
|
163
|
+
length: function (item) { return item.length }
|
164
|
+
})
|
165
|
+
cache.set("a", "A")
|
166
|
+
cache.set("b", "BB")
|
167
|
+
cache.set("c", "CCC")
|
168
|
+
t.equal(cache.length, 6) //CCC BB A
|
169
|
+
cache.set("a", "+A")
|
170
|
+
t.equal(cache.length, 7) //+A CCC BB
|
171
|
+
cache.set("b", "++BB")
|
172
|
+
t.equal(cache.length, 6) //++BB +A
|
173
|
+
t.equal(cache.get("c"), undefined)
|
174
|
+
|
175
|
+
cache.set("c", "oversized")
|
176
|
+
t.equal(cache.length, 6) //++BB +A
|
177
|
+
t.equal(cache.get("c"), undefined)
|
178
|
+
|
179
|
+
cache.set("a", "oversized")
|
180
|
+
t.equal(cache.length, 4) //++BB
|
181
|
+
t.equal(cache.get("a"), undefined)
|
182
|
+
t.equal(cache.get("b"), "++BB")
|
183
|
+
t.end()
|
184
|
+
})
|
185
|
+
|
186
|
+
test("set returns proper booleans", function(t) {
|
187
|
+
var cache = new LRU({
|
188
|
+
max: 5,
|
189
|
+
length: function (item) { return item.length }
|
190
|
+
})
|
191
|
+
|
192
|
+
t.equal(cache.set("a", "A"), true)
|
193
|
+
|
194
|
+
// should return false for max exceeded
|
195
|
+
t.equal(cache.set("b", "donuts"), false)
|
196
|
+
|
197
|
+
t.equal(cache.set("b", "B"), true)
|
198
|
+
t.equal(cache.set("c", "CCCC"), true)
|
199
|
+
t.end()
|
200
|
+
})
|
201
|
+
|
202
|
+
test("drop the old items", function(t) {
|
203
|
+
var cache = new LRU({
|
204
|
+
max: 5,
|
205
|
+
maxAge: 50
|
206
|
+
})
|
207
|
+
|
208
|
+
cache.set("a", "A")
|
209
|
+
|
210
|
+
setTimeout(function () {
|
211
|
+
cache.set("b", "b")
|
212
|
+
t.equal(cache.get("a"), "A")
|
213
|
+
}, 25)
|
214
|
+
|
215
|
+
setTimeout(function () {
|
216
|
+
cache.set("c", "C")
|
217
|
+
// timed out
|
218
|
+
t.notOk(cache.get("a"))
|
219
|
+
}, 60 + 25)
|
220
|
+
|
221
|
+
setTimeout(function () {
|
222
|
+
t.notOk(cache.get("b"))
|
223
|
+
t.equal(cache.get("c"), "C")
|
224
|
+
}, 90)
|
225
|
+
|
226
|
+
setTimeout(function () {
|
227
|
+
t.notOk(cache.get("c"))
|
228
|
+
t.end()
|
229
|
+
}, 155)
|
230
|
+
})
|
231
|
+
|
232
|
+
test("individual item can have it's own maxAge", function(t) {
|
233
|
+
var cache = new LRU({
|
234
|
+
max: 5,
|
235
|
+
maxAge: 50
|
236
|
+
})
|
237
|
+
|
238
|
+
cache.set("a", "A", 20)
|
239
|
+
setTimeout(function () {
|
240
|
+
t.notOk(cache.get("a"))
|
241
|
+
t.end()
|
242
|
+
}, 25)
|
243
|
+
})
|
244
|
+
|
245
|
+
test("individual item can have it's own maxAge > cache's", function(t) {
|
246
|
+
var cache = new LRU({
|
247
|
+
max: 5,
|
248
|
+
maxAge: 20
|
249
|
+
})
|
250
|
+
|
251
|
+
cache.set("a", "A", 50)
|
252
|
+
setTimeout(function () {
|
253
|
+
t.equal(cache.get("a"), "A")
|
254
|
+
t.end()
|
255
|
+
}, 25)
|
256
|
+
})
|
257
|
+
|
258
|
+
test("disposal function", function(t) {
|
259
|
+
var disposed = false
|
260
|
+
var cache = new LRU({
|
261
|
+
max: 1,
|
262
|
+
dispose: function (k, n) {
|
263
|
+
disposed = n
|
264
|
+
}
|
265
|
+
})
|
266
|
+
|
267
|
+
cache.set(1, 1)
|
268
|
+
cache.set(2, 2)
|
269
|
+
t.equal(disposed, 1)
|
270
|
+
cache.set(3, 3)
|
271
|
+
t.equal(disposed, 2)
|
272
|
+
cache.reset()
|
273
|
+
t.equal(disposed, 3)
|
274
|
+
t.end()
|
275
|
+
})
|
276
|
+
|
277
|
+
test("disposal function on too big of item", function(t) {
|
278
|
+
var disposed = false
|
279
|
+
var cache = new LRU({
|
280
|
+
max: 1,
|
281
|
+
length: function (k) {
|
282
|
+
return k.length
|
283
|
+
},
|
284
|
+
dispose: function (k, n) {
|
285
|
+
disposed = n
|
286
|
+
}
|
287
|
+
})
|
288
|
+
var obj = [ 1, 2 ]
|
289
|
+
|
290
|
+
t.equal(disposed, false)
|
291
|
+
cache.set("obj", obj)
|
292
|
+
t.equal(disposed, obj)
|
293
|
+
t.end()
|
294
|
+
})
|
295
|
+
|
296
|
+
test("has()", function(t) {
|
297
|
+
var cache = new LRU({
|
298
|
+
max: 1,
|
299
|
+
maxAge: 10
|
300
|
+
})
|
301
|
+
|
302
|
+
cache.set('foo', 'bar')
|
303
|
+
t.equal(cache.has('foo'), true)
|
304
|
+
cache.set('blu', 'baz')
|
305
|
+
t.equal(cache.has('foo'), false)
|
306
|
+
t.equal(cache.has('blu'), true)
|
307
|
+
setTimeout(function() {
|
308
|
+
t.equal(cache.has('blu'), false)
|
309
|
+
t.end()
|
310
|
+
}, 15)
|
311
|
+
})
|
312
|
+
|
313
|
+
test("stale", function(t) {
|
314
|
+
var cache = new LRU({
|
315
|
+
maxAge: 10,
|
316
|
+
stale: true
|
317
|
+
})
|
318
|
+
|
319
|
+
cache.set('foo', 'bar')
|
320
|
+
t.equal(cache.get('foo'), 'bar')
|
321
|
+
t.equal(cache.has('foo'), true)
|
322
|
+
setTimeout(function() {
|
323
|
+
t.equal(cache.has('foo'), false)
|
324
|
+
t.equal(cache.get('foo'), 'bar')
|
325
|
+
t.equal(cache.get('foo'), undefined)
|
326
|
+
t.end()
|
327
|
+
}, 15)
|
328
|
+
})
|
329
|
+
|
330
|
+
test("lru update via set", function(t) {
|
331
|
+
var cache = LRU({ max: 2 });
|
332
|
+
|
333
|
+
cache.set('foo', 1);
|
334
|
+
cache.set('bar', 2);
|
335
|
+
cache.del('bar');
|
336
|
+
cache.set('baz', 3);
|
337
|
+
cache.set('qux', 4);
|
338
|
+
|
339
|
+
t.equal(cache.get('foo'), undefined)
|
340
|
+
t.equal(cache.get('bar'), undefined)
|
341
|
+
t.equal(cache.get('baz'), 3)
|
342
|
+
t.equal(cache.get('qux'), 4)
|
343
|
+
t.end()
|
344
|
+
})
|
345
|
+
|
346
|
+
test("least recently set w/ peek", function (t) {
|
347
|
+
var cache = new LRU(2)
|
348
|
+
cache.set("a", "A")
|
349
|
+
cache.set("b", "B")
|
350
|
+
t.equal(cache.peek("a"), "A")
|
351
|
+
cache.set("c", "C")
|
352
|
+
t.equal(cache.get("c"), "C")
|
353
|
+
t.equal(cache.get("b"), "B")
|
354
|
+
t.equal(cache.get("a"), undefined)
|
355
|
+
t.end()
|
356
|
+
})
|
357
|
+
|
358
|
+
test("pop the least used item", function (t) {
|
359
|
+
var cache = new LRU(3)
|
360
|
+
, last
|
361
|
+
|
362
|
+
cache.set("a", "A")
|
363
|
+
cache.set("b", "B")
|
364
|
+
cache.set("c", "C")
|
365
|
+
|
366
|
+
t.equal(cache.length, 3)
|
367
|
+
t.equal(cache.max, 3)
|
368
|
+
|
369
|
+
// Ensure we pop a, c, b
|
370
|
+
cache.get("b", "B")
|
371
|
+
|
372
|
+
last = cache.pop()
|
373
|
+
t.equal(last.key, "a")
|
374
|
+
t.equal(last.value, "A")
|
375
|
+
t.equal(cache.length, 2)
|
376
|
+
t.equal(cache.max, 3)
|
377
|
+
|
378
|
+
last = cache.pop()
|
379
|
+
t.equal(last.key, "c")
|
380
|
+
t.equal(last.value, "C")
|
381
|
+
t.equal(cache.length, 1)
|
382
|
+
t.equal(cache.max, 3)
|
383
|
+
|
384
|
+
last = cache.pop()
|
385
|
+
t.equal(last.key, "b")
|
386
|
+
t.equal(last.value, "B")
|
387
|
+
t.equal(cache.length, 0)
|
388
|
+
t.equal(cache.max, 3)
|
389
|
+
|
390
|
+
last = cache.pop()
|
391
|
+
t.equal(last, null)
|
392
|
+
t.equal(cache.length, 0)
|
393
|
+
t.equal(cache.max, 3)
|
394
|
+
|
395
|
+
t.end()
|
396
|
+
})
|
@@ -0,0 +1,120 @@
|
|
1
|
+
var test = require('tap').test
|
2
|
+
var LRU = require('../')
|
3
|
+
|
4
|
+
test('forEach', function (t) {
|
5
|
+
var l = new LRU(5)
|
6
|
+
for (var i = 0; i < 10; i ++) {
|
7
|
+
l.set(i.toString(), i.toString(2))
|
8
|
+
}
|
9
|
+
|
10
|
+
var i = 9
|
11
|
+
l.forEach(function (val, key, cache) {
|
12
|
+
t.equal(cache, l)
|
13
|
+
t.equal(key, i.toString())
|
14
|
+
t.equal(val, i.toString(2))
|
15
|
+
i -= 1
|
16
|
+
})
|
17
|
+
|
18
|
+
// get in order of most recently used
|
19
|
+
l.get(6)
|
20
|
+
l.get(8)
|
21
|
+
|
22
|
+
var order = [ 8, 6, 9, 7, 5 ]
|
23
|
+
var i = 0
|
24
|
+
|
25
|
+
l.forEach(function (val, key, cache) {
|
26
|
+
var j = order[i ++]
|
27
|
+
t.equal(cache, l)
|
28
|
+
t.equal(key, j.toString())
|
29
|
+
t.equal(val, j.toString(2))
|
30
|
+
})
|
31
|
+
t.equal(i, order.length);
|
32
|
+
|
33
|
+
t.end()
|
34
|
+
})
|
35
|
+
|
36
|
+
test('keys() and values()', function (t) {
|
37
|
+
var l = new LRU(5)
|
38
|
+
for (var i = 0; i < 10; i ++) {
|
39
|
+
l.set(i.toString(), i.toString(2))
|
40
|
+
}
|
41
|
+
|
42
|
+
t.similar(l.keys(), ['9', '8', '7', '6', '5'])
|
43
|
+
t.similar(l.values(), ['1001', '1000', '111', '110', '101'])
|
44
|
+
|
45
|
+
// get in order of most recently used
|
46
|
+
l.get(6)
|
47
|
+
l.get(8)
|
48
|
+
|
49
|
+
t.similar(l.keys(), ['8', '6', '9', '7', '5'])
|
50
|
+
t.similar(l.values(), ['1000', '110', '1001', '111', '101'])
|
51
|
+
|
52
|
+
t.end()
|
53
|
+
})
|
54
|
+
|
55
|
+
test('all entries are iterated over', function(t) {
|
56
|
+
var l = new LRU(5)
|
57
|
+
for (var i = 0; i < 10; i ++) {
|
58
|
+
l.set(i.toString(), i.toString(2))
|
59
|
+
}
|
60
|
+
|
61
|
+
var i = 0
|
62
|
+
l.forEach(function (val, key, cache) {
|
63
|
+
if (i > 0) {
|
64
|
+
cache.del(key)
|
65
|
+
}
|
66
|
+
i += 1
|
67
|
+
})
|
68
|
+
|
69
|
+
t.equal(i, 5)
|
70
|
+
t.equal(l.keys().length, 1)
|
71
|
+
|
72
|
+
t.end()
|
73
|
+
})
|
74
|
+
|
75
|
+
test('all stale entries are removed', function(t) {
|
76
|
+
var l = new LRU({ max: 5, maxAge: -5, stale: true })
|
77
|
+
for (var i = 0; i < 10; i ++) {
|
78
|
+
l.set(i.toString(), i.toString(2))
|
79
|
+
}
|
80
|
+
|
81
|
+
var i = 0
|
82
|
+
l.forEach(function () {
|
83
|
+
i += 1
|
84
|
+
})
|
85
|
+
|
86
|
+
t.equal(i, 5)
|
87
|
+
t.equal(l.keys().length, 0)
|
88
|
+
|
89
|
+
t.end()
|
90
|
+
})
|
91
|
+
|
92
|
+
test('expires', function (t) {
|
93
|
+
var l = new LRU({
|
94
|
+
max: 10,
|
95
|
+
maxAge: 50
|
96
|
+
})
|
97
|
+
for (var i = 0; i < 10; i++) {
|
98
|
+
l.set(i.toString(), i.toString(2), ((i % 2) ? 25 : undefined))
|
99
|
+
}
|
100
|
+
|
101
|
+
var i = 0
|
102
|
+
var order = [ 8, 6, 4, 2, 0 ]
|
103
|
+
setTimeout(function () {
|
104
|
+
l.forEach(function (val, key, cache) {
|
105
|
+
var j = order[i++]
|
106
|
+
t.equal(cache, l)
|
107
|
+
t.equal(key, j.toString())
|
108
|
+
t.equal(val, j.toString(2))
|
109
|
+
})
|
110
|
+
t.equal(i, order.length);
|
111
|
+
|
112
|
+
setTimeout(function () {
|
113
|
+
var count = 0;
|
114
|
+
l.forEach(function (val, key, cache) { count++; })
|
115
|
+
t.equal(0, count);
|
116
|
+
t.end()
|
117
|
+
}, 25)
|
118
|
+
|
119
|
+
}, 26)
|
120
|
+
})
|
@@ -0,0 +1,51 @@
|
|
1
|
+
#!/usr/bin/env node --expose_gc
|
2
|
+
|
3
|
+
|
4
|
+
var weak = require('weak');
|
5
|
+
var test = require('tap').test
|
6
|
+
var LRU = require('../')
|
7
|
+
var l = new LRU({ max: 10 })
|
8
|
+
var refs = 0
|
9
|
+
function X() {
|
10
|
+
refs ++
|
11
|
+
weak(this, deref)
|
12
|
+
}
|
13
|
+
|
14
|
+
function deref() {
|
15
|
+
refs --
|
16
|
+
}
|
17
|
+
|
18
|
+
test('no leaks', function (t) {
|
19
|
+
// fill up the cache
|
20
|
+
for (var i = 0; i < 100; i++) {
|
21
|
+
l.set(i, new X);
|
22
|
+
// throw some gets in there, too.
|
23
|
+
if (i % 2 === 0)
|
24
|
+
l.get(i / 2)
|
25
|
+
}
|
26
|
+
|
27
|
+
gc()
|
28
|
+
|
29
|
+
var start = process.memoryUsage()
|
30
|
+
|
31
|
+
// capture the memory
|
32
|
+
var startRefs = refs
|
33
|
+
|
34
|
+
// do it again, but more
|
35
|
+
for (var i = 0; i < 10000; i++) {
|
36
|
+
l.set(i, new X);
|
37
|
+
// throw some gets in there, too.
|
38
|
+
if (i % 2 === 0)
|
39
|
+
l.get(i / 2)
|
40
|
+
}
|
41
|
+
|
42
|
+
gc()
|
43
|
+
|
44
|
+
var end = process.memoryUsage()
|
45
|
+
t.equal(refs, startRefs, 'no leaky refs')
|
46
|
+
|
47
|
+
console.error('start: %j\n' +
|
48
|
+
'end: %j', start, end);
|
49
|
+
t.pass();
|
50
|
+
t.end();
|
51
|
+
})
|