fsevents 1.0.10 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of fsevents might be problematic. Click here for more details.
- package/node_modules/ansi-styles/package.json +4 -21
- package/node_modules/aws4/node_modules/lru-cache/README.md +1 -1
- package/node_modules/aws4/node_modules/lru-cache/lib/lru-cache.js +1 -0
- package/node_modules/aws4/node_modules/lru-cache/node_modules/pseudomap/package.json +2 -1
- package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/package.json +2 -1
- package/node_modules/aws4/node_modules/lru-cache/package.json +20 -12
- package/node_modules/aws4/package.json +2 -1
- package/node_modules/bl/package.json +2 -1
- package/node_modules/chalk/package.json +22 -17
- package/node_modules/dashdash/node_modules/assert-plus/package.json +2 -1
- package/node_modules/dashdash/package.json +2 -1
- package/node_modules/escape-string-regexp/package.json +2 -1
- package/node_modules/form-data/package.json +2 -1
- package/node_modules/is-my-json-valid/package.json +2 -1
- package/node_modules/mime-db/package.json +2 -1
- package/node_modules/mime-types/package.json +2 -1
- package/node_modules/node-pre-gyp/CHANGELOG.md +6 -0
- package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +8 -0
- package/node_modules/node-pre-gyp/lib/util/versioning.js +14 -2
- package/node_modules/node-pre-gyp/package.json +15 -15
- package/node_modules/oauth-sign/package.json +2 -1
- package/node_modules/once/package.json +1 -1
- package/node_modules/pinkie/package.json +2 -1
- package/node_modules/qs/package.json +2 -1
- package/node_modules/readable-stream/package.json +1 -1
- package/node_modules/request/package.json +2 -1
- package/node_modules/rimraf/node_modules/glob/package.json +2 -1
- package/node_modules/rimraf/package.json +2 -1
- package/node_modules/semver/package.json +2 -1
- package/node_modules/sshpk/package.json +2 -1
- package/node_modules/strip-ansi/package.json +2 -1
- package/node_modules/tar-pack/package.json +1 -1
- package/node_modules/tough-cookie/package.json +2 -1
- package/node_modules/tweetnacl/README.md +12 -4
- package/node_modules/tweetnacl/nacl-fast.js +1 -1
- package/node_modules/tweetnacl/nacl-fast.min.js +2 -2
- package/node_modules/tweetnacl/package.json +12 -11
- package/node_modules/verror/package.json +3 -2
- package/package.json +2 -2
- package/node_modules/ansi-styles/license +0 -21
- package/node_modules/aws4/node_modules/lru-cache/.npmignore +0 -4
- package/node_modules/aws4/node_modules/lru-cache/.travis.yml +0 -7
- package/node_modules/aws4/node_modules/lru-cache/CONTRIBUTORS +0 -14
- package/node_modules/aws4/node_modules/lru-cache/LICENSE +0 -15
- package/node_modules/aws4/node_modules/lru-cache/benchmarks/insertion-time.js +0 -32
- package/node_modules/aws4/node_modules/lru-cache/test/basic.js +0 -520
- package/node_modules/aws4/node_modules/lru-cache/test/foreach.js +0 -134
- package/node_modules/aws4/node_modules/lru-cache/test/inspect.js +0 -54
- package/node_modules/aws4/node_modules/lru-cache/test/no-symbol.js +0 -3
- package/node_modules/aws4/node_modules/lru-cache/test/serialize.js +0 -227
@@ -1,227 +0,0 @@
|
|
1
|
-
var test = require('tap').test
|
2
|
-
var LRU = require('../')
|
3
|
-
var Yallist = require('yallist')
|
4
|
-
|
5
|
-
test('dump', function (t) {
|
6
|
-
var cache = new LRU()
|
7
|
-
|
8
|
-
t.equal(cache.dump().length, 0, 'nothing in dump for empty cache')
|
9
|
-
|
10
|
-
cache.set('a', 'A')
|
11
|
-
cache.set('b', 'B')
|
12
|
-
t.deepEqual(cache.dump(), [
|
13
|
-
{ k: 'b', v: 'B', e: 0 },
|
14
|
-
{ k: 'a', v: 'A', e: 0 }
|
15
|
-
])
|
16
|
-
|
17
|
-
cache.set(123, 456)
|
18
|
-
t.deepEqual(cache.dump(), [
|
19
|
-
{ k: 123, v: 456, e: 0 },
|
20
|
-
{ k: 'b', v: 'B', e: 0 },
|
21
|
-
{ k: 'a', v: 'A', e: 0 }
|
22
|
-
])
|
23
|
-
cache.del(123)
|
24
|
-
|
25
|
-
cache.set('a', 'A')
|
26
|
-
t.deepEqual(cache.dump(), [
|
27
|
-
{ k: 'a', v: 'A', e: 0 },
|
28
|
-
{ k: 'b', v: 'B', e: 0 }
|
29
|
-
])
|
30
|
-
|
31
|
-
cache.get('b')
|
32
|
-
t.deepEqual(cache.dump(), [
|
33
|
-
{ k: 'b', v: 'B', e: 0 },
|
34
|
-
{ k: 'a', v: 'A', e: 0 }
|
35
|
-
])
|
36
|
-
|
37
|
-
cache.del('a')
|
38
|
-
t.deepEqual(cache.dump(), [
|
39
|
-
{ k: 'b', v: 'B', e: 0 }
|
40
|
-
])
|
41
|
-
|
42
|
-
t.end()
|
43
|
-
})
|
44
|
-
|
45
|
-
test('do not dump stale items', function (t) {
|
46
|
-
var cache = new LRU({
|
47
|
-
max: 5,
|
48
|
-
maxAge: 50
|
49
|
-
})
|
50
|
-
|
51
|
-
// expires at 50
|
52
|
-
cache.set('a', 'A')
|
53
|
-
|
54
|
-
setTimeout(function () {
|
55
|
-
// expires at 75
|
56
|
-
cache.set('b', 'B')
|
57
|
-
var s = cache.dump()
|
58
|
-
t.equal(s.length, 2)
|
59
|
-
t.equal(s[0].k, 'b')
|
60
|
-
t.equal(s[1].k, 'a')
|
61
|
-
}, 25)
|
62
|
-
|
63
|
-
setTimeout(function () {
|
64
|
-
// expires at 110
|
65
|
-
cache.set('c', 'C')
|
66
|
-
var s = cache.dump()
|
67
|
-
t.equal(s.length, 2)
|
68
|
-
t.equal(s[0].k, 'c')
|
69
|
-
t.equal(s[1].k, 'b')
|
70
|
-
}, 60)
|
71
|
-
|
72
|
-
setTimeout(function () {
|
73
|
-
// expires at 130
|
74
|
-
cache.set('d', 'D', 40)
|
75
|
-
var s = cache.dump()
|
76
|
-
t.equal(s.length, 2)
|
77
|
-
t.equal(s[0].k, 'd')
|
78
|
-
t.equal(s[1].k, 'c')
|
79
|
-
}, 90)
|
80
|
-
|
81
|
-
setTimeout(function () {
|
82
|
-
var s = cache.dump()
|
83
|
-
t.equal(s.length, 1)
|
84
|
-
t.equal(s[0].k, 'd')
|
85
|
-
}, 120)
|
86
|
-
|
87
|
-
setTimeout(function () {
|
88
|
-
var s = cache.dump()
|
89
|
-
t.deepEqual(s, [])
|
90
|
-
t.end()
|
91
|
-
}, 155)
|
92
|
-
})
|
93
|
-
|
94
|
-
test('load basic cache', function (t) {
|
95
|
-
var cache = new LRU()
|
96
|
-
var copy = new LRU()
|
97
|
-
|
98
|
-
cache.set('a', 'A')
|
99
|
-
cache.set('b', 'B')
|
100
|
-
cache.set(123, 456)
|
101
|
-
|
102
|
-
copy.load(cache.dump())
|
103
|
-
t.deepEquals(cache.dump(), copy.dump())
|
104
|
-
|
105
|
-
t.end()
|
106
|
-
})
|
107
|
-
|
108
|
-
test('load staled cache', function (t) {
|
109
|
-
var cache = new LRU({maxAge: 50})
|
110
|
-
var copy = new LRU({maxAge: 50})
|
111
|
-
var arr
|
112
|
-
|
113
|
-
// expires at 50
|
114
|
-
cache.set('a', 'A')
|
115
|
-
setTimeout(function () {
|
116
|
-
// expires at 80
|
117
|
-
cache.set('b', 'B')
|
118
|
-
arr = cache.dump()
|
119
|
-
t.equal(arr.length, 2)
|
120
|
-
}, 30)
|
121
|
-
|
122
|
-
setTimeout(function () {
|
123
|
-
copy.load(arr)
|
124
|
-
t.equal(copy.get('a'), undefined)
|
125
|
-
t.equal(copy.get('b'), 'B')
|
126
|
-
}, 60)
|
127
|
-
|
128
|
-
setTimeout(function () {
|
129
|
-
t.equal(copy.get('b'), undefined)
|
130
|
-
t.end()
|
131
|
-
}, 90)
|
132
|
-
})
|
133
|
-
|
134
|
-
test('load to other size cache', function (t) {
|
135
|
-
var cache = new LRU({max: 2})
|
136
|
-
var copy = new LRU({max: 1})
|
137
|
-
|
138
|
-
cache.set('a', 'A')
|
139
|
-
cache.set('b', 'B')
|
140
|
-
|
141
|
-
copy.load(cache.dump())
|
142
|
-
t.equal(copy.get('a'), undefined)
|
143
|
-
t.equal(copy.get('b'), 'B')
|
144
|
-
|
145
|
-
// update the last read from original cache
|
146
|
-
cache.get('a')
|
147
|
-
copy.load(cache.dump())
|
148
|
-
t.equal(copy.get('a'), 'A')
|
149
|
-
t.equal(copy.get('b'), undefined)
|
150
|
-
|
151
|
-
t.end()
|
152
|
-
})
|
153
|
-
|
154
|
-
test('load to other age cache', function (t) {
|
155
|
-
var cache = new LRU({maxAge: 250})
|
156
|
-
var aged = new LRU({maxAge: 500})
|
157
|
-
var simple = new LRU()
|
158
|
-
var arr
|
159
|
-
|
160
|
-
// created at 0
|
161
|
-
// a would be valid till 0 + 250
|
162
|
-
cache.set('a', 'A')
|
163
|
-
setTimeout(function () {
|
164
|
-
// created at 20
|
165
|
-
// b would be valid till 100 + 250
|
166
|
-
cache.set('b', 'B')
|
167
|
-
// b would be valid till 100 + 350
|
168
|
-
cache.set('c', 'C', 350)
|
169
|
-
arr = cache.dump()
|
170
|
-
t.equal(arr.length, 3)
|
171
|
-
}, 100)
|
172
|
-
|
173
|
-
setTimeout(function () {
|
174
|
-
t.equal(cache.get('a'), undefined)
|
175
|
-
t.equal(cache.get('b'), 'B')
|
176
|
-
t.equal(cache.get('c'), 'C')
|
177
|
-
|
178
|
-
aged.load(arr)
|
179
|
-
t.equal(aged.get('a'), undefined)
|
180
|
-
t.equal(aged.get('b'), 'B')
|
181
|
-
t.equal(aged.get('c'), 'C')
|
182
|
-
|
183
|
-
simple.load(arr)
|
184
|
-
t.equal(simple.get('a'), undefined)
|
185
|
-
t.equal(simple.get('b'), 'B')
|
186
|
-
t.equal(simple.get('c'), 'C')
|
187
|
-
}, 300)
|
188
|
-
|
189
|
-
setTimeout(function () {
|
190
|
-
t.equal(cache.get('a'), undefined)
|
191
|
-
t.equal(cache.get('b'), undefined)
|
192
|
-
t.equal(cache.get('c'), 'C')
|
193
|
-
|
194
|
-
aged.load(arr)
|
195
|
-
t.equal(aged.get('a'), undefined)
|
196
|
-
t.equal(aged.get('b'), undefined)
|
197
|
-
t.equal(aged.get('c'), 'C')
|
198
|
-
|
199
|
-
simple.load(arr)
|
200
|
-
t.equal(simple.get('a'), undefined)
|
201
|
-
t.equal(simple.get('b'), undefined)
|
202
|
-
t.equal(simple.get('c'), 'C')
|
203
|
-
}, 400)
|
204
|
-
|
205
|
-
setTimeout(function () {
|
206
|
-
t.equal(cache.get('a'), undefined)
|
207
|
-
t.equal(cache.get('b'), undefined)
|
208
|
-
t.equal(cache.get('c'), undefined)
|
209
|
-
|
210
|
-
aged.load(arr)
|
211
|
-
t.equal(aged.get('a'), undefined)
|
212
|
-
t.equal(aged.get('b'), undefined)
|
213
|
-
t.equal(aged.get('c'), undefined)
|
214
|
-
|
215
|
-
simple.load(arr)
|
216
|
-
t.equal(simple.get('a'), undefined)
|
217
|
-
t.equal(simple.get('b'), undefined)
|
218
|
-
t.equal(simple.get('c'), undefined)
|
219
|
-
t.end()
|
220
|
-
}, 500)
|
221
|
-
})
|
222
|
-
|
223
|
-
test('dumpLru', function (t) {
|
224
|
-
var l = LRU()
|
225
|
-
t.isa(l.dumpLru(), Yallist)
|
226
|
-
t.end()
|
227
|
-
})
|