File tree Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -28,19 +28,19 @@ jobs:
28
28
name : Node ${{ matrix.node-version }} on ${{ matrix.os }}
29
29
steps :
30
30
- name : Checkout
31
- uses : actions/checkout@v3
31
+ uses : actions/checkout@v4
32
32
with :
33
33
submodules : ' recursive'
34
34
35
35
- name : Install Node.js
36
- uses : actions/setup-node@v3
36
+ uses : actions/setup-node@v4
37
37
with :
38
38
node-version : ${{ matrix.node-version }}
39
39
# cache: 'pnpm'
40
40
41
- - uses : pnpm/action-setup@v2
41
+ - uses : pnpm/action-setup@v4
42
42
with :
43
- version : 8
43
+ version : 9
44
44
45
45
- name : Install dependencies
46
46
run : pnpm install --ignore-scripts
Original file line number Diff line number Diff line change @@ -18,21 +18,21 @@ jobs:
18
18
group : ${{ github.workflow }}-${{ github.ref }}
19
19
steps :
20
20
- name : Checkout
21
- uses : actions/checkout@v3
21
+ uses : actions/checkout@v4
22
22
with :
23
23
submodules : ' recursive'
24
24
25
25
- name : Install Node.js
26
- uses : actions/setup-node@v3
26
+ uses : actions/setup-node@v4
27
27
with :
28
28
node-version : 20
29
29
registry-url : https://registry.npmjs.com
30
30
31
- - uses : pnpm/action-setup@v2
31
+ - uses : pnpm/action-setup@v4
32
32
name : Install pnpm
33
33
id : pnpm-install
34
34
with :
35
- version : 8
35
+ version : 9
36
36
run_install : false
37
37
38
38
- name : Get pnpm store directory
Original file line number Diff line number Diff line change 1
1
// @see https://www.npmjs.com/package/lru-cache
2
-
2
+ type DisposeReason = 'set' | 'delete' | 'evict' | 'expired' ;
3
3
export interface LRUCacheOptions < K = string , V = unknown > {
4
4
/** The maximum number of items that remain in the cache. default 500 */
5
5
max ?: number ;
6
6
/** how long to live in ms. default 0 */
7
7
ttl ?: number ;
8
8
updateAgeOnGet ?: boolean ;
9
9
/** Function that is called on items when they are dropped from the cache */
10
- dispose ?( val : LRUCacheItem < V > , key : K , reason : string ) : void ;
10
+ dispose ?( val : LRUCacheItem < V > , key : K , reason : DisposeReason ) : void ;
11
11
}
12
12
13
13
interface LRUCacheItem < V > {
@@ -65,7 +65,7 @@ export class LRUCache<K = string, V = unknown> {
65
65
return value . v as T ;
66
66
}
67
67
/** Deletes a key out of the cache */
68
- delete ( key : K , reason = 'delete' ) {
68
+ delete ( key : K , reason : DisposeReason = 'delete' ) {
69
69
if ( ! this . cache . has ( key ) ) return false ;
70
70
const val = this . cache . get ( key ) ;
71
71
this . cache . delete ( key ) ;
You can’t perform that action at this time.
0 commit comments