fsevents 1.0.8 → 1.0.9

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.

Files changed (194) hide show
  1. package/node_modules/ansi-styles/index.js +72 -6
  2. package/node_modules/ansi-styles/package.json +19 -12
  3. package/node_modules/ansi-styles/readme.md +36 -8
  4. package/node_modules/are-we-there-yet/CHANGES.md +19 -0
  5. package/node_modules/are-we-there-yet/README.md +12 -2
  6. package/node_modules/are-we-there-yet/index.js +4 -132
  7. package/node_modules/are-we-there-yet/package.json +18 -13
  8. package/node_modules/are-we-there-yet/test/lib/test-event.js +29 -0
  9. package/node_modules/are-we-there-yet/test/tracker.js +44 -43
  10. package/node_modules/are-we-there-yet/test/trackergroup.js +73 -64
  11. package/node_modules/are-we-there-yet/test/trackerstream.js +26 -40
  12. package/node_modules/are-we-there-yet/tracker-base.js +11 -0
  13. package/node_modules/are-we-there-yet/tracker-group.js +107 -0
  14. package/node_modules/are-we-there-yet/tracker-stream.js +35 -0
  15. package/node_modules/are-we-there-yet/tracker.js +30 -0
  16. package/node_modules/asn1/package.json +1 -2
  17. package/node_modules/assert-plus/package.json +1 -3
  18. package/node_modules/async/package.json +1 -1
  19. package/node_modules/aws4/.npmignore +2 -1
  20. package/node_modules/aws4/README.md +4 -0
  21. package/node_modules/aws4/aws4.js +8 -3
  22. package/node_modules/aws4/node_modules/lru-cache/.npmignore +3 -0
  23. package/node_modules/aws4/node_modules/lru-cache/.travis.yml +3 -4
  24. package/node_modules/aws4/node_modules/lru-cache/README.md +29 -24
  25. package/node_modules/aws4/node_modules/lru-cache/benchmarks/insertion-time.js +32 -0
  26. package/node_modules/aws4/node_modules/lru-cache/lib/lru-cache.js +333 -199
  27. package/node_modules/aws4/node_modules/lru-cache/node_modules/pseudomap/LICENSE +15 -0
  28. package/node_modules/aws4/node_modules/lru-cache/node_modules/pseudomap/README.md +60 -0
  29. package/node_modules/aws4/node_modules/lru-cache/node_modules/pseudomap/map.js +9 -0
  30. package/node_modules/aws4/node_modules/lru-cache/node_modules/pseudomap/package.json +59 -0
  31. package/node_modules/aws4/node_modules/lru-cache/node_modules/pseudomap/pseudomap.js +113 -0
  32. package/node_modules/aws4/node_modules/lru-cache/node_modules/pseudomap/test/basic.js +86 -0
  33. package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/.npmignore +4 -0
  34. package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/.travis.yml +7 -0
  35. package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/CONTRIBUTING.md +4 -0
  36. package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/LICENSE +15 -0
  37. package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/README.md +204 -0
  38. package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/package.json +59 -0
  39. package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/test/basic.js +188 -0
  40. package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/yallist.js +360 -0
  41. package/node_modules/aws4/node_modules/lru-cache/package.json +16 -12
  42. package/node_modules/aws4/node_modules/lru-cache/test/basic.js +270 -146
  43. package/node_modules/aws4/node_modules/lru-cache/test/foreach.js +39 -25
  44. package/node_modules/aws4/node_modules/lru-cache/test/inspect.js +54 -0
  45. package/node_modules/aws4/node_modules/lru-cache/test/no-symbol.js +3 -0
  46. package/node_modules/aws4/node_modules/lru-cache/test/serialize.js +115 -104
  47. package/node_modules/aws4/package.json +17 -14
  48. package/node_modules/bl/bl.js +9 -3
  49. package/node_modules/bl/package.json +12 -12
  50. package/node_modules/bl/test/test.js +14 -0
  51. package/node_modules/color-convert/README.md +62 -0
  52. package/node_modules/color-convert/conversions.js +594 -0
  53. package/node_modules/color-convert/css-keywords.js +151 -0
  54. package/node_modules/color-convert/index.js +75 -0
  55. package/node_modules/color-convert/package.json +92 -0
  56. package/node_modules/color-convert/route.js +98 -0
  57. package/node_modules/dashdash/lib/dashdash.js +1 -1
  58. package/node_modules/dashdash/node_modules/assert-plus/AUTHORS +6 -0
  59. package/node_modules/dashdash/node_modules/assert-plus/CHANGES.md +14 -0
  60. package/node_modules/dashdash/node_modules/assert-plus/README.md +162 -0
  61. package/node_modules/dashdash/node_modules/assert-plus/assert.js +211 -0
  62. package/node_modules/dashdash/node_modules/assert-plus/package.json +89 -0
  63. package/node_modules/dashdash/package.json +19 -12
  64. package/node_modules/ecc-jsbn/package.json +1 -2
  65. package/node_modules/escape-string-regexp/package.json +15 -11
  66. package/node_modules/extsprintf/package.json +2 -3
  67. package/node_modules/form-data/.dockerignore +7 -0
  68. package/node_modules/form-data/.editorconfig +10 -0
  69. package/node_modules/form-data/.eslintignore +1 -0
  70. package/node_modules/form-data/.eslintrc +64 -0
  71. package/node_modules/form-data/{Readme.md → README.md} +9 -1
  72. package/node_modules/form-data/lib/browser.js +2 -1
  73. package/node_modules/form-data/lib/form_data.js +172 -135
  74. package/node_modules/form-data/lib/populate.js +9 -0
  75. package/node_modules/form-data/package.json +35 -16
  76. package/node_modules/form-data/wercker.yml +36 -0
  77. package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/index.js +1 -1
  78. package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/package.json +14 -10
  79. package/node_modules/gauge/README.md +1 -1
  80. package/node_modules/gauge/package.json +18 -14
  81. package/node_modules/gauge/progress-bar.js +2 -2
  82. package/node_modules/http-signature/package.json +1 -2
  83. package/node_modules/is-my-json-valid/README.md +2 -2
  84. package/node_modules/is-my-json-valid/index.js +15 -6
  85. package/node_modules/is-my-json-valid/package.json +11 -7
  86. package/node_modules/is-my-json-valid/test/json-schema-draft4/multipleOf.json +36 -0
  87. package/node_modules/is-my-json-valid/test/misc.js +18 -0
  88. package/node_modules/is-typedarray/package.json +1 -2
  89. package/node_modules/isarray/.npmignore +1 -0
  90. package/node_modules/isarray/.travis.yml +4 -0
  91. package/node_modules/isarray/Makefile +6 -0
  92. package/node_modules/isarray/README.md +6 -0
  93. package/node_modules/isarray/index.js +3 -1
  94. package/node_modules/isarray/package.json +28 -10
  95. package/node_modules/isarray/test.js +20 -0
  96. package/node_modules/jodid25519/package.json +1 -2
  97. package/node_modules/jsbn/package.json +1 -2
  98. package/node_modules/json-schema/package.json +1 -1
  99. package/node_modules/jsprim/package.json +1 -2
  100. package/node_modules/lodash.pad/LICENSE +17 -16
  101. package/node_modules/lodash.pad/README.md +2 -2
  102. package/node_modules/lodash.pad/index.js +3 -94
  103. package/node_modules/lodash.pad/package.json +12 -12
  104. package/node_modules/lodash.padend/LICENSE +23 -0
  105. package/node_modules/lodash.padend/README.md +18 -0
  106. package/node_modules/lodash.padend/index.js +285 -0
  107. package/node_modules/lodash.padend/package.json +91 -0
  108. package/node_modules/lodash.padstart/LICENSE +23 -0
  109. package/node_modules/lodash.padstart/README.md +18 -0
  110. package/node_modules/lodash.padstart/index.js +285 -0
  111. package/node_modules/lodash.padstart/package.json +91 -0
  112. package/node_modules/lodash.repeat/LICENSE +17 -16
  113. package/node_modules/lodash.repeat/README.md +2 -2
  114. package/node_modules/lodash.repeat/index.js +3 -94
  115. package/node_modules/lodash.repeat/package.json +14 -13
  116. package/node_modules/lodash.tostring/LICENSE +23 -0
  117. package/node_modules/lodash.tostring/README.md +18 -0
  118. package/node_modules/lodash.tostring/index.js +164 -0
  119. package/node_modules/lodash.tostring/package.json +91 -0
  120. package/node_modules/mime-db/HISTORY.md +14 -0
  121. package/node_modules/mime-db/db.json +26 -3
  122. package/node_modules/mime-db/package.json +23 -18
  123. package/node_modules/mime-types/HISTORY.md +8 -0
  124. package/node_modules/mime-types/README.md +1 -1
  125. package/node_modules/mime-types/package.json +21 -16
  126. package/node_modules/node-pre-gyp/CHANGELOG.md +11 -0
  127. package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +44 -4
  128. package/node_modules/node-pre-gyp/package.json +16 -16
  129. package/node_modules/npmlog/.nyc_output/64996.json +1 -0
  130. package/node_modules/npmlog/.nyc_output/64998.json +1 -0
  131. package/node_modules/npmlog/.nyc_output/65000.json +1 -0
  132. package/node_modules/npmlog/log.js +3 -2
  133. package/node_modules/npmlog/package.json +15 -11
  134. package/node_modules/npmlog/test/progress.js +25 -8
  135. package/node_modules/once/package.json +1 -1
  136. package/node_modules/qs/package.json +1 -2
  137. package/node_modules/readable-stream/.travis.yml +18 -16
  138. package/node_modules/readable-stream/README.md +1 -1
  139. package/node_modules/readable-stream/doc/stream.markdown +435 -405
  140. package/node_modules/readable-stream/lib/_stream_duplex.js +13 -20
  141. package/node_modules/readable-stream/lib/_stream_passthrough.js +3 -4
  142. package/node_modules/readable-stream/lib/_stream_readable.js +110 -205
  143. package/node_modules/readable-stream/lib/_stream_transform.js +21 -38
  144. package/node_modules/readable-stream/lib/_stream_writable.js +108 -121
  145. package/node_modules/readable-stream/package.json +19 -15
  146. package/node_modules/request/package.json +1 -2
  147. package/node_modules/rimraf/node_modules/glob/README.md +6 -0
  148. package/node_modules/rimraf/node_modules/glob/common.js +12 -3
  149. package/node_modules/rimraf/node_modules/glob/glob.js +20 -3
  150. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js +1 -1
  151. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +14 -10
  152. package/node_modules/rimraf/node_modules/glob/package.json +15 -11
  153. package/node_modules/rimraf/node_modules/glob/sync.js +8 -1
  154. package/node_modules/rimraf/package.json +14 -10
  155. package/node_modules/semver/package.json +1 -2
  156. package/node_modules/sshpk/lib/formats/rfc4253.js +2 -1
  157. package/node_modules/sshpk/package.json +13 -10
  158. package/node_modules/strip-ansi/package.json +21 -16
  159. package/node_modules/strip-ansi/readme.md +5 -5
  160. package/node_modules/tough-cookie/lib/cookie.js +2 -2
  161. package/node_modules/tough-cookie/package.json +13 -9
  162. package/node_modules/tweetnacl/CHANGELOG.md +53 -0
  163. package/node_modules/tweetnacl/COPYING.txt +9 -0
  164. package/node_modules/tweetnacl/README.md +14 -40
  165. package/node_modules/tweetnacl/nacl-fast.js +21 -51
  166. package/node_modules/tweetnacl/nacl-fast.min.js +2 -2
  167. package/node_modules/tweetnacl/nacl.js +21 -51
  168. package/node_modules/tweetnacl/nacl.min.js +1 -1
  169. package/node_modules/tweetnacl/package.json +28 -38
  170. package/node_modules/verror/package.json +2 -3
  171. package/package.json +2 -2
  172. package/node_modules/aws4/example.js +0 -372
  173. package/node_modules/aws4/node_modules/lru-cache/test/memory-leak.js +0 -51
  174. package/node_modules/isarray/build/build.js +0 -209
  175. package/node_modules/lodash._basetostring/LICENSE +0 -22
  176. package/node_modules/lodash._basetostring/README.md +0 -20
  177. package/node_modules/lodash._basetostring/index.js +0 -22
  178. package/node_modules/lodash._basetostring/package.json +0 -99
  179. package/node_modules/lodash._createpadding/LICENSE +0 -22
  180. package/node_modules/lodash._createpadding/README.md +0 -20
  181. package/node_modules/lodash._createpadding/index.js +0 -37
  182. package/node_modules/lodash._createpadding/package.json +0 -101
  183. package/node_modules/lodash._root/LICENSE +0 -22
  184. package/node_modules/lodash._root/README.md +0 -18
  185. package/node_modules/lodash._root/index.js +0 -53
  186. package/node_modules/lodash._root/package.json +0 -77
  187. package/node_modules/lodash.padleft/LICENSE.txt +0 -22
  188. package/node_modules/lodash.padleft/README.md +0 -20
  189. package/node_modules/lodash.padleft/index.js +0 -50
  190. package/node_modules/lodash.padleft/package.json +0 -107
  191. package/node_modules/lodash.padright/LICENSE.txt +0 -22
  192. package/node_modules/lodash.padright/README.md +0 -20
  193. package/node_modules/lodash.padright/index.js +0 -50
  194. package/node_modules/lodash.padright/package.json +0 -107
@@ -2,12 +2,14 @@
2
2
 
3
3
  A cache object that deletes the least-recently-used items.
4
4
 
5
+ [![Build Status](https://travis-ci.org/isaacs/node-lru-cache.svg?branch=master)](https://travis-ci.org/isaacs/node-lru-cache) [![Coverage Status](https://coveralls.io/repos/isaacs/node-lru-cache/badge.svg?service=github)](https://coveralls.io/github/isaacs/node-lru-cache)
6
+
5
7
  ## Usage:
6
8
 
7
9
  ```javascript
8
10
  var LRU = require("lru-cache")
9
11
  , options = { max: 500
10
- , length: function (n) { return n * 2 }
12
+ , length: function (n, key) { return n * 2 + key.length }
11
13
  , dispose: function (key, n) { n.close() }
12
14
  , maxAge: 1000 * 60 * 60 }
13
15
  , cache = LRU(options)
@@ -16,6 +18,12 @@ var LRU = require("lru-cache")
16
18
  cache.set("key", "value")
17
19
  cache.get("key") // "value"
18
20
 
21
+ // non-string keys ARE fully supported
22
+ var someObject = {}
23
+ cache.set(someObject, 'a value')
24
+ cache.set('[object Object]', 'a different value')
25
+ assert.equal(cache.get(someObject), 'a value')
26
+
19
27
  cache.reset() // empty the cache
20
28
  ```
21
29
 
@@ -24,24 +32,6 @@ If you put more stuff in it, then items will fall out.
24
32
  If you try to put an oversized thing in it, then it'll fall out right
25
33
  away.
26
34
 
27
- ## Keys should always be Strings or Numbers
28
-
29
- Note: this module will print warnings to `console.error` if you use a
30
- key that is not a String or Number. Because items are stored in an
31
- object, which coerces keys to a string, it won't go well for you if
32
- you try to use a key that is not a unique string, it'll cause surprise
33
- collisions. For example:
34
-
35
- ```JavaScript
36
- // Bad Example! Dont' do this!
37
- var cache = LRU()
38
- var a = {}
39
- var b = {}
40
- cache.set(a, 'this is a')
41
- cache.set(b, 'this is b')
42
- console.log(cache.get(a)) // prints: 'this is b'
43
- ```
44
-
45
35
  ## Options
46
36
 
47
37
  * `max` The maximum size of the cache, checked by applying the length
@@ -53,9 +43,10 @@ console.log(cache.get(a)) // prints: 'this is b'
53
43
  drop it and return undefined instead of giving it to you.
54
44
  * `length` Function that is used to calculate the length of stored
55
45
  items. If you're storing strings or buffers, then you probably want
56
- to do something like `function(n){return n.length}`. The default is
57
- `function(n){return 1}`, which is fine if you want to store `max`
58
- like-sized things.
46
+ to do something like `function(n, key){return n.length}`. The default is
47
+ `function(){return 1}`, which is fine if you want to store `max`
48
+ like-sized things. They item is passed as the first argument, and
49
+ the key is passed as the second argumnet.
59
50
  * `dispose` Function that is called on items when they are dropped
60
51
  from the cache. This can be handy if you want to close file
61
52
  descriptors or do other cleanup tasks when items are no longer
@@ -76,8 +67,12 @@ console.log(cache.get(a)) // prints: 'this is b'
76
67
  * `get(key) => value`
77
68
 
78
69
  Both of these will update the "recently used"-ness of the key.
79
- They do what you think. `max` is optional and overrides the
80
- cache `max` option if provided.
70
+ They do what you think. `maxAge` is optional and overrides the
71
+ cache `maxAge` option if provided.
72
+
73
+ If the key is not found, `get()` will return `undefined`.
74
+
75
+ The key and val can be any value.
81
76
 
82
77
  * `peek(key)`
83
78
 
@@ -107,6 +102,12 @@ console.log(cache.get(a)) // prints: 'this is b'
107
102
  in the cache, in order of recent-ness. (Ie, more recently used
108
103
  items are iterated over first.)
109
104
 
105
+ * `rforEach(function(value,key,cache), [thisp])`
106
+
107
+ The same as `cache.forEach(...)` but items are iterated over in
108
+ reverse order. (ie, less recently used items are iterated over
109
+ first.)
110
+
110
111
  * `keys()`
111
112
 
112
113
  Return an array of the keys in the cache.
@@ -135,3 +136,7 @@ console.log(cache.get(a)) // prints: 'this is b'
135
136
 
136
137
  Loads another cache entries array, obtained with `sourceCache.dump()`,
137
138
  into the cache. The destination cache is reset before loading new entries
139
+
140
+ * `prune()`
141
+
142
+ Manually iterates over the entire cache proactively pruning old entries
@@ -0,0 +1,32 @@
1
+ var LRU = require('../')
2
+ var uuid = require("uuid")
3
+
4
+ var start = Date.now()
5
+
6
+ var lru = new LRU({
7
+ max: 64 * 1024 * 1024, // 64MB
8
+ length: function (v) {
9
+ return v.key.length + v.value.length
10
+ }
11
+ })
12
+
13
+
14
+ var total = 0
15
+
16
+ console.log("Iters\tAvg\tBytes")
17
+ for (x = 0; x < 5000000; ++x) {
18
+ var d = new Date()
19
+ var key = uuid.v4()
20
+ lru.set(key, {
21
+ key: key,
22
+ value: uuid.v4()
23
+ })
24
+
25
+ total += new Date() - d
26
+ var length = lru.length
27
+
28
+ if (x % 10000 === 0) {
29
+ console.log(x + "\t" + (total / 10000) + "\t" + length)
30
+ total = 0
31
+ }
32
+ }