Skip to content

Commit 7d4ba46

Browse files
committed
dep: updated @matrixai/async-cancellable and @matrixai/contexts
[ci skip]
1 parent f66185e commit 7d4ba46

File tree

6 files changed

+55
-29
lines changed

6 files changed

+55
-29
lines changed

package-lock.json

Lines changed: 45 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@
3636
"bench": "rimraf ./benches/results && ts-node ./benches"
3737
},
3838
"dependencies": {
39-
"@matrixai/async-cancellable": "^1.1.0",
39+
"@matrixai/async-cancellable": "^1.1.1",
4040
"@matrixai/async-init": "^1.8.4",
4141
"@matrixai/async-locks": "^4.0.0",
42-
"@matrixai/contexts": "^1.0.0",
42+
"@matrixai/contexts": "^1.1.0",
4343
"@matrixai/errors": "^1.1.7",
4444
"@matrixai/logger": "^3.1.0",
4545
"@matrixai/resources": "^1.1.5",

src/QUICClient.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { PromiseCancellable } from '@matrixai/async-cancellable';
2-
import type { ContextTimed } from '@matrixai/contexts';
2+
import type { ContextTimed, ContextTimedInput } from '@matrixai/contexts';
33
import type { ClientCrypto, Host, VerifyCallback } from './types';
44
import type { Config } from './native/types';
55
import type QUICConnectionMap from './QUICConnectionMap';
@@ -85,7 +85,7 @@ class QUICClient extends EventTarget {
8585
verifyCallback?: VerifyCallback;
8686
logger?: Logger;
8787
},
88-
ctx?: Partial<ContextTimed>,
88+
ctx?: Partial<ContextTimedInput>,
8989
): PromiseCancellable<QUICClient>;
9090
@timedCancellable(true, Infinity, errors.ErrorQUICClientCreateTimeOut)
9191
public static async createQUICClient(

src/QUICConnection.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { PromiseCancellable } from '@matrixai/async-cancellable';
2-
import type { ContextTimed } from '@matrixai/contexts';
2+
import type { ContextTimed, ContextTimedInput } from '@matrixai/contexts';
33
import type QUICSocket from './QUICSocket';
44
import type QUICConnectionId from './QUICConnectionId';
55
import type {
@@ -233,7 +233,7 @@ class QUICConnection extends EventTarget {
233233
verifyCallback?: VerifyCallback;
234234
logger?: Logger;
235235
},
236-
ctx?: Partial<ContextTimed>,
236+
ctx?: Partial<ContextTimedInput>,
237237
): PromiseCancellable<QUICConnection>;
238238
@timedCancellable(true, Infinity, errors.ErrorQUICConnectionStartTimeOut)
239239
public static async createQUICConnection(

src/types.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
1-
import type { Timer } from '@matrixai/timer';
21
import type QUICStream from './QUICStream';
32

4-
type ContextCancellable = {
5-
signal: AbortSignal;
6-
};
7-
8-
type ContextTimed = ContextCancellable & {
9-
timer: Timer;
10-
};
11-
123
/**
134
* Opaque types are wrappers of existing types
145
* that require smart constructors
@@ -328,7 +319,5 @@ export type {
328319
StreamCodeToReason,
329320
ConnectionMetadata,
330321
QUICConfig,
331-
ContextCancellable,
332-
ContextTimed,
333322
VerifyCallback,
334323
};

tests/QUICClient.test.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import type { KeyTypes, TLSConfigs } from './utils';
55
import Logger, { LogLevel, StreamHandler, formatting } from '@matrixai/logger';
66
import { fc, testProp } from '@fast-check/jest';
77
import { running } from '@matrixai/async-init';
8-
import { Timer } from '@matrixai/timer';
98
import QUICSocket from '@/QUICSocket';
109
import QUICClient from '@/QUICClient';
1110
import QUICServer from '@/QUICServer';
@@ -277,7 +276,7 @@ describe(QUICClient.name, () => {
277276
verifyPeer: false,
278277
},
279278
},
280-
{ timer: new Timer({ delay: 100 }) },
279+
{ timer: 100 },
281280
),
282281
).rejects.toThrow(errors.ErrorQUICClientCreateTimeOut);
283282
});
@@ -298,7 +297,7 @@ describe(QUICClient.name, () => {
298297
verifyPeer: false,
299298
},
300299
},
301-
{ timer: new Timer({ delay: 1000 }) },
300+
{ timer: 1000 },
302301
),
303302
).rejects.toThrow(errors.ErrorQUICConnectionInvalidConfig);
304303
// Smaller keepAliveIntervalTime doesn't cause a problem
@@ -317,7 +316,7 @@ describe(QUICClient.name, () => {
317316
verifyPeer: false,
318317
},
319318
},
320-
{ timer: new Timer({ delay: 100 }) },
319+
{ timer: 100 },
321320
),
322321
).rejects.not.toThrow(errors.ErrorQUICConnectionInvalidConfig);
323322
// Not setting an interval doesn't cause a problem either
@@ -1738,7 +1737,7 @@ describe(QUICClient.name, () => {
17381737
verifyPeer: false,
17391738
},
17401739
},
1741-
{ timer: new Timer({ delay: 500 }) },
1740+
{ timer: 500 },
17421741
);
17431742
testsUtils.extractSocket(client, sockets);
17441743
await connectionEventProm.p;

0 commit comments

Comments
 (0)