Skip to content

Commit d24c5d8

Browse files
authored
Update to Node 22 LTS (#4832)
Switch typescript lib to es2024 and make necessary type changes Fixes #4796 Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
1 parent bb9280a commit d24c5d8

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "37.5.0",
44
"description": "Matrix Client-Server SDK for Javascript",
55
"engines": {
6-
"node": ">=20.0.0"
6+
"node": ">=22.0.0"
77
},
88
"scripts": {
99
"prepack": "yarn build",

spec/integ/crypto/verification.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1604,7 +1604,7 @@ function sha256(commitmentStr: string): string {
16041604
return encodeUnpaddedBase64(createHash("sha256").update(commitmentStr, "utf8").digest());
16051605
}
16061606

1607-
function encodeUnpaddedBase64(uint8Array: ArrayBuffer | Uint8Array): string {
1607+
function encodeUnpaddedBase64(uint8Array: ArrayLike<number>): string {
16081608
return Buffer.from(uint8Array).toString("base64").replace(/=+$/g, "");
16091609
}
16101610

@@ -1638,7 +1638,7 @@ function buildReadyMessage(
16381638
}
16391639

16401640
/** build an m.key.verification.start to-device message suitable for the m.reciprocate.v1 flow, originating from the dummy device */
1641-
function buildReciprocateStartMessage(transactionId: string, sharedSecret: ArrayBuffer) {
1641+
function buildReciprocateStartMessage(transactionId: string, sharedSecret: ArrayLike<number>) {
16421642
return {
16431643
type: "m.key.verification.start",
16441644
content: {

src/matrixrtc/EncryptionManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export class EncryptionManager implements IEncryptionManager {
8989
private transport: IKeyTransport,
9090
private statistics: Statistics,
9191
private onEncryptionKeysChanged: (
92-
keyBin: Uint8Array<ArrayBufferLike>,
92+
keyBin: Uint8Array,
9393
encryptionKeyIndex: number,
9494
participantId: string,
9595
) => void,

src/matrixrtc/MatrixRTCSession.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ export class MatrixRTCSession extends TypedEventEmitter<
417417
() => this.memberships,
418418
transport,
419419
this.statistics,
420-
(keyBin: Uint8Array<ArrayBufferLike>, encryptionKeyIndex: number, participantId: string) => {
420+
(keyBin: Uint8Array, encryptionKeyIndex: number, participantId: string) => {
421421
this.emit(MatrixRTCSessionEvent.EncryptionKeyChanged, keyBin, encryptionKeyIndex, participantId);
422422
},
423423
this.logger,

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"noEmit": true,
1010
"declaration": true,
1111
"strict": true,
12-
"allowImportingTsExtensions": true
12+
"allowImportingTsExtensions": true,
13+
"lib": ["es2024"]
1314
},
1415
"include": ["./src/**/*.ts", "./spec/**/*.ts"]
1516
}

0 commit comments

Comments
 (0)