Skip to content

Commit df2451d

Browse files
committed
add node 20 to ci, workarounds for ts-node loader failing on node 20
1 parent 7d51bb3 commit df2451d

File tree

5 files changed

+31
-33
lines changed

5 files changed

+31
-33
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
build:
77
strategy:
88
matrix:
9-
node-version: [16.x, 18.x, 19.x]
9+
node-version: [16.x, 18.x, 20.x]
1010
platform:
1111
- os: ubuntu-latest
1212
shell: bash

package-lock.json

+21-21
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+5-6
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@
6868
"prettier": "^2.6.2",
6969
"size-limit": "^7.0.8",
7070
"tap": "^16.3.4",
71-
"ts-node": "^10.7.0",
71+
"ts-node": "^10.9.1",
7272
"tslib": "^2.4.0",
73-
"typedoc": "^0.23.24",
74-
"typescript": "^4.6.4"
73+
"typedoc": "^0.24.6",
74+
"typescript": "^5.0.4"
7575
},
7676
"license": "ISC",
7777
"files": [
@@ -95,9 +95,8 @@
9595
"coverage": false,
9696
"node-arg": [
9797
"--expose-gc",
98-
"--no-warnings",
99-
"--loader",
100-
"ts-node/esm"
98+
"-r",
99+
"ts-node/register"
101100
],
102101
"ts": false
103102
},

src/index.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -437,8 +437,8 @@ export namespace LRUCache {
437437
* Options provided to {@link LRUCache#fetch} when the FC type is
438438
* `undefined` or `void`
439439
*/
440-
export interface FetchOptionsNoContext<K, V, FC>
441-
extends FetchOptions<K, V, FC> {
440+
export interface FetchOptionsNoContext<K, V>
441+
extends FetchOptions<K, V, undefined> {
442442
context?: undefined
443443
}
444444

@@ -1994,7 +1994,7 @@ export class LRUCache<K extends {}, V extends {}, FC = unknown> {
19941994
fetchOptions: unknown extends FC
19951995
? LRUCache.FetchOptions<K, V, FC>
19961996
: FC extends undefined | void
1997-
? LRUCache.FetchOptionsNoContext<K, V, FC>
1997+
? LRUCache.FetchOptionsNoContext<K, V>
19981998
: LRUCache.FetchOptionsWithContext<K, V, FC>
19991999
): Promise<void | V>
20002000
// this overload not allowed if context is required
@@ -2007,7 +2007,7 @@ export class LRUCache<K extends {}, V extends {}, FC = unknown> {
20072007
fetchOptions?: unknown extends FC
20082008
? LRUCache.FetchOptions<K, V, FC>
20092009
: FC extends undefined | void
2010-
? LRUCache.FetchOptionsNoContext<K, V, FC>
2010+
? LRUCache.FetchOptionsNoContext<K, V>
20112011
: never
20122012
): Promise<void | V>
20132013
async fetch(

tsconfig-base.json

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"exclude": ["./test", "./tap-snapshots"],
32
"include": ["src/**/*.ts"],
43
"compilerOptions": {
54
"allowSyntheticDefaultImports": true,

0 commit comments

Comments
 (0)