File tree Expand file tree Collapse file tree 11 files changed +20
-20
lines changed Expand file tree Collapse file tree 11 files changed +20
-20
lines changed Original file line number Diff line number Diff line change 18
18
"clean" : " rm -rf node_modules && rm -rf yarn.lock && yarn workspaces run clean"
19
19
},
20
20
"dependencies" : {
21
- "@types/node" : " ^18.15.11"
21
+ "@types/node" : " ^20.1.0" ,
22
+ "webpack" : " ^5.82.0"
22
23
},
23
24
"devDependencies" : {
24
25
"ava" : " ^5.2.0" ,
25
26
"c8" : " ^7.13.0" ,
26
- "xo" : " ^0.54.1 "
27
+ "xo" : " ^0.54.2 "
27
28
}
28
29
}
Original file line number Diff line number Diff line change 14
14
"xo" : {
15
15
"rules" : {
16
16
"unicorn/prefer-module" : 0 ,
17
+ "@typescript-eslint/no-unsafe-argument" : 0 ,
17
18
"@typescript-eslint/no-unsafe-call" : 0 ,
18
19
"@typescript-eslint/consistent-type-definitions" : 0 ,
19
20
"ava/no-ignored-test-files" : [
64
65
"tsd" : " ^0.28.1" ,
65
66
"typescript" : " ^5.0.3" ,
66
67
"webpack" : " ^5.77.0" ,
67
- "xo" : " ^0.53.1 "
68
+ "xo" : " ^0.54.2 "
68
69
},
69
70
"tsd" : {
70
71
"directory" : " test"
Original file line number Diff line number Diff line change 74
74
"ts-node" : " ^10.9.1" ,
75
75
"tsd" : " ^0.28.1" ,
76
76
"typescript" : " ^5.0.3" ,
77
- "xo" : " ^0.53.1 "
77
+ "xo" : " ^0.54.2 "
78
78
},
79
79
"tsd" : {
80
80
"directory" : " test"
Original file line number Diff line number Diff line change 68
68
"tsd" : " ^0.28.1" ,
69
69
"typescript" : " ^5.0.4" ,
70
70
"webpack" : " ^5.79.0" ,
71
- "xo" : " ^0.54.1 "
71
+ "xo" : " ^0.54.2 "
72
72
},
73
73
"tsd" : {
74
74
"directory" : " test"
Original file line number Diff line number Diff line change 14
14
"rules" : {
15
15
"unicorn/prefer-module" : 0 ,
16
16
"unicorn/prefer-node-protocol" : 0 ,
17
+ "unicorn/no-typeof-undefined" : 0 ,
17
18
"@typescript-eslint/consistent-type-definitions" : 0
18
19
}
19
20
},
47
48
"timekeeper" : " ^2.2.0" ,
48
49
"tsd" : " ^0.28.1" ,
49
50
"typescript" : " ^5.0.3" ,
50
- "xo" : " ^0.53.1 "
51
+ "xo" : " ^0.54.2 "
51
52
},
52
53
"tsd" : {
53
54
"directory" : " test"
Original file line number Diff line number Diff line change 16
16
"unicorn/no-array-reduce" : 0 ,
17
17
"unicorn/prefer-object-from-entries" : 0 ,
18
18
"unicorn/prefer-node-protocol" : 0 ,
19
+ "@typescript-eslint/consistent-type-imports" : 0 ,
19
20
"ava/no-ignored-test-files" : [
20
21
" error" ,
21
22
{
74
75
"ts-node" : " ^10.8.2" ,
75
76
"tsd" : " ^0.20.0" ,
76
77
"typescript" : " ^4.6.4" ,
77
- "xo" : " ^0.48.0 "
78
+ "xo" : " ^0.54.2 "
78
79
},
79
80
"tsd" : {
80
81
"directory" : " test"
Original file line number Diff line number Diff line change 1
1
import { EventEmitter } from 'events' ;
2
- import GridFSBucket from 'mongodb' ;
3
- import { Store , StoredData } from 'keyv' ;
2
+ import type GridFSBucket from 'mongodb' ;
3
+ import { type Store , type StoredData } from 'keyv' ;
4
4
5
5
declare class KeyvMongo < Value = any > extends EventEmitter implements Store < Value > {
6
6
readonly ttlSupport : false ;
@@ -27,7 +27,7 @@ declare class KeyvMongo<Value=any> extends EventEmitter implements Store<Value>
27
27
export = KeyvMongo ;
28
28
29
29
declare namespace KeyvMongo {
30
- interface Options {
30
+ type Options = {
31
31
url ?: string | undefined ;
32
32
collection ?: string | undefined ;
33
33
namespace ?: string | undefined ;
@@ -36,5 +36,5 @@ declare namespace KeyvMongo {
36
36
useGridFS ?: boolean | undefined ;
37
37
uri ?: string | undefined ;
38
38
dialect ?: string | undefined ;
39
- }
39
+ } ;
40
40
}
Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ class KeyvMongo extends EventEmitter {
131
131
stream . on ( 'error' , ( ) => resolve ( ) ) ;
132
132
133
133
stream . on ( 'end' , ( ) => {
134
- resp = Buffer . concat ( resp ) . toString ( 'utf-8 ' ) ;
134
+ resp = Buffer . concat ( resp ) . toString ( 'utf8 ' ) ;
135
135
resolve ( resp ) ;
136
136
} ) ;
137
137
@@ -181,11 +181,7 @@ class KeyvMongo extends EventEmitter {
181
181
for ( const key of keys ) {
182
182
const rowIndex = values . findIndex ( row => row . key === key ) ;
183
183
184
- if ( rowIndex > - 1 ) {
185
- results [ i ] = values [ rowIndex ] . value ;
186
- } else {
187
- results [ i ] = undefined ;
188
- }
184
+ results [ i ] = rowIndex > - 1 ? values [ rowIndex ] . value : undefined ;
189
185
190
186
i ++ ;
191
187
}
Original file line number Diff line number Diff line change 73
73
"ts-node" : " ^10.9.1" ,
74
74
"tsd" : " ^0.28.1" ,
75
75
"typescript" : " ^5.0.3" ,
76
- "xo" : " ^0.53.1 "
76
+ "xo" : " ^0.54.2 "
77
77
},
78
78
"tsd" : {
79
79
"directory" : " test"
Original file line number Diff line number Diff line change 70
70
"ts-node" : " ^10.9.1" ,
71
71
"tsd" : " ^0.28.1" ,
72
72
"typescript" : " ^5.0.3" ,
73
- "xo" : " ^0.53.1 "
73
+ "xo" : " ^0.54.2 "
74
74
},
75
75
"tsd" : {
76
76
"directory" : " test"
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ class KeyvRedis extends EventEmitter {
39
39
}
40
40
41
41
set ( key , value , ttl ) {
42
- if ( typeof value === ' undefined' ) {
42
+ if ( value === undefined ) {
43
43
return Promise . resolve ( undefined ) ;
44
44
}
45
45
You can’t perform that action at this time.
0 commit comments