From 725336ffc6c913d5a64018da0848b04b99f851e1 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Tue, 30 Aug 2022 17:41:54 +0100 Subject: [PATCH 01/33] sliding sync: add invited|joined_count This is critical for calculating client-side push rules correctly. Without it, the push processor may think rooms have a different number of members, resulting typically in annoying failure modes where rooms constantly make noises because the code thinks they are 1:1 rooms. --- spec/integ/sliding-sync-sdk.spec.ts | 33 +++++++++++++++++++++++++++++ src/sliding-sync-sdk.ts | 7 ++++++ src/sliding-sync.ts | 2 ++ 3 files changed, 42 insertions(+) diff --git a/spec/integ/sliding-sync-sdk.spec.ts b/spec/integ/sliding-sync-sdk.spec.ts index 34d84bddaed..299fe00279a 100644 --- a/spec/integ/sliding-sync-sdk.spec.ts +++ b/spec/integ/sliding-sync-sdk.spec.ts @@ -168,6 +168,7 @@ describe("SlidingSyncSdk", () => { const roomD = "!d_with_notif_count:localhost"; const roomE = "!e_with_invite:localhost"; const roomF = "!f_calc_room_name:localhost"; + const roomG = "!g_join_invite_counts:localhost"; const data: Record = { [roomA]: { name: "A", @@ -261,6 +262,18 @@ describe("SlidingSyncSdk", () => { ], initial: true, }, + [roomG]: { + name: "G", + required_state: [], + timeline: [ + mkOwnStateEvent(EventType.RoomCreate, { creator: selfUserId }, ""), + mkOwnStateEvent(EventType.RoomMember, { membership: "join" }, selfUserId), + mkOwnStateEvent(EventType.RoomPowerLevels, { users: { [selfUserId]: 100 } }, ""), + ], + joined_count: 5, + invited_count: 2, + initial: true, + }, }; it("can be created with required_state and timeline", () => { @@ -299,6 +312,14 @@ describe("SlidingSyncSdk", () => { ).toEqual(data[roomD].notification_count); }); + it("can be created with an invited/joined_count", () => { + mockSlidingSync.emit(SlidingSyncEvent.RoomData, roomG, data[roomG]); + const gotRoom = client.getRoom(roomG); + expect(gotRoom).toBeDefined(); + expect(gotRoom.getInvitedMemberCount()).toEqual(data[roomG].invited_count); + expect(gotRoom.getJoinedMemberCount()).toEqual(data[roomG].joined_count); + }); + it("can be created with invite_state", () => { mockSlidingSync.emit(SlidingSyncEvent.RoomData, roomE, data[roomE]); const gotRoom = client.getRoom(roomE); @@ -374,6 +395,18 @@ describe("SlidingSyncSdk", () => { ).toEqual(1); }); + it("can update with a new joined_count", () => { + mockSlidingSync.emit(SlidingSyncEvent.RoomData, roomG, { + name: data[roomD].name, + required_state: [], + timeline: [], + joined_count: 1, + }); + const gotRoom = client.getRoom(roomG); + expect(gotRoom).toBeDefined(); + expect(gotRoom.getJoinedMemberCount()).toEqual(1); + }); + // Regression test for a bug which caused the timeline entries to be out-of-order // when the same room appears twice with different timeline limits. E.g appears in // the list with timeline_limit:1 then appears again as a room subscription with diff --git a/src/sliding-sync-sdk.ts b/src/sliding-sync-sdk.ts index 99f33c9e5a1..c20c001bf00 100644 --- a/src/sliding-sync-sdk.ts +++ b/src/sliding-sync-sdk.ts @@ -472,6 +472,13 @@ export class SlidingSyncSdk { } } + if (Number.isInteger(roomData.invited_count)) { + room.currentState.setInvitedMemberCount(roomData.invited_count); + } + if (Number.isInteger(roomData.joined_count)) { + room.currentState.setJoinedMemberCount(roomData.joined_count); + } + if (roomData.invite_state) { const inviteStateEvents = mapEvents(this.client, room.roomId, roomData.invite_state); this.processRoomEvents(room, inviteStateEvents); diff --git a/src/sliding-sync.ts b/src/sliding-sync.ts index 5b5ec6a65d6..175e2f68a90 100644 --- a/src/sliding-sync.ts +++ b/src/sliding-sync.ts @@ -84,6 +84,8 @@ export interface MSC3575RoomData { timeline: (IRoomEvent | IStateEvent)[]; notification_count?: number; highlight_count?: number; + joined_count?: number; + invited_count?: number; invite_state?: IStateEvent[]; initial?: boolean; limited?: boolean; From 818b70554aa824cd6dcb519bb570d9d969d13070 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Tue, 30 Aug 2022 17:50:48 +0100 Subject: [PATCH 02/33] Strict TS checks --- spec/integ/sliding-sync-sdk.spec.ts | 13 +++++++++++++ src/sliding-sync-sdk.ts | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/spec/integ/sliding-sync-sdk.spec.ts b/spec/integ/sliding-sync-sdk.spec.ts index 299fe00279a..8244b5f9cd2 100644 --- a/spec/integ/sliding-sync-sdk.spec.ts +++ b/spec/integ/sliding-sync-sdk.spec.ts @@ -280,6 +280,7 @@ describe("SlidingSyncSdk", () => { mockSlidingSync.emit(SlidingSyncEvent.RoomData, roomA, data[roomA]); const gotRoom = client.getRoom(roomA); expect(gotRoom).toBeDefined(); + if (gotRoom == null) { return; } expect(gotRoom.name).toEqual(data[roomA].name); expect(gotRoom.getMyMembership()).toEqual("join"); assertTimelineEvents(gotRoom.getLiveTimeline().getEvents().slice(-2), data[roomA].timeline); @@ -289,6 +290,7 @@ describe("SlidingSyncSdk", () => { mockSlidingSync.emit(SlidingSyncEvent.RoomData, roomB, data[roomB]); const gotRoom = client.getRoom(roomB); expect(gotRoom).toBeDefined(); + if (gotRoom == null) { return; } expect(gotRoom.name).toEqual(data[roomB].name); expect(gotRoom.getMyMembership()).toEqual("join"); assertTimelineEvents(gotRoom.getLiveTimeline().getEvents().slice(-5), data[roomB].timeline); @@ -298,6 +300,7 @@ describe("SlidingSyncSdk", () => { mockSlidingSync.emit(SlidingSyncEvent.RoomData, roomC, data[roomC]); const gotRoom = client.getRoom(roomC); expect(gotRoom).toBeDefined(); + if (gotRoom == null) { return; } expect( gotRoom.getUnreadNotificationCount(NotificationCountType.Highlight), ).toEqual(data[roomC].highlight_count); @@ -307,6 +310,7 @@ describe("SlidingSyncSdk", () => { mockSlidingSync.emit(SlidingSyncEvent.RoomData, roomD, data[roomD]); const gotRoom = client.getRoom(roomD); expect(gotRoom).toBeDefined(); + if (gotRoom == null) { return; } expect( gotRoom.getUnreadNotificationCount(NotificationCountType.Total), ).toEqual(data[roomD].notification_count); @@ -316,6 +320,7 @@ describe("SlidingSyncSdk", () => { mockSlidingSync.emit(SlidingSyncEvent.RoomData, roomG, data[roomG]); const gotRoom = client.getRoom(roomG); expect(gotRoom).toBeDefined(); + if (gotRoom == null) { return; } expect(gotRoom.getInvitedMemberCount()).toEqual(data[roomG].invited_count); expect(gotRoom.getJoinedMemberCount()).toEqual(data[roomG].joined_count); }); @@ -324,6 +329,7 @@ describe("SlidingSyncSdk", () => { mockSlidingSync.emit(SlidingSyncEvent.RoomData, roomE, data[roomE]); const gotRoom = client.getRoom(roomE); expect(gotRoom).toBeDefined(); + if (gotRoom == null) { return; } expect(gotRoom.getMyMembership()).toEqual("invite"); expect(gotRoom.currentState.getJoinRule()).toEqual(JoinRule.Invite); }); @@ -332,6 +338,7 @@ describe("SlidingSyncSdk", () => { mockSlidingSync.emit(SlidingSyncEvent.RoomData, roomF, data[roomF]); const gotRoom = client.getRoom(roomF); expect(gotRoom).toBeDefined(); + if (gotRoom == null) { return; } expect( gotRoom.name, ).toEqual(data[roomF].name); @@ -347,6 +354,7 @@ describe("SlidingSyncSdk", () => { }); const gotRoom = client.getRoom(roomA); expect(gotRoom).toBeDefined(); + if (gotRoom == null) { return; } const newTimeline = data[roomA].timeline; newTimeline.push(newEvent); assertTimelineEvents(gotRoom.getLiveTimeline().getEvents().slice(-3), newTimeline); @@ -364,6 +372,7 @@ describe("SlidingSyncSdk", () => { }); gotRoom = client.getRoom(roomB); expect(gotRoom).toBeDefined(); + if (gotRoom == null) { return; } expect(gotRoom.getJoinRule()).toEqual(JoinRule.Restricted); }); @@ -376,6 +385,7 @@ describe("SlidingSyncSdk", () => { }); const gotRoom = client.getRoom(roomC); expect(gotRoom).toBeDefined(); + if (gotRoom == null) { return; } expect( gotRoom.getUnreadNotificationCount(NotificationCountType.Highlight), ).toEqual(1); @@ -390,6 +400,7 @@ describe("SlidingSyncSdk", () => { }); const gotRoom = client.getRoom(roomD); expect(gotRoom).toBeDefined(); + if (gotRoom == null) { return; } expect( gotRoom.getUnreadNotificationCount(NotificationCountType.Total), ).toEqual(1); @@ -404,6 +415,7 @@ describe("SlidingSyncSdk", () => { }); const gotRoom = client.getRoom(roomG); expect(gotRoom).toBeDefined(); + if (gotRoom == null) { return; } expect(gotRoom.getJoinedMemberCount()).toEqual(1); }); @@ -427,6 +439,7 @@ describe("SlidingSyncSdk", () => { }); const gotRoom = client.getRoom(roomA); expect(gotRoom).toBeDefined(); + if (gotRoom == null) { return; } logger.log("want:", oldTimeline.map((e) => (e.type + " : " + (e.content || {}).body))); logger.log("got:", gotRoom.getLiveTimeline().getEvents().map( diff --git a/src/sliding-sync-sdk.ts b/src/sliding-sync-sdk.ts index c20c001bf00..aab0ea45f48 100644 --- a/src/sliding-sync-sdk.ts +++ b/src/sliding-sync-sdk.ts @@ -473,10 +473,10 @@ export class SlidingSyncSdk { } if (Number.isInteger(roomData.invited_count)) { - room.currentState.setInvitedMemberCount(roomData.invited_count); + room.currentState.setInvitedMemberCount(roomData.invited_count!); } if (Number.isInteger(roomData.joined_count)) { - room.currentState.setJoinedMemberCount(roomData.joined_count); + room.currentState.setJoinedMemberCount(roomData.joined_count!); } if (roomData.invite_state) { From 2d9556c1bbbebc3d57f3e30eb6a865357e28a186 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Tue, 30 Aug 2022 18:00:03 +0100 Subject: [PATCH 03/33] More strict TS type checking --- spec/integ/sliding-sync-sdk.spec.ts | 2 ++ src/sliding-sync.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/integ/sliding-sync-sdk.spec.ts b/spec/integ/sliding-sync-sdk.spec.ts index 8244b5f9cd2..f7dc6875492 100644 --- a/spec/integ/sliding-sync-sdk.spec.ts +++ b/spec/integ/sliding-sync-sdk.spec.ts @@ -362,6 +362,8 @@ describe("SlidingSyncSdk", () => { it("can update with a new required_state event", async () => { let gotRoom = client.getRoom(roomB); + expect(gotRoom).toBeDefined(); + if (gotRoom == null) { return; } expect(gotRoom.getJoinRule()).toEqual(JoinRule.Invite); // default mockSlidingSync.emit(SlidingSyncEvent.RoomData, roomB, { required_state: [ diff --git a/src/sliding-sync.ts b/src/sliding-sync.ts index 175e2f68a90..5730c8f3644 100644 --- a/src/sliding-sync.ts +++ b/src/sliding-sync.ts @@ -322,7 +322,7 @@ export enum SlidingSyncEvent { export type SlidingSyncEventHandlerMap = { [SlidingSyncEvent.RoomData]: (roomId: string, roomData: MSC3575RoomData) => void; - [SlidingSyncEvent.Lifecycle]: (state: SlidingSyncState, resp: MSC3575SlidingSyncResponse, err: Error) => void; + [SlidingSyncEvent.Lifecycle]: (state: SlidingSyncState, resp: MSC3575SlidingSyncResponse | null, err: Error) => void; [SlidingSyncEvent.List]: ( listIndex: number, joinedCount: number, roomIndexToRoomId: Record, ) => void; From c32a83fdac4ba6fac791b01fb94d86f68b28f824 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Tue, 30 Aug 2022 18:02:56 +0100 Subject: [PATCH 04/33] Linting --- src/sliding-sync.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sliding-sync.ts b/src/sliding-sync.ts index 5730c8f3644..712564e9d08 100644 --- a/src/sliding-sync.ts +++ b/src/sliding-sync.ts @@ -322,7 +322,9 @@ export enum SlidingSyncEvent { export type SlidingSyncEventHandlerMap = { [SlidingSyncEvent.RoomData]: (roomId: string, roomData: MSC3575RoomData) => void; - [SlidingSyncEvent.Lifecycle]: (state: SlidingSyncState, resp: MSC3575SlidingSyncResponse | null, err: Error) => void; + [SlidingSyncEvent.Lifecycle]: ( + state: SlidingSyncState, resp: MSC3575SlidingSyncResponse | null, err: Error, + ) => void; [SlidingSyncEvent.List]: ( listIndex: number, joinedCount: number, roomIndexToRoomId: Record, ) => void; From b5576758e4bd2d3cf1be7a1f7de777a6eb9daa1c Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Tue, 30 Aug 2022 18:07:53 +0100 Subject: [PATCH 05/33] Even more strict TS type checking --- src/sliding-sync-sdk.ts | 5 ++++- src/sliding-sync.ts | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/sliding-sync-sdk.ts b/src/sliding-sync-sdk.ts index aab0ea45f48..233c0c31da5 100644 --- a/src/sliding-sync-sdk.ts +++ b/src/sliding-sync-sdk.ts @@ -293,13 +293,16 @@ export class SlidingSyncSdk { this.processRoomData(this.client, room, roomData); } - private onLifecycle(state: SlidingSyncState, resp: MSC3575SlidingSyncResponse, err?: Error): void { + private onLifecycle(state: SlidingSyncState, resp?: MSC3575SlidingSyncResponse, err?: Error): void { if (err) { logger.debug("onLifecycle", state, err); } switch (state) { case SlidingSyncState.Complete: this.purgeNotifications(); + if (!resp) { + break; + } // Element won't stop showing the initial loading spinner unless we fire SyncState.Prepared if (!this.lastPos) { this.updateSyncState(SyncState.Prepared, { diff --git a/src/sliding-sync.ts b/src/sliding-sync.ts index 712564e9d08..da6419c9676 100644 --- a/src/sliding-sync.ts +++ b/src/sliding-sync.ts @@ -323,7 +323,7 @@ export enum SlidingSyncEvent { export type SlidingSyncEventHandlerMap = { [SlidingSyncEvent.RoomData]: (roomId: string, roomData: MSC3575RoomData) => void; [SlidingSyncEvent.Lifecycle]: ( - state: SlidingSyncState, resp: MSC3575SlidingSyncResponse | null, err: Error, + state: SlidingSyncState, resp: MSC3575SlidingSyncResponse | null, err: Error | null, ) => void; [SlidingSyncEvent.List]: ( listIndex: number, joinedCount: number, roomIndexToRoomId: Record, From ac7f505a2b67b1a6157efe07afcf602803e33f95 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Tue, 30 Aug 2022 18:13:37 +0100 Subject: [PATCH 06/33] Use the right nulls --- src/sliding-sync-sdk.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sliding-sync-sdk.ts b/src/sliding-sync-sdk.ts index 233c0c31da5..21d2af63f0d 100644 --- a/src/sliding-sync-sdk.ts +++ b/src/sliding-sync-sdk.ts @@ -293,7 +293,7 @@ export class SlidingSyncSdk { this.processRoomData(this.client, room, roomData); } - private onLifecycle(state: SlidingSyncState, resp?: MSC3575SlidingSyncResponse, err?: Error): void { + private onLifecycle(state: SlidingSyncState, resp: MSC3575SlidingSyncResponse | null, err: Error | null): void { if (err) { logger.debug("onLifecycle", state, err); } From 876491e38d7bf382125863e42beb9045b81b6d2a Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 6 Sep 2022 12:36:54 +0100 Subject: [PATCH 07/33] Remove redundant concurrency --- .github/workflows/release-npm.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release-npm.yml b/.github/workflows/release-npm.yml index b123667edac..512af0c151f 100644 --- a/.github/workflows/release-npm.yml +++ b/.github/workflows/release-npm.yml @@ -5,7 +5,6 @@ on: secrets: NPM_TOKEN: required: true -concurrency: ${{ github.workflow }}-${{ github.ref }} jobs: npm: name: Publish to npm From 8aee884d03d79934e8944b05c22643c1bb480a64 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 6 Sep 2022 13:27:24 +0100 Subject: [PATCH 08/33] Fix handling of remote echoes doubling up (#2639) * Fix handling of remote echoes doubling up * Simplify code * Make TSC strict happier * Update `timelineWasEmpty` to match type * Add tests * Add tests * Add lowly `!` --- spec/unit/event-timeline-set.spec.ts | 33 +++++++++++++++++++++++++++- spec/unit/room.spec.ts | 15 +++++++++++-- src/models/event-timeline-set.ts | 16 ++++---------- src/models/room.ts | 33 +++++++++++++++------------- 4 files changed, 67 insertions(+), 30 deletions(-) diff --git a/spec/unit/event-timeline-set.spec.ts b/spec/unit/event-timeline-set.spec.ts index 42f4bca4de2..e6c45fbd460 100644 --- a/spec/unit/event-timeline-set.spec.ts +++ b/spec/unit/event-timeline-set.spec.ts @@ -16,14 +16,15 @@ limitations under the License. import * as utils from "../test-utils/test-utils"; import { + DuplicateStrategy, EventTimeline, EventTimelineSet, EventType, + Filter, MatrixClient, MatrixEvent, MatrixEventEvent, Room, - DuplicateStrategy, } from '../../src'; import { Thread } from "../../src/models/thread"; import { ReEmitter } from "../../src/ReEmitter"; @@ -291,4 +292,34 @@ describe('EventTimelineSet', () => { expect(eventTimelineSet.canContain(event)).toBeTruthy(); }); }); + + describe("handleRemoteEcho", () => { + it("should add to liveTimeline only if the event matches the filter", () => { + const filter = new Filter(client.getUserId()!, "test_filter"); + filter.setDefinition({ + room: { + timeline: { + types: [EventType.RoomMessage], + }, + }, + }); + const eventTimelineSet = new EventTimelineSet(room, { filter }, client); + + const roomMessageEvent = new MatrixEvent({ + type: EventType.RoomMessage, + content: { body: "test" }, + event_id: "!test1:server", + }); + eventTimelineSet.handleRemoteEcho(roomMessageEvent, "~!local-event-id:server", roomMessageEvent.getId()); + expect(eventTimelineSet.getLiveTimeline().getEvents()).toContain(roomMessageEvent); + + const roomFilteredEvent = new MatrixEvent({ + type: "other_event_type", + content: { body: "test" }, + event_id: "!test2:server", + }); + eventTimelineSet.handleRemoteEcho(roomFilteredEvent, "~!local-event-id:server", roomFilteredEvent.getId()); + expect(eventTimelineSet.getLiveTimeline().getEvents()).not.toContain(roomFilteredEvent); + }); + }); }); diff --git a/spec/unit/room.spec.ts b/spec/unit/room.spec.ts index 695bc12271f..800415d2b8d 100644 --- a/spec/unit/room.spec.ts +++ b/spec/unit/room.spec.ts @@ -288,11 +288,11 @@ describe("Room", function() { room.addLiveEvents(events); expect(room.currentState.setStateEvents).toHaveBeenCalledWith( [events[0]], - { timelineWasEmpty: undefined }, + { timelineWasEmpty: false }, ); expect(room.currentState.setStateEvents).toHaveBeenCalledWith( [events[1]], - { timelineWasEmpty: undefined }, + { timelineWasEmpty: false }, ); expect(events[0].forwardLooking).toBe(true); expect(events[1].forwardLooking).toBe(true); @@ -426,6 +426,17 @@ describe("Room", function() { // but without the event ID matching we will still have the local event in pending events expect(room.getEventForTxnId(txnId)).toBeUndefined(); }); + + it("should correctly handle remote echoes from other devices", () => { + const remoteEvent = utils.mkMessage({ + room: roomId, user: userA, event: true, + }); + remoteEvent.event.unsigned = { transaction_id: "TXN_ID" }; + + // add the remoteEvent + room.addLiveEvents([remoteEvent]); + expect(room.timeline.length).toEqual(1); + }); }); describe('addEphemeralEvents', () => { diff --git a/src/models/event-timeline-set.ts b/src/models/event-timeline-set.ts index 8d11f4a6343..a951a399a4a 100644 --- a/src/models/event-timeline-set.ts +++ b/src/models/event-timeline-set.ts @@ -729,18 +729,10 @@ export class EventTimelineSet extends TypedEventEmitter } } } - - if (event.getUnsigned().transaction_id) { - const existingEvent = this.txnToEvent[event.getUnsigned().transaction_id]; - if (existingEvent) { - // remote echo of an event we sent earlier - this.handleRemoteEcho(event, existingEvent); - } - } } /** @@ -1996,7 +1988,7 @@ export class Room extends TypedEventEmitter * "Room.timeline". * * @param {MatrixEvent} event Event to be added - * @param {IAddLiveEventOptions} options addLiveEvent options + * @param {IAddLiveEventOptions} addLiveEventOptions addLiveEvent options * @fires module:client~MatrixClient#event:"Room.timeline" * @private */ @@ -2344,7 +2336,7 @@ export class Room extends TypedEventEmitter fromCache = false, ): void { let duplicateStrategy = duplicateStrategyOrOpts as DuplicateStrategy; - let timelineWasEmpty: boolean; + let timelineWasEmpty = false; if (typeof (duplicateStrategyOrOpts) === 'object') { ({ duplicateStrategy, @@ -2383,10 +2375,25 @@ export class Room extends TypedEventEmitter const threadRoots = this.findThreadRoots(events); const eventsByThread: { [threadId: string]: MatrixEvent[] } = {}; + const options: IAddLiveEventOptions = { + duplicateStrategy, + fromCache, + timelineWasEmpty, + }; + for (const event of events) { // TODO: We should have a filter to say "only add state event types X Y Z to the timeline". this.processLiveEvent(event); + if (event.getUnsigned().transaction_id) { + const existingEvent = this.txnToEvent[event.getUnsigned().transaction_id!]; + if (existingEvent) { + // remote echo of an event we sent earlier + this.handleRemoteEcho(event, existingEvent); + continue; // we can skip adding the event to the timeline sets, it is already there + } + } + const { shouldLiveInRoom, shouldLiveInThread, @@ -2399,11 +2406,7 @@ export class Room extends TypedEventEmitter eventsByThread[threadId]?.push(event); if (shouldLiveInRoom) { - this.addLiveEvent(event, { - duplicateStrategy, - fromCache, - timelineWasEmpty, - }); + this.addLiveEvent(event, options); } } From 0fa125b60a38d7b1460c63d97f4c7bbe50345e85 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 6 Sep 2022 17:52:57 +0100 Subject: [PATCH 09/33] Update babel monorepo to v7.19.0 (#2644) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 279 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 166 insertions(+), 113 deletions(-) diff --git a/yarn.lock b/yarn.lock index 357baa5eb2b..55d0b911991 100644 --- a/yarn.lock +++ b/yarn.lock @@ -58,26 +58,26 @@ dependencies: "@babel/highlight" "^7.18.6" -"@babel/compat-data@^7.17.7", "@babel/compat-data@^7.18.8": - version "7.18.13" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.18.13.tgz#6aff7b350a1e8c3e40b029e46cbe78e24a913483" - integrity sha512-5yUzC5LqyTFp2HLmDoxGQelcdYgSpP9xsnMWBphAscOdFrHSAVbLNzWiy32sVNDqJRDiJK6klfDnAgu6PAGSHw== +"@babel/compat-data@^7.17.7", "@babel/compat-data@^7.18.8", "@babel/compat-data@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.19.0.tgz#2a592fd89bacb1fcde68de31bee4f2f2dacb0e86" + integrity sha512-y5rqgTTPTmaF5e2nVhOxw+Ur9HDJLsWb6U/KpgUzRZEdPfE6VOubXBKLdbcUTijzRptednSBDQbYZBOSqJxpJw== "@babel/core@^7.11.6", "@babel/core@^7.12.10", "@babel/core@^7.12.3", "@babel/core@^7.7.5": - version "7.18.13" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.18.13.tgz#9be8c44512751b05094a4d3ab05fc53a47ce00ac" - integrity sha512-ZisbOvRRusFktksHSG6pjj1CSvkPkcZq/KHD45LAkVP/oiHJkNBZWfpvlLmX8OtHDG8IuzsFlVRWo08w7Qxn0A== + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.19.0.tgz#d2f5f4f2033c00de8096be3c9f45772563e150c3" + integrity sha512-reM4+U7B9ss148rh2n1Qs9ASS+w94irYXga7c2jaQv9RVzpS7Mv1a9rnYYwuDa45G+DkORt9g6An2k/V4d9LbQ== dependencies: "@ampproject/remapping" "^2.1.0" "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.18.13" - "@babel/helper-compilation-targets" "^7.18.9" - "@babel/helper-module-transforms" "^7.18.9" - "@babel/helpers" "^7.18.9" - "@babel/parser" "^7.18.13" + "@babel/generator" "^7.19.0" + "@babel/helper-compilation-targets" "^7.19.0" + "@babel/helper-module-transforms" "^7.19.0" + "@babel/helpers" "^7.19.0" + "@babel/parser" "^7.19.0" "@babel/template" "^7.18.10" - "@babel/traverse" "^7.18.13" - "@babel/types" "^7.18.13" + "@babel/traverse" "^7.19.0" + "@babel/types" "^7.19.0" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" @@ -100,7 +100,7 @@ dependencies: eslint-rule-composer "^0.3.0" -"@babel/generator@^7.12.11", "@babel/generator@^7.18.13", "@babel/generator@^7.7.2": +"@babel/generator@^7.12.11", "@babel/generator@^7.7.2": version "7.18.13" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.13.tgz#59550cbb9ae79b8def15587bdfbaa388c4abf212" integrity sha512-CkPg8ySSPuHTYPJYo7IRALdqyjM9HCbt/3uOBEFbzyGVP6Mn8bwFPB0jX6982JVNBlYzM1nnPkfjuXSOPtQeEQ== @@ -109,6 +109,15 @@ "@jridgewell/gen-mapping" "^0.3.2" jsesc "^2.5.1" +"@babel/generator@^7.18.13", "@babel/generator@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.19.0.tgz#785596c06425e59334df2ccee63ab166b738419a" + integrity sha512-S1ahxf1gZ2dpoiFgA+ohK9DIpz50bJ0CWs7Zlzb54Z4sG8qmdIrGrVqmy1sAtTVRb+9CU6U8VqT9L0Zj7hxHVg== + dependencies: + "@babel/types" "^7.19.0" + "@jridgewell/gen-mapping" "^0.3.2" + jsesc "^2.5.1" + "@babel/helper-annotate-as-pure@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz#eaa49f6f80d5a33f9a5dd2276e6d6e451be0a6bb" @@ -124,17 +133,30 @@ "@babel/helper-explode-assignable-expression" "^7.18.6" "@babel/types" "^7.18.9" -"@babel/helper-compilation-targets@^7.17.7", "@babel/helper-compilation-targets@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.9.tgz#69e64f57b524cde3e5ff6cc5a9f4a387ee5563bf" - integrity sha512-tzLCyVmqUiFlcFoAPLA/gL9TeYrF61VLNtb+hvkuVaB5SUjW7jcfrglBIX1vUIoT7CLP3bBlIMeyEsIl2eFQNg== +"@babel/helper-compilation-targets@^7.17.7", "@babel/helper-compilation-targets@^7.18.9", "@babel/helper-compilation-targets@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.0.tgz#537ec8339d53e806ed422f1e06c8f17d55b96bb0" + integrity sha512-Ai5bNWXIvwDvWM7njqsG3feMlL9hCVQsPYXodsZyLwshYkZVJt59Gftau4VrE8S9IT9asd2uSP1hG6wCNw+sXA== dependencies: - "@babel/compat-data" "^7.18.8" + "@babel/compat-data" "^7.19.0" "@babel/helper-validator-option" "^7.18.6" browserslist "^4.20.2" semver "^6.3.0" -"@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.18.9": +"@babel/helper-create-class-features-plugin@^7.18.6": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.19.0.tgz#bfd6904620df4e46470bae4850d66be1054c404b" + integrity sha512-NRz8DwF4jT3UfrmUoZjd0Uph9HQnP30t7Ash+weACcyNkiYTywpIjDBgReJMKgr+n86sn2nPVVmJ28Dm053Kqw== + dependencies: + "@babel/helper-annotate-as-pure" "^7.18.6" + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-function-name" "^7.19.0" + "@babel/helper-member-expression-to-functions" "^7.18.9" + "@babel/helper-optimise-call-expression" "^7.18.6" + "@babel/helper-replace-supers" "^7.18.9" + "@babel/helper-split-export-declaration" "^7.18.6" + +"@babel/helper-create-class-features-plugin@^7.18.9": version "7.18.13" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.13.tgz#63e771187bd06d234f95fdf8bd5f8b6429de6298" integrity sha512-hDvXp+QYxSRL+23mpAlSGxHMDyIGChm0/AwTfTAAK5Ufe40nCsyNdaYCGuK91phn/fVu9kqayImRDkvNAgdrsA== @@ -147,10 +169,10 @@ "@babel/helper-replace-supers" "^7.18.9" "@babel/helper-split-export-declaration" "^7.18.6" -"@babel/helper-create-regexp-features-plugin@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.18.6.tgz#3e35f4e04acbbf25f1b3534a657610a000543d3c" - integrity sha512-7LcpH1wnQLGrI+4v+nPp+zUvIkF9x0ddv1Hkdue10tg3gmRnLy97DXh4STiOf1qeIInyD69Qv5kKSZzKD8B/7A== +"@babel/helper-create-regexp-features-plugin@^7.18.6", "@babel/helper-create-regexp-features-plugin@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.19.0.tgz#7976aca61c0984202baca73d84e2337a5424a41b" + integrity sha512-htnV+mHX32DF81amCDrwIDr8nrp1PTm+3wfBN9/v8QJOLEioOCOG7qNyq0nHeFiWbT3Eb7gsPwEmV64UCQ1jzw== dependencies: "@babel/helper-annotate-as-pure" "^7.18.6" regexpu-core "^5.1.0" @@ -179,13 +201,13 @@ dependencies: "@babel/types" "^7.18.6" -"@babel/helper-function-name@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.18.9.tgz#940e6084a55dee867d33b4e487da2676365e86b0" - integrity sha512-fJgWlZt7nxGksJS9a0XdSaI4XvpExnNIgRP+rVefWh5U7BL8pPuir6SJUmFKRfjWQ51OtWSzwOxhaH/EBWWc0A== +"@babel/helper-function-name@^7.18.9", "@babel/helper-function-name@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz#941574ed5390682e872e52d3f38ce9d1bef4648c" + integrity sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w== dependencies: - "@babel/template" "^7.18.6" - "@babel/types" "^7.18.9" + "@babel/template" "^7.18.10" + "@babel/types" "^7.19.0" "@babel/helper-hoist-variables@^7.18.6": version "7.18.6" @@ -208,19 +230,19 @@ dependencies: "@babel/types" "^7.18.6" -"@babel/helper-module-transforms@^7.18.6", "@babel/helper-module-transforms@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.18.9.tgz#5a1079c005135ed627442df31a42887e80fcb712" - integrity sha512-KYNqY0ICwfv19b31XzvmI/mfcylOzbLtowkw+mfvGPAQ3kfCnMLYbED3YecL5tPd8nAYFQFAd6JHp2LxZk/J1g== +"@babel/helper-module-transforms@^7.18.6", "@babel/helper-module-transforms@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz#309b230f04e22c58c6a2c0c0c7e50b216d350c30" + integrity sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ== dependencies: "@babel/helper-environment-visitor" "^7.18.9" "@babel/helper-module-imports" "^7.18.6" "@babel/helper-simple-access" "^7.18.6" "@babel/helper-split-export-declaration" "^7.18.6" "@babel/helper-validator-identifier" "^7.18.6" - "@babel/template" "^7.18.6" - "@babel/traverse" "^7.18.9" - "@babel/types" "^7.18.9" + "@babel/template" "^7.18.10" + "@babel/traverse" "^7.19.0" + "@babel/types" "^7.19.0" "@babel/helper-optimise-call-expression@^7.18.6": version "7.18.6" @@ -229,10 +251,10 @@ dependencies: "@babel/types" "^7.18.6" -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.18.9", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.9.tgz#4b8aea3b069d8cb8a72cdfe28ddf5ceca695ef2f" - integrity sha512-aBXPT3bmtLryXaoJLyYPXPlSD4p1ld9aYeR+sJNOZjJJGiOpb+fKfh3NkcCu7J54nUJwCERPBExCCpyCOHnu/w== +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.18.9", "@babel/helper-plugin-utils@^7.19.0", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz#4796bb14961521f0f8715990bee2fb6e51ce21bf" + integrity sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw== "@babel/helper-remap-async-to-generator@^7.18.6", "@babel/helper-remap-async-to-generator@^7.18.9": version "7.18.9" @@ -292,23 +314,23 @@ integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw== "@babel/helper-wrap-function@^7.18.9": - version "7.18.11" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.18.11.tgz#bff23ace436e3f6aefb61f85ffae2291c80ed1fb" - integrity sha512-oBUlbv+rjZLh2Ks9SKi4aL7eKaAXBWleHzU89mP0G6BMUlRxSckk9tSIkgDGydhgFxHuGSlBQZfnaD47oBEB7w== + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.19.0.tgz#89f18335cff1152373222f76a4b37799636ae8b1" + integrity sha512-txX8aN8CZyYGTwcLhlk87KRqncAzhh5TpQamZUa0/u3an36NtDpUP6bQgBCBcLeBs09R/OwQu3OjK0k/HwfNDg== dependencies: - "@babel/helper-function-name" "^7.18.9" + "@babel/helper-function-name" "^7.19.0" "@babel/template" "^7.18.10" - "@babel/traverse" "^7.18.11" - "@babel/types" "^7.18.10" + "@babel/traverse" "^7.19.0" + "@babel/types" "^7.19.0" -"@babel/helpers@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.18.9.tgz#4bef3b893f253a1eced04516824ede94dcfe7ff9" - integrity sha512-Jf5a+rbrLoR4eNdUmnFu8cN5eNJT6qdTdOg5IHIzq87WwyRw9PwguLFOWYgktN/60IP4fgDUawJvs7PjQIzELQ== +"@babel/helpers@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.19.0.tgz#f30534657faf246ae96551d88dd31e9d1fa1fc18" + integrity sha512-DRBCKGwIEdqY3+rPJgG/dKfQy9+08rHIAJx8q2p+HSWP87s2HCrQmaAMMyMll2kIXKCW0cO1RdQskx15Xakftg== dependencies: - "@babel/template" "^7.18.6" - "@babel/traverse" "^7.18.9" - "@babel/types" "^7.18.9" + "@babel/template" "^7.18.10" + "@babel/traverse" "^7.19.0" + "@babel/types" "^7.19.0" "@babel/highlight@^7.18.6": version "7.18.6" @@ -319,11 +341,16 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.18.10", "@babel/parser@^7.18.13", "@babel/parser@^7.2.3", "@babel/parser@^7.9.4": +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.2.3", "@babel/parser@^7.9.4": version "7.18.13" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.13.tgz#5b2dd21cae4a2c5145f1fbd8ca103f9313d3b7e4" integrity sha512-dgXcIfMuQ0kgzLB2b9tRZs7TTFFaGM2AbtA4fJgUUYukzGH4jwsS7hzQHEGs67jdehpm22vkgKwvbU+aEflgwg== +"@babel/parser@^7.18.10", "@babel/parser@^7.18.13", "@babel/parser@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.19.0.tgz#497fcafb1d5b61376959c1c338745ef0577aa02c" + integrity sha512-74bEXKX2h+8rrfQUfsBfuZZHzsEs6Eql4pqy/T4Nn6Y9wNPggQOqD6z6pn5Bl8ZfysKouFZT/UXEH94ummEeQw== + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz#da5b8f9a580acdfbe53494dba45ea389fb09a4d2" @@ -340,13 +367,13 @@ "@babel/helper-skip-transparent-expression-wrappers" "^7.18.9" "@babel/plugin-proposal-optional-chaining" "^7.18.9" -"@babel/plugin-proposal-async-generator-functions@^7.18.10": - version "7.18.10" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.18.10.tgz#85ea478c98b0095c3e4102bff3b67d306ed24952" - integrity sha512-1mFuY2TOsR1hxbjCo4QL+qlIjV07p4H4EUYw2J/WCqsvFV6V9X9z9YhXbWndc/4fw+hYGlDT7egYxliMp5O6Ew== +"@babel/plugin-proposal-async-generator-functions@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.19.0.tgz#cf5740194f170467df20581712400487efc79ff1" + integrity sha512-nhEByMUTx3uZueJ/QkJuSlCfN4FGg+xy+vRsfGQGzSauq5ks2Deid2+05Q3KhfaUjvec1IGhw/Zm3cFm8JigTQ== dependencies: "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-plugin-utils" "^7.18.9" + "@babel/helper-plugin-utils" "^7.19.0" "@babel/helper-remap-async-to-generator" "^7.18.9" "@babel/plugin-syntax-async-generators" "^7.8.4" @@ -625,16 +652,17 @@ dependencies: "@babel/helper-plugin-utils" "^7.18.9" -"@babel/plugin-transform-classes@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.18.9.tgz#90818efc5b9746879b869d5ce83eb2aa48bbc3da" - integrity sha512-EkRQxsxoytpTlKJmSPYrsOMjCILacAjtSVkd4gChEe2kXjFCun3yohhW5I7plXJhCemM0gKsaGMcO8tinvCA5g== +"@babel/plugin-transform-classes@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.19.0.tgz#0e61ec257fba409c41372175e7c1e606dc79bb20" + integrity sha512-YfeEE9kCjqTS9IitkgfJuxjcEtLUHMqa8yUJ6zdz8vR7hKuo6mOy2C05P0F1tdMmDCeuyidKnlrw/iTppHcr2A== dependencies: "@babel/helper-annotate-as-pure" "^7.18.6" + "@babel/helper-compilation-targets" "^7.19.0" "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.18.9" + "@babel/helper-function-name" "^7.19.0" "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.9" + "@babel/helper-plugin-utils" "^7.19.0" "@babel/helper-replace-supers" "^7.18.9" "@babel/helper-split-export-declaration" "^7.18.6" globals "^11.1.0" @@ -646,7 +674,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.18.9" -"@babel/plugin-transform-destructuring@^7.18.9": +"@babel/plugin-transform-destructuring@^7.18.13": version "7.18.13" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.18.13.tgz#9e03bc4a94475d62b7f4114938e6c5c33372cbf5" integrity sha512-TodpQ29XekIsex2A+YJPj5ax2plkGa8YYY6mFjCohk/IG9IY42Rtuj1FuDeemfg2ipxIFLzPeA83SIBnlhSIow== @@ -725,14 +753,14 @@ "@babel/helper-simple-access" "^7.18.6" babel-plugin-dynamic-import-node "^2.3.3" -"@babel/plugin-transform-modules-systemjs@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.18.9.tgz#545df284a7ac6a05125e3e405e536c5853099a06" - integrity sha512-zY/VSIbbqtoRoJKo2cDTewL364jSlZGvn0LKOf9ntbfxOvjfmyrdtEEOAdswOswhZEb8UH3jDkCKHd1sPgsS0A== +"@babel/plugin-transform-modules-systemjs@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.19.0.tgz#5f20b471284430f02d9c5059d9b9a16d4b085a1f" + integrity sha512-x9aiR0WXAWmOWsqcsnrzGR+ieaTMVyGyffPVA7F8cXAGt/UxefYv6uSHZLkAFChN5M5Iy1+wjE+xJuPt22H39A== dependencies: "@babel/helper-hoist-variables" "^7.18.6" - "@babel/helper-module-transforms" "^7.18.9" - "@babel/helper-plugin-utils" "^7.18.9" + "@babel/helper-module-transforms" "^7.19.0" + "@babel/helper-plugin-utils" "^7.19.0" "@babel/helper-validator-identifier" "^7.18.6" babel-plugin-dynamic-import-node "^2.3.3" @@ -744,13 +772,13 @@ "@babel/helper-module-transforms" "^7.18.6" "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-named-capturing-groups-regex@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.18.6.tgz#c89bfbc7cc6805d692f3a49bc5fc1b630007246d" - integrity sha512-UmEOGF8XgaIqD74bC8g7iV3RYj8lMf0Bw7NJzvnS9qQhM4mg+1WHKotUIdjxgD2RGrgFLZZPCFPFj3P/kVDYhg== +"@babel/plugin-transform-named-capturing-groups-regex@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.19.0.tgz#58c52422e4f91a381727faed7d513c89d7f41ada" + integrity sha512-HDSuqOQzkU//kfGdiHBt71/hkDTApw4U/cMVgKgX7PqfB3LOaK+2GtCEsBu1dL9CkswDm0Gwehht1dCr421ULQ== dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-create-regexp-features-plugin" "^7.19.0" + "@babel/helper-plugin-utils" "^7.19.0" "@babel/plugin-transform-new-target@^7.18.6": version "7.18.6" @@ -815,12 +843,12 @@ dependencies: "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-spread@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.18.9.tgz#6ea7a6297740f381c540ac56caf75b05b74fb664" - integrity sha512-39Q814wyoOPtIB/qGopNIL9xDChOE1pNU0ZY5dO0owhiVt/5kFm4li+/bBtwc7QotG0u5EPzqhZdjMtmqBqyQA== +"@babel/plugin-transform-spread@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.19.0.tgz#dd60b4620c2fec806d60cfaae364ec2188d593b6" + integrity sha512-RsuMk7j6n+r752EtzyScnWkQyuJdli6LdO5Klv8Yx0OfPVTcQkIUfS8clx5e9yHXzlnhOZF3CbQ8C2uP5j074w== dependencies: - "@babel/helper-plugin-utils" "^7.18.9" + "@babel/helper-plugin-utils" "^7.19.0" "@babel/helper-skip-transparent-expression-wrappers" "^7.18.9" "@babel/plugin-transform-sticky-regex@^7.18.6": @@ -869,17 +897,17 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/preset-env@^7.12.11": - version "7.18.10" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.18.10.tgz#83b8dfe70d7eea1aae5a10635ab0a5fe60dfc0f4" - integrity sha512-wVxs1yjFdW3Z/XkNfXKoblxoHgbtUF7/l3PvvP4m02Qz9TZ6uZGxRVYjSQeR87oQmHco9zWitW5J82DJ7sCjvA== + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.19.0.tgz#fd18caf499a67d6411b9ded68dc70d01ed1e5da7" + integrity sha512-1YUju1TAFuzjIQqNM9WsF4U6VbD/8t3wEAlw3LFYuuEr+ywqLRcSXxFKz4DCEj+sN94l/XTDiUXYRrsvMpz9WQ== dependencies: - "@babel/compat-data" "^7.18.8" - "@babel/helper-compilation-targets" "^7.18.9" - "@babel/helper-plugin-utils" "^7.18.9" + "@babel/compat-data" "^7.19.0" + "@babel/helper-compilation-targets" "^7.19.0" + "@babel/helper-plugin-utils" "^7.19.0" "@babel/helper-validator-option" "^7.18.6" "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.18.6" "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.18.9" - "@babel/plugin-proposal-async-generator-functions" "^7.18.10" + "@babel/plugin-proposal-async-generator-functions" "^7.19.0" "@babel/plugin-proposal-class-properties" "^7.18.6" "@babel/plugin-proposal-class-static-block" "^7.18.6" "@babel/plugin-proposal-dynamic-import" "^7.18.6" @@ -913,9 +941,9 @@ "@babel/plugin-transform-async-to-generator" "^7.18.6" "@babel/plugin-transform-block-scoped-functions" "^7.18.6" "@babel/plugin-transform-block-scoping" "^7.18.9" - "@babel/plugin-transform-classes" "^7.18.9" + "@babel/plugin-transform-classes" "^7.19.0" "@babel/plugin-transform-computed-properties" "^7.18.9" - "@babel/plugin-transform-destructuring" "^7.18.9" + "@babel/plugin-transform-destructuring" "^7.18.13" "@babel/plugin-transform-dotall-regex" "^7.18.6" "@babel/plugin-transform-duplicate-keys" "^7.18.9" "@babel/plugin-transform-exponentiation-operator" "^7.18.6" @@ -925,9 +953,9 @@ "@babel/plugin-transform-member-expression-literals" "^7.18.6" "@babel/plugin-transform-modules-amd" "^7.18.6" "@babel/plugin-transform-modules-commonjs" "^7.18.6" - "@babel/plugin-transform-modules-systemjs" "^7.18.9" + "@babel/plugin-transform-modules-systemjs" "^7.19.0" "@babel/plugin-transform-modules-umd" "^7.18.6" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.18.6" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.19.0" "@babel/plugin-transform-new-target" "^7.18.6" "@babel/plugin-transform-object-super" "^7.18.6" "@babel/plugin-transform-parameters" "^7.18.8" @@ -935,14 +963,14 @@ "@babel/plugin-transform-regenerator" "^7.18.6" "@babel/plugin-transform-reserved-words" "^7.18.6" "@babel/plugin-transform-shorthand-properties" "^7.18.6" - "@babel/plugin-transform-spread" "^7.18.9" + "@babel/plugin-transform-spread" "^7.19.0" "@babel/plugin-transform-sticky-regex" "^7.18.6" "@babel/plugin-transform-template-literals" "^7.18.9" "@babel/plugin-transform-typeof-symbol" "^7.18.9" "@babel/plugin-transform-unicode-escapes" "^7.18.10" "@babel/plugin-transform-unicode-regex" "^7.18.6" "@babel/preset-modules" "^0.1.5" - "@babel/types" "^7.18.10" + "@babel/types" "^7.19.0" babel-plugin-polyfill-corejs2 "^0.3.2" babel-plugin-polyfill-corejs3 "^0.5.3" babel-plugin-polyfill-regenerator "^0.4.0" @@ -981,13 +1009,13 @@ source-map-support "^0.5.16" "@babel/runtime@^7.12.5", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.9.tgz#b4fcfce55db3d2e5e080d2490f608a3b9f407f4a" - integrity sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw== + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.19.0.tgz#22b11c037b094d27a8a2504ea4dcff00f50e2259" + integrity sha512-eR8Lo9hnDS7tqkO7NsV+mKvCmv5boaXFSZ70DnfhcgiEne8hv9oCEd36Klw74EtizEqLsy4YnW8UWwpBVolHZA== dependencies: regenerator-runtime "^0.13.4" -"@babel/template@^7.18.10", "@babel/template@^7.18.6", "@babel/template@^7.3.3": +"@babel/template@^7.18.10", "@babel/template@^7.3.3": version "7.18.10" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.10.tgz#6f9134835970d1dbf0835c0d100c9f38de0c5e71" integrity sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA== @@ -996,7 +1024,7 @@ "@babel/parser" "^7.18.10" "@babel/types" "^7.18.10" -"@babel/traverse@^7.1.6", "@babel/traverse@^7.18.11", "@babel/traverse@^7.18.13", "@babel/traverse@^7.18.9", "@babel/traverse@^7.7.2": +"@babel/traverse@^7.1.6", "@babel/traverse@^7.7.2": version "7.18.13" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.13.tgz#5ab59ef51a997b3f10c4587d648b9696b6cb1a68" integrity sha512-N6kt9X1jRMLPxxxPYWi7tgvJRH/rtoU+dbKAPDM44RFHiMH8igdsaSBgFeskhSl/kLWLDUvIh1RXCrTmg0/zvA== @@ -1012,7 +1040,23 @@ debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.18.10", "@babel/types@^7.18.13", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.2.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": +"@babel/traverse@^7.18.9", "@babel/traverse@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.19.0.tgz#eb9c561c7360005c592cc645abafe0c3c4548eed" + integrity sha512-4pKpFRDh+utd2mbRC8JLnlsMUii3PMHjpL6a0SZ4NMZy7YFP9aXORxEhdMVOc9CpWtDF09IkciQLEhK7Ml7gRA== + dependencies: + "@babel/code-frame" "^7.18.6" + "@babel/generator" "^7.19.0" + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-function-name" "^7.19.0" + "@babel/helper-hoist-variables" "^7.18.6" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/parser" "^7.19.0" + "@babel/types" "^7.19.0" + debug "^4.1.0" + globals "^11.1.0" + +"@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3": version "7.18.13" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.13.tgz#30aeb9e514f4100f7c1cb6e5ba472b30e48f519a" integrity sha512-ePqfTihzW0W6XAU+aMw2ykilisStJfDnsejDCXRchCcMJ4O0+8DhPXf2YUbZ6wjBlsEmZwLK/sPweWtu8hcJYQ== @@ -1021,6 +1065,15 @@ "@babel/helper-validator-identifier" "^7.18.6" to-fast-properties "^2.0.0" +"@babel/types@^7.18.10", "@babel/types@^7.18.13", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.19.0", "@babel/types@^7.4.4": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.19.0.tgz#75f21d73d73dc0351f3368d28db73465f4814600" + integrity sha512-YuGopBq3ke25BVSiS6fgF49Ul9gH1x70Bcr6bqRLjWCkcX8Hre1/5+z+IiWOIerRMSSEfGZVB9z9kyq7wVs9YA== + dependencies: + "@babel/helper-string-parser" "^7.18.10" + "@babel/helper-validator-identifier" "^7.18.6" + to-fast-properties "^2.0.0" + "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" @@ -2425,9 +2478,9 @@ camelcase@^6.2.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001370: - version "1.0.30001384" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001384.tgz#029527c2d781a3cfef13fa63b3a78a6088e35973" - integrity sha512-BBWt57kqWbc0GYZXb47wTXpmAgqr5LSibPzNjk/AWMdmJMQhLqOl3c/Kd4OAU/tu4NLfYkMx8Tlq3RVBkOBolQ== + version "1.0.30001390" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001390.tgz#158a43011e7068ef7fc73590e9fd91a7cece5e7f" + integrity sha512-sS4CaUM+/+vqQUlCvCJ2WtDlV81aWtHhqeEVkLokVJJa3ViN4zDxAGfq9R8i1m90uGHxo99cy10Od+lvn3hf0g== caseless@~0.12.0: version "0.12.0" @@ -2953,9 +3006,9 @@ ecc-jsbn@~0.1.1: safer-buffer "^2.1.0" electron-to-chromium@^1.4.202: - version "1.4.233" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.233.tgz#aa142e45468bda111b88abc9cc59d573b75d6a60" - integrity sha512-ejwIKXTg1wqbmkcRJh9Ur3hFGHFDZDw1POzdsVrB2WZjgRuRMHIQQKNpe64N/qh3ZtH2otEoRoS+s6arAAuAAw== + version "1.4.242" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.242.tgz#51284820b0e6f6ce6c60d3945a3c4f9e4bd88f5f" + integrity sha512-nPdgMWtjjWGCtreW/2adkrB2jyHjClo9PtVhR6rW+oxa4E4Wom642Tn+5LslHP3XPL5MCpkn5/UEY60EXylNeQ== elliptic@^6.5.3: version "6.5.4" @@ -6466,9 +6519,9 @@ universal-user-agent@^6.0.0: integrity sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w== update-browserslist-db@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.5.tgz#be06a5eedd62f107b7c19eb5bcefb194411abf38" - integrity sha512-dteFFpCyvuDdr9S/ff1ISkKt/9YZxKjI9WlRR99c180GaztJtRa/fn18FdxGVKVsnPY7/a/FDN68mcvUmP4U7Q== + version "1.0.7" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.7.tgz#16279639cff1d0f800b14792de43d97df2d11b7d" + integrity sha512-iN/XYesmZ2RmmWAiI4Z5rq0YqSiv0brj9Ce9CfhNE4xIW2h+MFxcgkxIzZ+ShkFPUkjU3gQ+3oypadD3RAMtrg== dependencies: escalade "^3.1.1" picocolors "^1.0.0" From a7a264f4e7c7fe900f9e8ea94e7ab4385a7ff596 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 6 Sep 2022 17:53:05 +0100 Subject: [PATCH 10/33] Update typescript-eslint monorepo to v5.36.2 (#2645) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 91 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 46 insertions(+), 45 deletions(-) diff --git a/yarn.lock b/yarn.lock index 55d0b911991..5fdf04fb518 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1698,13 +1698,13 @@ "@types/yargs-parser" "*" "@typescript-eslint/eslint-plugin@^5.6.0": - version "5.35.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.35.1.tgz#0d822bfea7469904dfc1bb8f13cabd362b967c93" - integrity sha512-RBZZXZlI4XCY4Wzgy64vB+0slT9+yAPQRjj/HSaRwUot33xbDjF1oN9BLwOLTewoOI0jothIltZRe9uJCHf8gg== + version "5.36.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.36.2.tgz#6df092a20e0f9ec748b27f293a12cb39d0c1fe4d" + integrity sha512-OwwR8LRwSnI98tdc2z7mJYgY60gf7I9ZfGjN5EjCwwns9bdTuQfAXcsjSB2wSQ/TVNYSGKf4kzVXbNGaZvwiXw== dependencies: - "@typescript-eslint/scope-manager" "5.35.1" - "@typescript-eslint/type-utils" "5.35.1" - "@typescript-eslint/utils" "5.35.1" + "@typescript-eslint/scope-manager" "5.36.2" + "@typescript-eslint/type-utils" "5.36.2" + "@typescript-eslint/utils" "5.36.2" debug "^4.3.4" functional-red-black-tree "^1.0.1" ignore "^5.2.0" @@ -1713,68 +1713,69 @@ tsutils "^3.21.0" "@typescript-eslint/parser@^5.6.0": - version "5.35.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.35.1.tgz#bf2ee2ebeaa0a0567213748243fb4eec2857f04f" - integrity sha512-XL2TBTSrh3yWAsMYpKseBYTVpvudNf69rPOWXWVBI08My2JVT5jR66eTt4IgQFHA/giiKJW5dUD4x/ZviCKyGg== + version "5.36.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.36.2.tgz#3ddf323d3ac85a25295a55fcb9c7a49ab4680ddd" + integrity sha512-qS/Kb0yzy8sR0idFspI9Z6+t7mqk/oRjnAYfewG+VN73opAUvmYL3oPIMmgOX6CnQS6gmVIXGshlb5RY/R22pA== dependencies: - "@typescript-eslint/scope-manager" "5.35.1" - "@typescript-eslint/types" "5.35.1" - "@typescript-eslint/typescript-estree" "5.35.1" + "@typescript-eslint/scope-manager" "5.36.2" + "@typescript-eslint/types" "5.36.2" + "@typescript-eslint/typescript-estree" "5.36.2" debug "^4.3.4" -"@typescript-eslint/scope-manager@5.35.1": - version "5.35.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.35.1.tgz#ccb69d54b7fd0f2d0226a11a75a8f311f525ff9e" - integrity sha512-kCYRSAzIW9ByEIzmzGHE50NGAvAP3wFTaZevgWva7GpquDyFPFcmvVkFJGWJJktg/hLwmys/FZwqM9EKr2u24Q== +"@typescript-eslint/scope-manager@5.36.2": + version "5.36.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.36.2.tgz#a75eb588a3879ae659514780831370642505d1cd" + integrity sha512-cNNP51L8SkIFSfce8B1NSUBTJTu2Ts4nWeWbFrdaqjmn9yKrAaJUBHkyTZc0cL06OFHpb+JZq5AUHROS398Orw== dependencies: - "@typescript-eslint/types" "5.35.1" - "@typescript-eslint/visitor-keys" "5.35.1" + "@typescript-eslint/types" "5.36.2" + "@typescript-eslint/visitor-keys" "5.36.2" -"@typescript-eslint/type-utils@5.35.1": - version "5.35.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.35.1.tgz#d50903b56758c5c8fc3be52b3be40569f27f9c4a" - integrity sha512-8xT8ljvo43Mp7BiTn1vxLXkjpw8wS4oAc00hMSB4L1/jIiYbjjnc3Qp2GAUOG/v8zsNCd1qwcqfCQ0BuishHkw== +"@typescript-eslint/type-utils@5.36.2": + version "5.36.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.36.2.tgz#752373f4babf05e993adf2cd543a763632826391" + integrity sha512-rPQtS5rfijUWLouhy6UmyNquKDPhQjKsaKH0WnY6hl/07lasj8gPaH2UD8xWkePn6SC+jW2i9c2DZVDnL+Dokw== dependencies: - "@typescript-eslint/utils" "5.35.1" + "@typescript-eslint/typescript-estree" "5.36.2" + "@typescript-eslint/utils" "5.36.2" debug "^4.3.4" tsutils "^3.21.0" -"@typescript-eslint/types@5.35.1": - version "5.35.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.35.1.tgz#af355fe52a0cc88301e889bc4ada72f279b63d61" - integrity sha512-FDaujtsH07VHzG0gQ6NDkVVhi1+rhq0qEvzHdJAQjysN+LHDCKDKCBRlZFFE0ec0jKxiv0hN63SNfExy0KrbQQ== +"@typescript-eslint/types@5.36.2": + version "5.36.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.36.2.tgz#a5066e500ebcfcee36694186ccc57b955c05faf9" + integrity sha512-9OJSvvwuF1L5eS2EQgFUbECb99F0mwq501w0H0EkYULkhFa19Qq7WFbycdw1PexAc929asupbZcgjVIe6OK/XQ== -"@typescript-eslint/typescript-estree@5.35.1": - version "5.35.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.35.1.tgz#db878a39a0dbdc9bb133f11cdad451770bfba211" - integrity sha512-JUqE1+VRTGyoXlDWWjm6MdfpBYVq+hixytrv1oyjYIBEOZhBCwtpp5ZSvBt4wIA1MKWlnaC2UXl2XmYGC3BoQA== +"@typescript-eslint/typescript-estree@5.36.2": + version "5.36.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.36.2.tgz#0c93418b36c53ba0bc34c61fe9405c4d1d8fe560" + integrity sha512-8fyH+RfbKc0mTspfuEjlfqA4YywcwQK2Amcf6TDOwaRLg7Vwdu4bZzyvBZp4bjt1RRjQ5MDnOZahxMrt2l5v9w== dependencies: - "@typescript-eslint/types" "5.35.1" - "@typescript-eslint/visitor-keys" "5.35.1" + "@typescript-eslint/types" "5.36.2" + "@typescript-eslint/visitor-keys" "5.36.2" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/utils@5.35.1": - version "5.35.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.35.1.tgz#ae1399afbfd6aa7d0ed1b7d941e9758d950250eb" - integrity sha512-v6F8JNXgeBWI4pzZn36hT2HXXzoBBBJuOYvoQiaQaEEjdi5STzux3Yj8v7ODIpx36i/5s8TdzuQ54TPc5AITQQ== +"@typescript-eslint/utils@5.36.2": + version "5.36.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.36.2.tgz#b01a76f0ab244404c7aefc340c5015d5ce6da74c" + integrity sha512-uNcopWonEITX96v9pefk9DC1bWMdkweeSsewJ6GeC7L6j2t0SJywisgkr9wUTtXk90fi2Eljj90HSHm3OGdGRg== dependencies: "@types/json-schema" "^7.0.9" - "@typescript-eslint/scope-manager" "5.35.1" - "@typescript-eslint/types" "5.35.1" - "@typescript-eslint/typescript-estree" "5.35.1" + "@typescript-eslint/scope-manager" "5.36.2" + "@typescript-eslint/types" "5.36.2" + "@typescript-eslint/typescript-estree" "5.36.2" eslint-scope "^5.1.1" eslint-utils "^3.0.0" -"@typescript-eslint/visitor-keys@5.35.1": - version "5.35.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.35.1.tgz#285e9e34aed7c876f16ff646a3984010035898e6" - integrity sha512-cEB1DvBVo1bxbW/S5axbGPE6b7FIMAbo3w+AGq6zNDA7+NYJOIkKj/sInfTv4edxd4PxJSgdN4t6/pbvgA+n5g== +"@typescript-eslint/visitor-keys@5.36.2": + version "5.36.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.36.2.tgz#2f8f78da0a3bad3320d2ac24965791ac39dace5a" + integrity sha512-BtRvSR6dEdrNt7Net2/XDjbYKU5Ml6GqJgVfXT0CxTCJlnIqK7rAGreuWKMT2t8cFUT2Msv5oxw0GMRD7T5J7A== dependencies: - "@typescript-eslint/types" "5.35.1" + "@typescript-eslint/types" "5.36.2" eslint-visitor-keys "^3.3.0" JSONStream@^1.0.3: From 65741d78604357b8b47a9878651ff8cc8a163503 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 6 Sep 2022 22:05:37 +0100 Subject: [PATCH 11/33] Update all (#2647) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/static_analysis.yml | 2 +- package.json | 2 +- yarn.lock | 50 +++++++++++++-------------- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/workflows/static_analysis.yml b/.github/workflows/static_analysis.yml index e05490dcd41..2ef9866dbe7 100644 --- a/.github/workflows/static_analysis.yml +++ b/.github/workflows/static_analysis.yml @@ -73,7 +73,7 @@ jobs: - name: Detecting files changed id: files - uses: futuratrepadeira/changed-files@v3.2.1 + uses: futuratrepadeira/changed-files@v3.3.0 with: repo-token: ${{ secrets.GITHUB_TOKEN }} pattern: '^.*\.tsx?$' diff --git a/package.json b/package.json index 641cac8991b..5ca55ab4956 100644 --- a/package.json +++ b/package.json @@ -92,7 +92,7 @@ "better-docs": "^2.4.0-beta.9", "browserify": "^17.0.0", "docdash": "^1.2.0", - "eslint": "8.22.0", + "eslint": "8.23.0", "eslint-config-google": "^0.14.0", "eslint-plugin-import": "^2.25.4", "eslint-plugin-matrix-org": "^0.6.0", diff --git a/yarn.lock b/yarn.lock index 5fdf04fb518..dde34c45347 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1079,7 +1079,7 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@eslint/eslintrc@^1.3.0": +"@eslint/eslintrc@^1.3.1": version "1.3.1" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.1.tgz#de0807bfeffc37b964a7d0400e0c348ce5a2543d" integrity sha512-OhSY22oQQdw3zgPOOwdoj01l/Dzl1Z+xyUP33tkSN+aqyEhymJCcPHyXt+ylW8FSe0TfRC2VG+ROQOapD0aZSQ== @@ -1108,6 +1108,11 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz#316b0a63b91c10e53f242efb4ace5c3b34e8728d" integrity sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA== +"@humanwhocodes/module-importer@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" + integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== + "@humanwhocodes/object-schema@^1.2.1": version "1.2.1" resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" @@ -1651,9 +1656,9 @@ integrity sha512-46yIhxSe5xEaJZXWdIBP7GU4HDTG8/eo0qd9atdiL+lFpA03y8KS+lkTN834TWJj5767GbWv4n/P6efyTFt1Dw== "@types/node@16": - version "16.11.56" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.56.tgz#dcbb617669481e158e0f1c6204d1c768cd675901" - integrity sha512-aFcUkv7EddxxOa/9f74DINReQ/celqH8DiB3fRYgVDM2Xm5QJL8sl80QKuAnGvwAsMn+H3IFA6WCrQh1CY7m1A== + version "16.11.57" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.57.tgz#786f74cef16acf2c5eb11795b6c3f7ae93596662" + integrity sha512-diBb5AE2V8h9Fs9zEDtBwSeLvIACng/aAkdZ3ujMV+cGuIQ9Nc/V+wQqurk9HJp8ni5roBxQHW21z/ZYbGDivg== "@types/prettier@^2.1.5": version "2.7.0" @@ -1857,9 +1862,9 @@ align-text@^0.1.1, align-text@^0.1.3: repeat-string "^1.5.2" allchange@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/allchange/-/allchange-1.0.6.tgz#f905918255541dc92d6a1f5cdf758db4597f569c" - integrity sha512-37a4J55oSxhLmlS/DeBOKjKn5dbjkyR4qMJ9is8+CKLPTe7NybcWBYvrPLr9kVLBa6aigWrdovRHrQj/4v6k4w== + version "1.1.0" + resolved "https://registry.yarnpkg.com/allchange/-/allchange-1.1.0.tgz#f8fa129e4b40c0b0a2c072c530f2324c6590e208" + integrity sha512-brDWf2feuL3FRyivSyC6AKOgpX+bYgs1Z7+ZmLti6PnBdZgIjRSnKvlc68N8+1UX2rCISx2I+XuUvE3/GJNG2A== dependencies: "@actions/core" "^1.4.0" "@actions/github" "^5.0.0" @@ -3229,14 +3234,15 @@ eslint-visitor-keys@^3.3.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== -eslint@8.22.0: - version "8.22.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.22.0.tgz#78fcb044196dfa7eef30a9d65944f6f980402c48" - integrity sha512-ci4t0sz6vSRKdmkOGmprBo6fmI4PrphDFMy5JEq/fNS0gQkJM3rLmrqcp8ipMcdobH3KtUP40KniAE9W19S4wA== +eslint@8.23.0: + version "8.23.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.23.0.tgz#a184918d288820179c6041bb3ddcc99ce6eea040" + integrity sha512-pBG/XOn0MsJcKcTRLr27S5HpzQo4kLr+HjLQIyK4EiCsijDl/TB+h5uEuJU6bQ8Edvwz1XWOjpaP2qgnXGpTcA== dependencies: - "@eslint/eslintrc" "^1.3.0" + "@eslint/eslintrc" "^1.3.1" "@humanwhocodes/config-array" "^0.10.4" "@humanwhocodes/gitignore-to-minimatch" "^1.0.2" + "@humanwhocodes/module-importer" "^1.0.1" ajv "^6.10.0" chalk "^4.0.0" cross-spawn "^7.0.2" @@ -3246,7 +3252,7 @@ eslint@8.22.0: eslint-scope "^7.1.1" eslint-utils "^3.0.0" eslint-visitor-keys "^3.3.0" - espree "^9.3.3" + espree "^9.4.0" esquery "^1.4.0" esutils "^2.0.2" fast-deep-equal "^3.1.3" @@ -3272,9 +3278,8 @@ eslint@8.22.0: strip-ansi "^6.0.1" strip-json-comments "^3.1.0" text-table "^0.2.0" - v8-compile-cache "^2.0.3" -espree@^9.3.3, espree@^9.4.0: +espree@^9.4.0: version "9.4.0" resolved "https://registry.yarnpkg.com/espree/-/espree-9.4.0.tgz#cd4bc3d6e9336c433265fc0aa016fc1aaf182f8a" integrity sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw== @@ -3389,11 +3394,11 @@ expect@^28.0.0, expect@^28.1.0, expect@^28.1.3: jest-util "^28.1.3" ext@^1.1.2: - version "1.6.0" - resolved "https://registry.yarnpkg.com/ext/-/ext-1.6.0.tgz#3871d50641e874cc172e2b53f919842d19db4c52" - integrity sha512-sdBImtzkq2HpkdRLtlLWDa6w4DX22ijZLKx8BMPUuKe1c5lbN6xwQDQCxSfxBQnHZ13ls/FH0MQZx/q/gr6FQg== + version "1.7.0" + resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f" + integrity sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw== dependencies: - type "^2.5.0" + type "^2.7.2" extend@~3.0.2: version "3.0.2" @@ -6401,7 +6406,7 @@ type@^1.0.1: resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0" integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== -type@^2.5.0: +type@^2.7.2: version "2.7.2" resolved "https://registry.yarnpkg.com/type/-/type-2.7.2.tgz#2376a15a3a28b1efa0f5350dcf72d24df6ef98d0" integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw== @@ -6576,11 +6581,6 @@ uuid@^8.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== -v8-compile-cache@^2.0.3: - version "2.3.0" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" - integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== - v8-to-istanbul@^9.0.0, v8-to-istanbul@^9.0.1: version "9.0.1" resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz#b6f994b0b5d4ef255e17a0d17dc444a9f5132fa4" From eb3309db43940f7465379a3bbec84f62b3bf2817 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 6 Sep 2022 22:02:40 -0600 Subject: [PATCH 12/33] Update jest monorepo to v29 (#2649) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 6 +- yarn.lock | 725 +++++++++++++++++++++++++++++---------------------- 2 files changed, 421 insertions(+), 310 deletions(-) diff --git a/package.json b/package.json index 5ca55ab4956..d4afcf5ac6b 100644 --- a/package.json +++ b/package.json @@ -81,13 +81,13 @@ "@matrix-org/olm": "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.12.tgz", "@types/bs58": "^4.0.1", "@types/content-type": "^1.1.5", - "@types/jest": "^28.0.0", + "@types/jest": "^29.0.0", "@types/node": "16", "@types/request": "^2.48.5", "@typescript-eslint/eslint-plugin": "^5.6.0", "@typescript-eslint/parser": "^5.6.0", "allchange": "^1.0.6", - "babel-jest": "^28.0.0", + "babel-jest": "^29.0.0", "babelify": "^10.0.0", "better-docs": "^2.4.0-beta.9", "browserify": "^17.0.0", @@ -98,7 +98,7 @@ "eslint-plugin-matrix-org": "^0.6.0", "exorcist": "^2.0.0", "fake-indexeddb": "^4.0.0", - "jest": "^28.0.0", + "jest": "^29.0.0", "jest-localstorage-mock": "^2.4.6", "jest-sonar-reporter": "^2.0.0", "jsdoc": "^3.6.6", diff --git a/yarn.lock b/yarn.lock index dde34c45347..ebd2cc1ab92 100644 --- a/yarn.lock +++ b/yarn.lock @@ -559,6 +559,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" +"@babel/plugin-syntax-jsx@^7.7.2": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz#a8feef63b010150abd97f1649ec296e849943ca0" + integrity sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/plugin-syntax-logical-assignment-operators@^7.10.4", "@babel/plugin-syntax-logical-assignment-operators@^7.8.3": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" @@ -1134,62 +1141,61 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== -"@jest/console@^28.1.3": - version "28.1.3" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-28.1.3.tgz#2030606ec03a18c31803b8a36382762e447655df" - integrity sha512-QPAkP5EwKdK/bxIr6C1I4Vs0rm2nHiANzj/Z5X2JQkrZo6IqvC4ldZ9K95tF0HdidhA8Bo6egxSzUFPYKcEXLw== +"@jest/console@^29.0.2": + version "29.0.2" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-29.0.2.tgz#3a02dccad4dd37c25fd30013df67ec50998402ce" + integrity sha512-Fv02ijyhF4D/Wb3DvZO3iBJQz5DnzpJEIDBDbvje8Em099N889tNMUnBw7SalmSuOI+NflNG40RA1iK71kImPw== dependencies: - "@jest/types" "^28.1.3" + "@jest/types" "^29.0.2" "@types/node" "*" chalk "^4.0.0" - jest-message-util "^28.1.3" - jest-util "^28.1.3" + jest-message-util "^29.0.2" + jest-util "^29.0.2" slash "^3.0.0" -"@jest/core@^28.1.3": - version "28.1.3" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-28.1.3.tgz#0ebf2bd39840f1233cd5f2d1e6fc8b71bd5a1ac7" - integrity sha512-CIKBrlaKOzA7YG19BEqCw3SLIsEwjZkeJzf5bdooVnW4bH5cktqe3JX+G2YV1aK5vP8N9na1IGWFzYaTp6k6NA== +"@jest/core@^29.0.2": + version "29.0.2" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-29.0.2.tgz#7bf47ff6cd882678c47fbdea562bdf1ff03b6d33" + integrity sha512-imP5M6cdpHEOkmcuFYZuM5cTG1DAF7ZlVNCq1+F7kbqme2Jcl+Kh4M78hihM76DJHNkurbv4UVOnejGxBKEmww== dependencies: - "@jest/console" "^28.1.3" - "@jest/reporters" "^28.1.3" - "@jest/test-result" "^28.1.3" - "@jest/transform" "^28.1.3" - "@jest/types" "^28.1.3" + "@jest/console" "^29.0.2" + "@jest/reporters" "^29.0.2" + "@jest/test-result" "^29.0.2" + "@jest/transform" "^29.0.2" + "@jest/types" "^29.0.2" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" ci-info "^3.2.0" exit "^0.1.2" graceful-fs "^4.2.9" - jest-changed-files "^28.1.3" - jest-config "^28.1.3" - jest-haste-map "^28.1.3" - jest-message-util "^28.1.3" - jest-regex-util "^28.0.2" - jest-resolve "^28.1.3" - jest-resolve-dependencies "^28.1.3" - jest-runner "^28.1.3" - jest-runtime "^28.1.3" - jest-snapshot "^28.1.3" - jest-util "^28.1.3" - jest-validate "^28.1.3" - jest-watcher "^28.1.3" + jest-changed-files "^29.0.0" + jest-config "^29.0.2" + jest-haste-map "^29.0.2" + jest-message-util "^29.0.2" + jest-regex-util "^29.0.0" + jest-resolve "^29.0.2" + jest-resolve-dependencies "^29.0.2" + jest-runner "^29.0.2" + jest-runtime "^29.0.2" + jest-snapshot "^29.0.2" + jest-util "^29.0.2" + jest-validate "^29.0.2" + jest-watcher "^29.0.2" micromatch "^4.0.4" - pretty-format "^28.1.3" - rimraf "^3.0.0" + pretty-format "^29.0.2" slash "^3.0.0" strip-ansi "^6.0.0" -"@jest/environment@^28.1.3": - version "28.1.3" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-28.1.3.tgz#abed43a6b040a4c24fdcb69eab1f97589b2d663e" - integrity sha512-1bf40cMFTEkKyEf585R9Iz1WayDjHoHqvts0XFYEqyKM3cFWDpeMoqKKTAF9LSYQModPUlh8FKptoM2YcMWAXA== +"@jest/environment@^29.0.2": + version "29.0.2" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.0.2.tgz#9e4b6d4c9bce5bfced6f63945d8c8e571394f572" + integrity sha512-Yf+EYaLOrVCgts/aTS5nGznU4prZUPa5k9S63Yct8YSOKj2jkdS17hHSUKhk5jxDFMyCy1PXknypDw7vfgc/mA== dependencies: - "@jest/fake-timers" "^28.1.3" - "@jest/types" "^28.1.3" + "@jest/fake-timers" "^29.0.2" + "@jest/types" "^29.0.2" "@types/node" "*" - jest-mock "^28.1.3" + jest-mock "^29.0.2" "@jest/expect-utils@^28.1.3": version "28.1.3" @@ -1198,46 +1204,54 @@ dependencies: jest-get-type "^28.0.2" -"@jest/expect@^28.1.3": - version "28.1.3" - resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-28.1.3.tgz#9ac57e1d4491baca550f6bdbd232487177ad6a72" - integrity sha512-lzc8CpUbSoE4dqT0U+g1qODQjBRHPpCPXissXD4mS9+sWQdmmpeJ9zSH1rS1HEkrsMN0fb7nKrJ9giAR1d3wBw== +"@jest/expect-utils@^29.0.2": + version "29.0.2" + resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.0.2.tgz#00dfcb9e6fe99160c326ba39f7734b984543dea8" + integrity sha512-+wcQF9khXKvAEi8VwROnCWWmHfsJYCZAs5dmuMlJBKk57S6ZN2/FQMIlo01F29fJyT8kV/xblE7g3vkIdTLOjw== dependencies: - expect "^28.1.3" - jest-snapshot "^28.1.3" + jest-get-type "^29.0.0" -"@jest/fake-timers@^28.1.3": - version "28.1.3" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-28.1.3.tgz#230255b3ad0a3d4978f1d06f70685baea91c640e" - integrity sha512-D/wOkL2POHv52h+ok5Oj/1gOG9HSywdoPtFsRCUmlCILXNn5eIWmcnd3DIiWlJnpGvQtmajqBP95Ei0EimxfLw== +"@jest/expect@^29.0.2": + version "29.0.2" + resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-29.0.2.tgz#641d151e1062ceb976c5ad1c23eba3bb1e188896" + integrity sha512-y/3geZ92p2/zovBm/F+ZjXUJ3thvT9IRzD6igqaWskFE2aR0idD+N/p5Lj/ZautEox/9RwEc6nqergebeh72uQ== dependencies: - "@jest/types" "^28.1.3" + expect "^29.0.2" + jest-snapshot "^29.0.2" + +"@jest/fake-timers@^29.0.2": + version "29.0.2" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.0.2.tgz#6f15f4d8eb1089d445e3f73473ddc434faa2f798" + integrity sha512-2JhQeWU28fvmM5r33lxg6BxxkTKaVXs6KMaJ6eXSM8ml/MaWkt2BvbIO8G9KWAJFMdBXWbn+2h9OK1/s5urKZA== + dependencies: + "@jest/types" "^29.0.2" "@sinonjs/fake-timers" "^9.1.2" "@types/node" "*" - jest-message-util "^28.1.3" - jest-mock "^28.1.3" - jest-util "^28.1.3" + jest-message-util "^29.0.2" + jest-mock "^29.0.2" + jest-util "^29.0.2" -"@jest/globals@^28.1.3": - version "28.1.3" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-28.1.3.tgz#a601d78ddc5fdef542728309894895b4a42dc333" - integrity sha512-XFU4P4phyryCXu1pbcqMO0GSQcYe1IsalYCDzRNyhetyeyxMcIxa11qPNDpVNLeretItNqEmYYQn1UYz/5x1NA== +"@jest/globals@^29.0.2": + version "29.0.2" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.0.2.tgz#605d3389ad0c6bfe17ad3e1359b5bc39aefd8b65" + integrity sha512-4hcooSNJCVXuTu07/VJwCWW6HTnjLtQdqlcGisK6JST7z2ixa8emw4SkYsOk7j36WRc2ZUEydlUePnOIOTCNXg== dependencies: - "@jest/environment" "^28.1.3" - "@jest/expect" "^28.1.3" - "@jest/types" "^28.1.3" + "@jest/environment" "^29.0.2" + "@jest/expect" "^29.0.2" + "@jest/types" "^29.0.2" + jest-mock "^29.0.2" -"@jest/reporters@^28.1.3": - version "28.1.3" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-28.1.3.tgz#9adf6d265edafc5fc4a434cfb31e2df5a67a369a" - integrity sha512-JuAy7wkxQZVNU/V6g9xKzCGC5LVXx9FDcABKsSXp5MiKPEE2144a/vXTEDoyzjUpZKfVwp08Wqg5A4WfTMAzjg== +"@jest/reporters@^29.0.2": + version "29.0.2" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.0.2.tgz#5f927646b6f01029525c05ac108324eac7d7ad5c" + integrity sha512-Kr41qejRQHHkCgWHC9YwSe7D5xivqP4XML+PvgwsnRFaykKdNflDUb4+xLXySOU+O/bPkVdFpGzUpVNSJChCrw== dependencies: "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^28.1.3" - "@jest/test-result" "^28.1.3" - "@jest/transform" "^28.1.3" - "@jest/types" "^28.1.3" - "@jridgewell/trace-mapping" "^0.3.13" + "@jest/console" "^29.0.2" + "@jest/test-result" "^29.0.2" + "@jest/transform" "^29.0.2" + "@jest/types" "^29.0.2" + "@jridgewell/trace-mapping" "^0.3.15" "@types/node" "*" chalk "^4.0.0" collect-v8-coverage "^1.0.0" @@ -1249,9 +1263,9 @@ istanbul-lib-report "^3.0.0" istanbul-lib-source-maps "^4.0.0" istanbul-reports "^3.1.3" - jest-message-util "^28.1.3" - jest-util "^28.1.3" - jest-worker "^28.1.3" + jest-message-util "^29.0.2" + jest-util "^29.0.2" + jest-worker "^29.0.2" slash "^3.0.0" string-length "^4.0.1" strip-ansi "^6.0.0" @@ -1265,51 +1279,58 @@ dependencies: "@sinclair/typebox" "^0.24.1" -"@jest/source-map@^28.1.2": - version "28.1.2" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-28.1.2.tgz#7fe832b172b497d6663cdff6c13b0a920e139e24" - integrity sha512-cV8Lx3BeStJb8ipPHnqVw/IM2VCMWO3crWZzYodSIkxXnRcXJipCdx1JCK0K5MsJJouZQTH73mzf4vgxRaH9ww== +"@jest/schemas@^29.0.0": + version "29.0.0" + resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.0.0.tgz#5f47f5994dd4ef067fb7b4188ceac45f77fe952a" + integrity sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA== dependencies: - "@jridgewell/trace-mapping" "^0.3.13" + "@sinclair/typebox" "^0.24.1" + +"@jest/source-map@^29.0.0": + version "29.0.0" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-29.0.0.tgz#f8d1518298089f8ae624e442bbb6eb870ee7783c" + integrity sha512-nOr+0EM8GiHf34mq2GcJyz/gYFyLQ2INDhAylrZJ9mMWoW21mLBfZa0BUVPPMxVYrLjeiRe2Z7kWXOGnS0TFhQ== + dependencies: + "@jridgewell/trace-mapping" "^0.3.15" callsites "^3.0.0" graceful-fs "^4.2.9" -"@jest/test-result@^28.1.3": - version "28.1.3" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-28.1.3.tgz#5eae945fd9f4b8fcfce74d239e6f725b6bf076c5" - integrity sha512-kZAkxnSE+FqE8YjW8gNuoVkkC9I7S1qmenl8sGcDOLropASP+BkcGKwhXoyqQuGOGeYY0y/ixjrd/iERpEXHNg== +"@jest/test-result@^29.0.2": + version "29.0.2" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-29.0.2.tgz#dde4922e6234dd311c85ddf1ec2b7f600a90295d" + integrity sha512-b5rDc0lLL6Kx73LyCx6370k9uZ8o5UKdCpMS6Za3ke7H9y8PtAU305y6TeghpBmf2In8p/qqi3GpftgzijSsNw== dependencies: - "@jest/console" "^28.1.3" - "@jest/types" "^28.1.3" + "@jest/console" "^29.0.2" + "@jest/types" "^29.0.2" "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-sequencer@^28.1.3": - version "28.1.3" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-28.1.3.tgz#9d0c283d906ac599c74bde464bc0d7e6a82886c3" - integrity sha512-NIMPEqqa59MWnDi1kvXXpYbqsfQmSJsIbnd85mdVGkiDfQ9WQQTXOLsvISUfonmnBT+w85WEgneCigEEdHDFxw== +"@jest/test-sequencer@^29.0.2": + version "29.0.2" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-29.0.2.tgz#ae9b2d2c1694c7aa1a407713100e14dbfa79293e" + integrity sha512-fsyZqHBlXNMv5ZqjQwCuYa2pskXCO0DVxh5aaVCuAtwzHuYEGrhordyEncBLQNuCGQSYgElrEEmS+7wwFnnMKw== dependencies: - "@jest/test-result" "^28.1.3" + "@jest/test-result" "^29.0.2" graceful-fs "^4.2.9" - jest-haste-map "^28.1.3" + jest-haste-map "^29.0.2" slash "^3.0.0" -"@jest/transform@^28.1.3": - version "28.1.3" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-28.1.3.tgz#59d8098e50ab07950e0f2fc0fc7ec462371281b0" - integrity sha512-u5dT5di+oFI6hfcLOHGTAfmUxFRrjK+vnaP0kkVow9Md/M7V/MxqQMOz/VV25UZO8pzeA9PjfTpOu6BDuwSPQA== +"@jest/transform@^29.0.2": + version "29.0.2" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.0.2.tgz#eef90ebd939b68bf2c2508d9e914377871869146" + integrity sha512-lajVQx2AnsR+Pa17q2zR7eikz2PkPs1+g/qPbZkqQATeS/s6eT55H+yHcsLfuI/0YQ/4VSBepSu3bOX+44q0aA== dependencies: "@babel/core" "^7.11.6" - "@jest/types" "^28.1.3" - "@jridgewell/trace-mapping" "^0.3.13" + "@jest/types" "^29.0.2" + "@jridgewell/trace-mapping" "^0.3.15" babel-plugin-istanbul "^6.1.1" chalk "^4.0.0" convert-source-map "^1.4.0" - fast-json-stable-stringify "^2.0.0" + fast-json-stable-stringify "^2.1.0" graceful-fs "^4.2.9" - jest-haste-map "^28.1.3" - jest-regex-util "^28.0.2" - jest-util "^28.1.3" + jest-haste-map "^29.0.2" + jest-regex-util "^29.0.0" + jest-util "^29.0.2" micromatch "^4.0.4" pirates "^4.0.4" slash "^3.0.0" @@ -1327,6 +1348,18 @@ "@types/yargs" "^17.0.8" chalk "^4.0.0" +"@jest/types@^29.0.2": + version "29.0.2" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.0.2.tgz#5a5391fa7f7f41bf4b201d6d2da30e874f95b6c1" + integrity sha512-5WNMesBLmlkt1+fVkoCjHa0X3i3q8zc4QLTDkdHgCa2gyPZc7rdlZBWgVLqwS1860ZW5xJuCDwAzqbGaXIr/ew== + dependencies: + "@jest/schemas" "^29.0.0" + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^3.0.0" + "@types/node" "*" + "@types/yargs" "^17.0.8" + chalk "^4.0.0" + "@jridgewell/gen-mapping@^0.1.0": version "0.1.1" resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz#e5d2e450306a9491e3bd77e323e38d7aff315996" @@ -1367,7 +1400,7 @@ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== -"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.13", "@jridgewell/trace-mapping@^0.3.8", "@jridgewell/trace-mapping@^0.3.9": +"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.15", "@jridgewell/trace-mapping@^0.3.8", "@jridgewell/trace-mapping@^0.3.9": version "0.3.15" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz#aba35c48a38d3fd84b37e66c9c0423f9744f9774" integrity sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g== @@ -1614,13 +1647,13 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/jest@^28.0.0": - version "28.1.8" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-28.1.8.tgz#6936409f3c9724ea431efd412ea0238a0f03b09b" - integrity sha512-8TJkV++s7B6XqnDrzR1m/TT0A0h948Pnl/097veySPN67VRAgQ4gZ7n2KfJo2rVq6njQjdxU3GCCyDvAeuHoiw== +"@types/jest@^29.0.0": + version "29.0.0" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.0.0.tgz#bc66835bf6b09d6a47e22c21d7f5b82692e60e72" + integrity sha512-X6Zjz3WO4cT39Gkl0lZ2baFRaEMqJl5NC1OjElkwtNzAlbkr2K/WJXkBkH5VP0zx4Hgsd2TZYdOEfvp2Dxia+Q== dependencies: - expect "^28.0.0" - pretty-format "^28.0.0" + expect "^29.0.0" + pretty-format "^29.0.0" "@types/json-schema@^7.0.9": version "7.0.11" @@ -2029,15 +2062,15 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== -babel-jest@^28.0.0, babel-jest@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-28.1.3.tgz#c1187258197c099072156a0a121c11ee1e3917d5" - integrity sha512-epUaPOEWMk3cWX0M/sPvCHHCe9fMFAa/9hXEgKP8nFfNl/jlGkE9ucq9NqkZGXLDduCJYS0UvSlPUwC0S+rH6Q== +babel-jest@^29.0.0, babel-jest@^29.0.2: + version "29.0.2" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.0.2.tgz#7efde496c07607949e9be499bf277aa1543ded95" + integrity sha512-yTu4/WSi/HzarjQtrJSwV+/0maoNt+iP0DmpvFJdv9yY+5BuNle8TbheHzzcSWj5gIHfuhpbLYHWRDYhWKyeKQ== dependencies: - "@jest/transform" "^28.1.3" + "@jest/transform" "^29.0.2" "@types/babel__core" "^7.1.14" babel-plugin-istanbul "^6.1.1" - babel-preset-jest "^28.1.3" + babel-preset-jest "^29.0.2" chalk "^4.0.0" graceful-fs "^4.2.9" slash "^3.0.0" @@ -2060,10 +2093,10 @@ babel-plugin-istanbul@^6.1.1: istanbul-lib-instrument "^5.0.4" test-exclude "^6.0.0" -babel-plugin-jest-hoist@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.1.3.tgz#1952c4d0ea50f2d6d794353762278d1d8cca3fbe" - integrity sha512-Ys3tUKAmfnkRUpPdpa98eYrAR0nV+sSFUZZEGuQ2EbFd1y4SOLtD5QDNHAq+bb9a+bbXvYQC4b+ID/THIMcU6Q== +babel-plugin-jest-hoist@^29.0.2: + version "29.0.2" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.0.2.tgz#ae61483a829a021b146c016c6ad39b8bcc37c2c8" + integrity sha512-eBr2ynAEFjcebVvu8Ktx580BD1QKCrBG1XwEUTXJe285p9HA/4hOhfWCFRQhTKSyBV0VzjhG7H91Eifz9s29hg== dependencies: "@babel/template" "^7.3.3" "@babel/types" "^7.3.3" @@ -2112,12 +2145,12 @@ babel-preset-current-node-syntax@^1.0.0: "@babel/plugin-syntax-optional-chaining" "^7.8.3" "@babel/plugin-syntax-top-level-await" "^7.8.3" -babel-preset-jest@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-28.1.3.tgz#5dfc20b99abed5db994406c2b9ab94c73aaa419d" - integrity sha512-L+fupJvlWAHbQfn74coNX3zf60LXMJsezNvvx8eIh7iOR1luJ1poxYgQk1F8PYtNq/6QODDHCqsSnTFSWC491A== +babel-preset-jest@^29.0.2: + version "29.0.2" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-29.0.2.tgz#e14a7124e22b161551818d89e5bdcfb3b2b0eac7" + integrity sha512-BeVXp7rH5TK96ofyEnHjznjLMQ2nAeDJ+QzxKnHAAMs0RgrQsCywjAN8m4mOm5Di0pxU//3AoEeJJrerMH5UeA== dependencies: - babel-plugin-jest-hoist "^28.1.3" + babel-plugin-jest-hoist "^29.0.2" babel-preset-current-node-syntax "^1.0.0" babel-runtime@^6.26.0: @@ -2944,6 +2977,11 @@ diff-sequences@^28.1.1: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-28.1.1.tgz#9989dc731266dc2903457a70e996f3a041913ac6" integrity sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw== +diff-sequences@^29.0.0: + version "29.0.0" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.0.0.tgz#bae49972ef3933556bcb0800b72e8579d19d9e4f" + integrity sha512-7Qe/zd1wxSDL4D/X/FPjOMB+ZMDt71W94KYaq05I2l0oQqgXgs7s4ftYYmV38gBSrPz2vcygxfs1xn0FT+rKNA== + diffie-hellman@^5.0.0: version "5.0.3" resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" @@ -3382,7 +3420,7 @@ exorcist@^2.0.0: mkdirp "^1.0.4" mold-source-map "^0.4.0" -expect@^28.0.0, expect@^28.1.0, expect@^28.1.3: +expect@^28.1.0: version "28.1.3" resolved "https://registry.yarnpkg.com/expect/-/expect-28.1.3.tgz#90a7c1a124f1824133dd4533cce2d2bdcb6603ec" integrity sha512-eEh0xn8HlsuOBxFgIss+2mX85VAS4Qy3OSkjV7rlBWljtA4oWH37glVGyOZSZvErDT/yBywZdPGwCXuTvSG85g== @@ -3393,6 +3431,17 @@ expect@^28.0.0, expect@^28.1.0, expect@^28.1.3: jest-message-util "^28.1.3" jest-util "^28.1.3" +expect@^29.0.0, expect@^29.0.2: + version "29.0.2" + resolved "https://registry.yarnpkg.com/expect/-/expect-29.0.2.tgz#22c7132400f60444b427211f1d6bb604a9ab2420" + integrity sha512-JeJlAiLKn4aApT4pzUXBVxl3NaZidWIOdg//smaIlP9ZMBDkHZGFd9ubphUZP9pUyDEo7bC6M0IIZR51o75qQw== + dependencies: + "@jest/expect-utils" "^29.0.2" + jest-get-type "^29.0.0" + jest-matcher-utils "^29.0.2" + jest-message-util "^29.0.2" + jest-util "^29.0.2" + ext@^1.1.2: version "1.7.0" resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f" @@ -3438,7 +3487,7 @@ fast-glob@^3.2.9: merge2 "^1.3.0" micromatch "^4.0.4" -fast-json-stable-stringify@^2.0.0: +fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== @@ -4167,82 +4216,82 @@ istanbul-reports@^3.1.3, istanbul-reports@^3.1.4: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" -jest-changed-files@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-28.1.3.tgz#d9aeee6792be3686c47cb988a8eaf82ff4238831" - integrity sha512-esaOfUWJXk2nfZt9SPyC8gA1kNfdKLkQWyzsMlqq8msYSlNKfmZxfRgZn4Cd4MGVUF+7v6dBs0d5TOAKa7iIiA== +jest-changed-files@^29.0.0: + version "29.0.0" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.0.0.tgz#aa238eae42d9372a413dd9a8dadc91ca1806dce0" + integrity sha512-28/iDMDrUpGoCitTURuDqUzWQoWmOmOKOFST1mi2lwh62X4BFf6khgH3uSuo1e49X/UDjuApAj3w0wLOex4VPQ== dependencies: execa "^5.0.0" p-limit "^3.1.0" -jest-circus@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-28.1.3.tgz#d14bd11cf8ee1a03d69902dc47b6bd4634ee00e4" - integrity sha512-cZ+eS5zc79MBwt+IhQhiEp0OeBddpc1n8MBo1nMB8A7oPMKEO+Sre+wHaLJexQUj9Ya/8NOBY0RESUgYjB6fow== +jest-circus@^29.0.2: + version "29.0.2" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-29.0.2.tgz#7dda94888a8d47edb58e85a8e5f688f9da6657a3" + integrity sha512-YTPEsoE1P1X0bcyDQi3QIkpt2Wl9om9k2DQRuLFdS5x8VvAKSdYAVJufgvudhnKgM8WHvvAzhBE+1DRQB8x1CQ== dependencies: - "@jest/environment" "^28.1.3" - "@jest/expect" "^28.1.3" - "@jest/test-result" "^28.1.3" - "@jest/types" "^28.1.3" + "@jest/environment" "^29.0.2" + "@jest/expect" "^29.0.2" + "@jest/test-result" "^29.0.2" + "@jest/types" "^29.0.2" "@types/node" "*" chalk "^4.0.0" co "^4.6.0" dedent "^0.7.0" is-generator-fn "^2.0.0" - jest-each "^28.1.3" - jest-matcher-utils "^28.1.3" - jest-message-util "^28.1.3" - jest-runtime "^28.1.3" - jest-snapshot "^28.1.3" - jest-util "^28.1.3" + jest-each "^29.0.2" + jest-matcher-utils "^29.0.2" + jest-message-util "^29.0.2" + jest-runtime "^29.0.2" + jest-snapshot "^29.0.2" + jest-util "^29.0.2" p-limit "^3.1.0" - pretty-format "^28.1.3" + pretty-format "^29.0.2" slash "^3.0.0" stack-utils "^2.0.3" -jest-cli@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-28.1.3.tgz#558b33c577d06de55087b8448d373b9f654e46b2" - integrity sha512-roY3kvrv57Azn1yPgdTebPAXvdR2xfezaKKYzVxZ6It/5NCxzJym6tUI5P1zkdWhfUYkxEI9uZWcQdaFLo8mJQ== +jest-cli@^29.0.2: + version "29.0.2" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-29.0.2.tgz#adf341ee3a4fd6ad1f23e3c0eb4e466847407021" + integrity sha512-tlf8b+4KcUbBGr25cywIi3+rbZ4+G+SiG8SvY552m9sRZbXPafdmQRyeVE/C/R8K+TiBAMrTIUmV2SlStRJ40g== dependencies: - "@jest/core" "^28.1.3" - "@jest/test-result" "^28.1.3" - "@jest/types" "^28.1.3" + "@jest/core" "^29.0.2" + "@jest/test-result" "^29.0.2" + "@jest/types" "^29.0.2" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.9" import-local "^3.0.2" - jest-config "^28.1.3" - jest-util "^28.1.3" - jest-validate "^28.1.3" + jest-config "^29.0.2" + jest-util "^29.0.2" + jest-validate "^29.0.2" prompts "^2.0.1" yargs "^17.3.1" -jest-config@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-28.1.3.tgz#e315e1f73df3cac31447eed8b8740a477392ec60" - integrity sha512-MG3INjByJ0J4AsNBm7T3hsuxKQqFIiRo/AUqb1q9LRKI5UU6Aar9JHbr9Ivn1TVwfUD9KirRoM/T6u8XlcQPHQ== +jest-config@^29.0.2: + version "29.0.2" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-29.0.2.tgz#0ce168e1f74ca46c27285a7182ecb06c2d8ce7d9" + integrity sha512-RU4gzeUNZAFktYVzDGimDxeYoaiTnH100jkYYZgldqFamaZukF0IqmFx8+QrzVeEWccYg10EEJT3ox1Dq5b74w== dependencies: "@babel/core" "^7.11.6" - "@jest/test-sequencer" "^28.1.3" - "@jest/types" "^28.1.3" - babel-jest "^28.1.3" + "@jest/test-sequencer" "^29.0.2" + "@jest/types" "^29.0.2" + babel-jest "^29.0.2" chalk "^4.0.0" ci-info "^3.2.0" deepmerge "^4.2.2" glob "^7.1.3" graceful-fs "^4.2.9" - jest-circus "^28.1.3" - jest-environment-node "^28.1.3" - jest-get-type "^28.0.2" - jest-regex-util "^28.0.2" - jest-resolve "^28.1.3" - jest-runner "^28.1.3" - jest-util "^28.1.3" - jest-validate "^28.1.3" + jest-circus "^29.0.2" + jest-environment-node "^29.0.2" + jest-get-type "^29.0.0" + jest-regex-util "^29.0.0" + jest-resolve "^29.0.2" + jest-runner "^29.0.2" + jest-util "^29.0.2" + jest-validate "^29.0.2" micromatch "^4.0.4" parse-json "^5.2.0" - pretty-format "^28.1.3" + pretty-format "^29.0.2" slash "^3.0.0" strip-json-comments "^3.1.1" @@ -4256,67 +4305,82 @@ jest-diff@^28.1.3: jest-get-type "^28.0.2" pretty-format "^28.1.3" -jest-docblock@^28.1.1: - version "28.1.1" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-28.1.1.tgz#6f515c3bf841516d82ecd57a62eed9204c2f42a8" - integrity sha512-3wayBVNiOYx0cwAbl9rwm5kKFP8yHH3d/fkEaL02NPTkDojPtheGB7HZSFY4wzX+DxyrvhXz0KSCVksmCknCuA== +jest-diff@^29.0.2: + version "29.0.2" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.0.2.tgz#1a99419efda66f9ee72f91e580e774df95de5ddc" + integrity sha512-b9l9970sa1rMXH1owp2Woprmy42qIwwll/htsw4Gf7+WuSp5bZxNhkKHDuCGKL+HoHn1KhcC+tNEeAPYBkD2Jg== dependencies: - detect-newline "^3.0.0" + chalk "^4.0.0" + diff-sequences "^29.0.0" + jest-get-type "^29.0.0" + pretty-format "^29.0.2" -jest-each@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-28.1.3.tgz#bdd1516edbe2b1f3569cfdad9acd543040028f81" - integrity sha512-arT1z4sg2yABU5uogObVPvSlSMQlDA48owx07BDPAiasW0yYpYHYOo4HHLz9q0BVzDVU4hILFjzJw0So9aCL/g== +jest-docblock@^29.0.0: + version "29.0.0" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-29.0.0.tgz#3151bcc45ed7f5a8af4884dcc049aee699b4ceae" + integrity sha512-s5Kpra/kLzbqu9dEjov30kj1n4tfu3e7Pl8v+f8jOkeWNqM6Ds8jRaJfZow3ducoQUrf2Z4rs2N5S3zXnb83gw== dependencies: - "@jest/types" "^28.1.3" - chalk "^4.0.0" - jest-get-type "^28.0.2" - jest-util "^28.1.3" - pretty-format "^28.1.3" + detect-newline "^3.0.0" -jest-environment-node@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-28.1.3.tgz#7e74fe40eb645b9d56c0c4b70ca4357faa349be5" - integrity sha512-ugP6XOhEpjAEhGYvp5Xj989ns5cB1K6ZdjBYuS30umT4CQEETaxSiPcZ/E1kFktX4GkrcM4qu07IIlDYX1gp+A== +jest-each@^29.0.2: + version "29.0.2" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-29.0.2.tgz#f98375a79a37761137e11d458502dfe1f00ba5b0" + integrity sha512-+sA9YjrJl35iCg0W0VCrgCVj+wGhDrrKQ+YAqJ/DHBC4gcDFAeePtRRhpJnX9gvOZ63G7gt52pwp2PesuSEx0Q== dependencies: - "@jest/environment" "^28.1.3" - "@jest/fake-timers" "^28.1.3" - "@jest/types" "^28.1.3" + "@jest/types" "^29.0.2" + chalk "^4.0.0" + jest-get-type "^29.0.0" + jest-util "^29.0.2" + pretty-format "^29.0.2" + +jest-environment-node@^29.0.2: + version "29.0.2" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.0.2.tgz#8196268c9f740f1d2e7ecccf212b4c1c5b0167e4" + integrity sha512-4Fv8GXVCToRlMzDO94gvA8iOzKxQ7rhAbs8L+j8GPyTxGuUiYkV+63LecGeVdVhsL2KXih1sKnoqmH6tp89J7Q== + dependencies: + "@jest/environment" "^29.0.2" + "@jest/fake-timers" "^29.0.2" + "@jest/types" "^29.0.2" "@types/node" "*" - jest-mock "^28.1.3" - jest-util "^28.1.3" + jest-mock "^29.0.2" + jest-util "^29.0.2" jest-get-type@^28.0.2: version "28.0.2" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-28.0.2.tgz#34622e628e4fdcd793d46db8a242227901fcf203" integrity sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA== -jest-haste-map@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-28.1.3.tgz#abd5451129a38d9841049644f34b034308944e2b" - integrity sha512-3S+RQWDXccXDKSWnkHa/dPwt+2qwA8CJzR61w3FoYCvoo3Pn8tvGcysmMF0Bj0EX5RYvAI2EIvC57OmotfdtKA== +jest-get-type@^29.0.0: + version "29.0.0" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.0.0.tgz#843f6c50a1b778f7325df1129a0fd7aa713aef80" + integrity sha512-83X19z/HuLKYXYHskZlBAShO7UfLFXu/vWajw9ZNJASN32li8yHMaVGAQqxFW1RCFOkB7cubaL6FaJVQqqJLSw== + +jest-haste-map@^29.0.2: + version "29.0.2" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.0.2.tgz#cac403a595e6e43982c9776b5c4dae63e38b22c5" + integrity sha512-SOorh2ysQ0fe8gsF4gaUDhoMIWAvi2hXOkwThEO48qT3JqA8GLAUieQcIvdSEd6M0scRDe1PVmKc5tXR3Z0U0A== dependencies: - "@jest/types" "^28.1.3" + "@jest/types" "^29.0.2" "@types/graceful-fs" "^4.1.3" "@types/node" "*" anymatch "^3.0.3" fb-watchman "^2.0.0" graceful-fs "^4.2.9" - jest-regex-util "^28.0.2" - jest-util "^28.1.3" - jest-worker "^28.1.3" + jest-regex-util "^29.0.0" + jest-util "^29.0.2" + jest-worker "^29.0.2" micromatch "^4.0.4" walker "^1.0.8" optionalDependencies: fsevents "^2.3.2" -jest-leak-detector@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-28.1.3.tgz#a6685d9b074be99e3adee816ce84fd30795e654d" - integrity sha512-WFVJhnQsiKtDEo5lG2mM0v40QWnBM+zMdHHyJs8AWZ7J0QZJS59MsyKeJHWhpBZBH32S48FOVvGyOFT1h0DlqA== +jest-leak-detector@^29.0.2: + version "29.0.2" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.0.2.tgz#f88fd08e352b5fad3d33e48ecab39e97077ed8a8" + integrity sha512-5f0493qDeAxjUldkBSQg5D1cLadRgZVyWpTQvfJeQwQUpHQInE21AyVHVv64M7P2Ue8Z5EZ4BAcoDS/dSPPgMw== dependencies: - jest-get-type "^28.0.2" - pretty-format "^28.1.3" + jest-get-type "^29.0.0" + pretty-format "^29.0.2" jest-localstorage-mock@^2.4.6: version "2.4.22" @@ -4333,6 +4397,16 @@ jest-matcher-utils@^28.1.3: jest-get-type "^28.0.2" pretty-format "^28.1.3" +jest-matcher-utils@^29.0.2: + version "29.0.2" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.0.2.tgz#0ffdcaec340a9810caee6c73ff90fb029b446e10" + integrity sha512-s62YkHFBfAx0JLA2QX1BlnCRFwHRobwAv2KP1+YhjzF6ZCbCVrf1sG8UJyn62ZUsDaQKpoo86XMTjkUyO5aWmQ== + dependencies: + chalk "^4.0.0" + jest-diff "^29.0.2" + jest-get-type "^29.0.0" + pretty-format "^29.0.2" + jest-message-util@^28.1.3: version "28.1.3" resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-28.1.3.tgz#232def7f2e333f1eecc90649b5b94b0055e7c43d" @@ -4348,12 +4422,27 @@ jest-message-util@^28.1.3: slash "^3.0.0" stack-utils "^2.0.3" -jest-mock@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-28.1.3.tgz#d4e9b1fc838bea595c77ab73672ebf513ab249da" - integrity sha512-o3J2jr6dMMWYVH4Lh/NKmDXdosrsJgi4AviS8oXLujcjpCMBb1FMsblDnOXKZKfSiHLxYub1eS0IHuRXsio9eA== +jest-message-util@^29.0.2: + version "29.0.2" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.0.2.tgz#b2781dfb6a2d1c63830d9684c5148ae3155c6154" + integrity sha512-kcJAgms3ckJV0wUoLsAM40xAhY+pb9FVSZwicjFU9PFkaTNmqh9xd99/CzKse48wPM1ANUQKmp03/DpkY+lGrA== dependencies: - "@jest/types" "^28.1.3" + "@babel/code-frame" "^7.12.13" + "@jest/types" "^29.0.2" + "@types/stack-utils" "^2.0.0" + chalk "^4.0.0" + graceful-fs "^4.2.9" + micromatch "^4.0.4" + pretty-format "^29.0.2" + slash "^3.0.0" + stack-utils "^2.0.3" + +jest-mock@^29.0.2: + version "29.0.2" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.0.2.tgz#d7810966a6338aca6a440c3cd9f19276477840ad" + integrity sha512-giWXOIT23UCxHCN2VUfUJ0Q7SmiqQwfSFXlCaIhW5anITpNQ+3vuLPQdKt5wkuwM37GrbFyHIClce8AAK9ft9g== + dependencies: + "@jest/types" "^29.0.2" "@types/node" "*" jest-pnp-resolver@^1.2.2: @@ -4361,116 +4450,117 @@ jest-pnp-resolver@^1.2.2: resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz#b704ac0ae028a89108a4d040b3f919dfddc8e33c" integrity sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w== -jest-regex-util@^28.0.2: - version "28.0.2" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-28.0.2.tgz#afdc377a3b25fb6e80825adcf76c854e5bf47ead" - integrity sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw== +jest-regex-util@^29.0.0: + version "29.0.0" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.0.0.tgz#b442987f688289df8eb6c16fa8df488b4cd007de" + integrity sha512-BV7VW7Sy0fInHWN93MMPtlClweYv2qrSCwfeFWmpribGZtQPWNvRSq9XOVgOEjU1iBGRKXUZil0o2AH7Iy9Lug== -jest-resolve-dependencies@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-28.1.3.tgz#8c65d7583460df7275c6ea2791901fa975c1fe66" - integrity sha512-qa0QO2Q0XzQoNPouMbCc7Bvtsem8eQgVPNkwn9LnS+R2n8DaVDPL/U1gngC0LTl1RYXJU0uJa2BMC2DbTfFrHA== +jest-resolve-dependencies@^29.0.2: + version "29.0.2" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.0.2.tgz#2d30199ed0059ff97712f4fa6320c590bfcd2061" + integrity sha512-fSAu6eIG7wtGdnPJUkVVdILGzYAP9Dj/4+zvC8BrGe8msaUMJ9JeygU0Hf9+Uor6/icbuuzQn5See1uajLnAqg== dependencies: - jest-regex-util "^28.0.2" - jest-snapshot "^28.1.3" + jest-regex-util "^29.0.0" + jest-snapshot "^29.0.2" -jest-resolve@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-28.1.3.tgz#cfb36100341ddbb061ec781426b3c31eb51aa0a8" - integrity sha512-Z1W3tTjE6QaNI90qo/BJpfnvpxtaFTFw5CDgwpyE/Kz8U/06N1Hjf4ia9quUhCh39qIGWF1ZuxFiBiJQwSEYKQ== +jest-resolve@^29.0.2: + version "29.0.2" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-29.0.2.tgz#dd097e1c8020fbed4a8c1e1889ccb56022288697" + integrity sha512-V3uLjSA+EHxLtjIDKTBXnY71hyx+8lusCqPXvqzkFO1uCGvVpjBfuOyp+KOLBNSuY61kM2jhepiMwt4eiJS+Vw== dependencies: chalk "^4.0.0" graceful-fs "^4.2.9" - jest-haste-map "^28.1.3" + jest-haste-map "^29.0.2" jest-pnp-resolver "^1.2.2" - jest-util "^28.1.3" - jest-validate "^28.1.3" + jest-util "^29.0.2" + jest-validate "^29.0.2" resolve "^1.20.0" resolve.exports "^1.1.0" slash "^3.0.0" -jest-runner@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-28.1.3.tgz#5eee25febd730b4713a2cdfd76bdd5557840f9a1" - integrity sha512-GkMw4D/0USd62OVO0oEgjn23TM+YJa2U2Wu5zz9xsQB1MxWKDOlrnykPxnMsN0tnJllfLPinHTka61u0QhaxBA== +jest-runner@^29.0.2: + version "29.0.2" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-29.0.2.tgz#64e4e6c88f74387307687b73a4688f93369d8d99" + integrity sha512-+D82iPZejI8t+SfduOO1deahC/QgLFf8aJBO++Znz3l2ETtOMdM7K4ATsGWzCFnTGio5yHaRifg1Su5Ybza5Nw== dependencies: - "@jest/console" "^28.1.3" - "@jest/environment" "^28.1.3" - "@jest/test-result" "^28.1.3" - "@jest/transform" "^28.1.3" - "@jest/types" "^28.1.3" + "@jest/console" "^29.0.2" + "@jest/environment" "^29.0.2" + "@jest/test-result" "^29.0.2" + "@jest/transform" "^29.0.2" + "@jest/types" "^29.0.2" "@types/node" "*" chalk "^4.0.0" emittery "^0.10.2" graceful-fs "^4.2.9" - jest-docblock "^28.1.1" - jest-environment-node "^28.1.3" - jest-haste-map "^28.1.3" - jest-leak-detector "^28.1.3" - jest-message-util "^28.1.3" - jest-resolve "^28.1.3" - jest-runtime "^28.1.3" - jest-util "^28.1.3" - jest-watcher "^28.1.3" - jest-worker "^28.1.3" + jest-docblock "^29.0.0" + jest-environment-node "^29.0.2" + jest-haste-map "^29.0.2" + jest-leak-detector "^29.0.2" + jest-message-util "^29.0.2" + jest-resolve "^29.0.2" + jest-runtime "^29.0.2" + jest-util "^29.0.2" + jest-watcher "^29.0.2" + jest-worker "^29.0.2" p-limit "^3.1.0" source-map-support "0.5.13" -jest-runtime@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-28.1.3.tgz#a57643458235aa53e8ec7821949e728960d0605f" - integrity sha512-NU+881ScBQQLc1JHG5eJGU7Ui3kLKrmwCPPtYsJtBykixrM2OhVQlpMmFWJjMyDfdkGgBMNjXCGB/ebzsgNGQw== - dependencies: - "@jest/environment" "^28.1.3" - "@jest/fake-timers" "^28.1.3" - "@jest/globals" "^28.1.3" - "@jest/source-map" "^28.1.2" - "@jest/test-result" "^28.1.3" - "@jest/transform" "^28.1.3" - "@jest/types" "^28.1.3" +jest-runtime@^29.0.2: + version "29.0.2" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-29.0.2.tgz#dc3de788b8d75af346ae163d59c585027a9d809c" + integrity sha512-DO6F81LX4okOgjJLkLySv10E5YcV5NHUbY1ZqAUtofxdQE+q4hjH0P2gNsY8x3z3sqgw7O/+919SU4r18Fcuig== + dependencies: + "@jest/environment" "^29.0.2" + "@jest/fake-timers" "^29.0.2" + "@jest/globals" "^29.0.2" + "@jest/source-map" "^29.0.0" + "@jest/test-result" "^29.0.2" + "@jest/transform" "^29.0.2" + "@jest/types" "^29.0.2" + "@types/node" "*" chalk "^4.0.0" cjs-module-lexer "^1.0.0" collect-v8-coverage "^1.0.0" - execa "^5.0.0" glob "^7.1.3" graceful-fs "^4.2.9" - jest-haste-map "^28.1.3" - jest-message-util "^28.1.3" - jest-mock "^28.1.3" - jest-regex-util "^28.0.2" - jest-resolve "^28.1.3" - jest-snapshot "^28.1.3" - jest-util "^28.1.3" + jest-haste-map "^29.0.2" + jest-message-util "^29.0.2" + jest-mock "^29.0.2" + jest-regex-util "^29.0.0" + jest-resolve "^29.0.2" + jest-snapshot "^29.0.2" + jest-util "^29.0.2" slash "^3.0.0" strip-bom "^4.0.0" -jest-snapshot@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-28.1.3.tgz#17467b3ab8ddb81e2f605db05583d69388fc0668" - integrity sha512-4lzMgtiNlc3DU/8lZfmqxN3AYD6GGLbl+72rdBpXvcV+whX7mDrREzkPdp2RnmfIiWBg1YbuFSkXduF2JcafJg== +jest-snapshot@^29.0.2: + version "29.0.2" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.0.2.tgz#5017d54db8369f01900d11e179513fa5839fb5ac" + integrity sha512-26C4PzGKaX5gkoKg8UzYGVy2HPVcTaROSkf0gwnHu3lGeTB7bAIJBovvVPZoiJ20IximJELQs/r8WSDRCuGX2A== dependencies: "@babel/core" "^7.11.6" "@babel/generator" "^7.7.2" + "@babel/plugin-syntax-jsx" "^7.7.2" "@babel/plugin-syntax-typescript" "^7.7.2" "@babel/traverse" "^7.7.2" "@babel/types" "^7.3.3" - "@jest/expect-utils" "^28.1.3" - "@jest/transform" "^28.1.3" - "@jest/types" "^28.1.3" + "@jest/expect-utils" "^29.0.2" + "@jest/transform" "^29.0.2" + "@jest/types" "^29.0.2" "@types/babel__traverse" "^7.0.6" "@types/prettier" "^2.1.5" babel-preset-current-node-syntax "^1.0.0" chalk "^4.0.0" - expect "^28.1.3" + expect "^29.0.2" graceful-fs "^4.2.9" - jest-diff "^28.1.3" - jest-get-type "^28.0.2" - jest-haste-map "^28.1.3" - jest-matcher-utils "^28.1.3" - jest-message-util "^28.1.3" - jest-util "^28.1.3" + jest-diff "^29.0.2" + jest-get-type "^29.0.0" + jest-haste-map "^29.0.2" + jest-matcher-utils "^29.0.2" + jest-message-util "^29.0.2" + jest-util "^29.0.2" natural-compare "^1.4.0" - pretty-format "^28.1.3" + pretty-format "^29.0.2" semver "^7.3.5" jest-sonar-reporter@^2.0.0: @@ -4492,50 +4582,62 @@ jest-util@^28.1.3: graceful-fs "^4.2.9" picomatch "^2.2.3" -jest-validate@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-28.1.3.tgz#e322267fd5e7c64cea4629612c357bbda96229df" - integrity sha512-SZbOGBWEsaTxBGCOpsRWlXlvNkvTkY0XxRfh7zYmvd8uL5Qzyg0CHAXiXKROflh801quA6+/DsT4ODDthOC/OA== +jest-util@^29.0.2: + version "29.0.2" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.0.2.tgz#c75c5cab7f3b410782f9570a60c5558b5dfb6e3a" + integrity sha512-ozk8ruEEEACxqpz0hN9UOgtPZS0aN+NffwQduR5dVlhN+eN47vxurtvgZkYZYMpYrsmlAEx1XabkB3BnN0GfKQ== dependencies: - "@jest/types" "^28.1.3" + "@jest/types" "^29.0.2" + "@types/node" "*" + chalk "^4.0.0" + ci-info "^3.2.0" + graceful-fs "^4.2.9" + picomatch "^2.2.3" + +jest-validate@^29.0.2: + version "29.0.2" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.0.2.tgz#ad86e157cc1735a3a3ea88995a611ebf8544bd67" + integrity sha512-AeRKm7cEucSy7tr54r3LhiGIXYvOILUwBM1S7jQkKs6YelwAlWKsmZGVrQR7uwsd31rBTnR5NQkODi1Z+6TKIQ== + dependencies: + "@jest/types" "^29.0.2" camelcase "^6.2.0" chalk "^4.0.0" - jest-get-type "^28.0.2" + jest-get-type "^29.0.0" leven "^3.1.0" - pretty-format "^28.1.3" + pretty-format "^29.0.2" -jest-watcher@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-28.1.3.tgz#c6023a59ba2255e3b4c57179fc94164b3e73abd4" - integrity sha512-t4qcqj9hze+jviFPUN3YAtAEeFnr/azITXQEMARf5cMwKY2SMBRnCQTXLixTl20OR6mLh9KLMrgVJgJISym+1g== +jest-watcher@^29.0.2: + version "29.0.2" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-29.0.2.tgz#093c044e0d7462e691ec64ca6d977014272c9bca" + integrity sha512-ds2bV0oyUdYoyrUTv4Ga5uptz4cEvmmP/JzqDyzZZanvrIn8ipxg5l3SDOAIiyuAx1VdHd2FBzeXPFO5KPH8vQ== dependencies: - "@jest/test-result" "^28.1.3" - "@jest/types" "^28.1.3" + "@jest/test-result" "^29.0.2" + "@jest/types" "^29.0.2" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" emittery "^0.10.2" - jest-util "^28.1.3" + jest-util "^29.0.2" string-length "^4.0.1" -jest-worker@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-28.1.3.tgz#7e3c4ce3fa23d1bb6accb169e7f396f98ed4bb98" - integrity sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g== +jest-worker@^29.0.2: + version "29.0.2" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.0.2.tgz#46c9f2cb9a19663d22babbacf998e4b5d7c46574" + integrity sha512-EyvBlYcvd2pg28yg5A3OODQnqK9LI1kitnGUZUG5/NYIeaRgewtYBKB5wlr7oXj8zPCkzev7EmnTCsrXK7V+Xw== dependencies: "@types/node" "*" merge-stream "^2.0.0" supports-color "^8.0.0" -jest@^28.0.0: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest/-/jest-28.1.3.tgz#e9c6a7eecdebe3548ca2b18894a50f45b36dfc6b" - integrity sha512-N4GT5on8UkZgH0O5LUavMRV1EDEhNTL0KEfRmDIeZHSV7p2XgLoY9t9VDUgL6o+yfdgYHVxuz81G8oB9VG5uyA== +jest@^29.0.0: + version "29.0.2" + resolved "https://registry.yarnpkg.com/jest/-/jest-29.0.2.tgz#16e20003dbf8fb9ed7e6ab801579a77084e13fba" + integrity sha512-enziNbNUmXTcTaTP/Uq5rV91r0Yqy2UKzLUIabxMpGm9YHz8qpbJhiRnNVNvm6vzWfzt/0o97NEHH8/3udoClA== dependencies: - "@jest/core" "^28.1.3" - "@jest/types" "^28.1.3" + "@jest/core" "^29.0.2" + "@jest/types" "^29.0.2" import-local "^3.0.2" - jest-cli "^28.1.3" + jest-cli "^29.0.2" js-stringify@^1.0.1: version "1.0.2" @@ -5336,7 +5438,7 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -pretty-format@^28.0.0, pretty-format@^28.1.3: +pretty-format@^28.1.3: version "28.1.3" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-28.1.3.tgz#c9fba8cedf99ce50963a11b27d982a9ae90970d5" integrity sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q== @@ -5346,6 +5448,15 @@ pretty-format@^28.0.0, pretty-format@^28.1.3: ansi-styles "^5.0.0" react-is "^18.0.0" +pretty-format@^29.0.0, pretty-format@^29.0.2: + version "29.0.2" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.0.2.tgz#7f7666a7bf05ba2bcacde61be81c6db64f6f3be6" + integrity sha512-wp3CdtUa3cSJVFn3Miu5a1+pxc1iPIQTenOAn+x5erXeN1+ryTcLesV5pbK/rlW5EKwp27x38MoYfNGaNXDDhg== + dependencies: + "@jest/schemas" "^29.0.0" + ansi-styles "^5.0.0" + react-is "^18.0.0" + private@^0.1.8: version "0.1.8" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" @@ -5824,7 +5935,7 @@ right-align@^0.1.1: dependencies: align-text "^0.1.1" -rimraf@^3.0.0, rimraf@^3.0.2: +rimraf@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== From 917e8c01d853f875658aaccd25f95ca9670f18b7 Mon Sep 17 00:00:00 2001 From: David Teller Date: Wed, 7 Sep 2022 06:17:42 +0200 Subject: [PATCH 13/33] Base support for MSC3847: Ignore invites with policy rooms (#2626) * Base support for MSC3847: Ignore invites with policy rooms Type: enhancement * Base support for MSC3847: Ignore invites with policy rooms Type: enhancement * WIP: Applying feedback * WIP: Applying feedback * WIP: CI linter gives me different errors, weird * WIP: A little more linting --- spec/unit/matrix-client.spec.ts | 304 ++++++++++++++++++++++++++- src/client.ts | 6 + src/models/invites-ignorer.ts | 359 ++++++++++++++++++++++++++++++++ src/utils.ts | 4 +- 4 files changed, 670 insertions(+), 3 deletions(-) create mode 100644 src/models/invites-ignorer.ts diff --git a/spec/unit/matrix-client.spec.ts b/spec/unit/matrix-client.spec.ts index d1d0bf5baaf..2b8faf5065a 100644 --- a/spec/unit/matrix-client.spec.ts +++ b/spec/unit/matrix-client.spec.ts @@ -36,9 +36,14 @@ import { ReceiptType } from "../../src/@types/read_receipts"; import * as testUtils from "../test-utils/test-utils"; import { makeBeaconInfoContent } from "../../src/content-helpers"; import { M_BEACON_INFO } from "../../src/@types/beacon"; -import { ContentHelpers, Room } from "../../src"; +import { ContentHelpers, EventTimeline, Room } from "../../src"; import { supportsMatrixCall } from "../../src/webrtc/call"; import { makeBeaconEvent } from "../test-utils/beacon"; +import { + IGNORE_INVITES_ACCOUNT_EVENT_KEY, + POLICIES_ACCOUNT_EVENT_TYPE, + PolicyScope, +} from "../../src/models/invites-ignorer"; jest.useFakeTimers(); @@ -1412,4 +1417,301 @@ describe("MatrixClient", function() { expect(client.crypto.encryptAndSendToDevices).toHaveBeenLastCalledWith(deviceInfos, payload); }); }); + + describe("support for ignoring invites", () => { + beforeEach(() => { + // Mockup `getAccountData`/`setAccountData`. + const dataStore = new Map(); + client.setAccountData = function(eventType, content) { + dataStore.set(eventType, content); + return Promise.resolve(); + }; + client.getAccountData = function(eventType) { + const data = dataStore.get(eventType); + return new MatrixEvent({ + content: data, + }); + }; + + // Mockup `createRoom`/`getRoom`/`joinRoom`, including state. + const rooms = new Map(); + client.createRoom = function(options = {}) { + const roomId = options["_roomId"] || `!room-${rooms.size}:example.org`; + const state = new Map(); + const room = { + roomId, + _options: options, + _state: state, + getUnfilteredTimelineSet: function() { + return { + getLiveTimeline: function() { + return { + getState: function(direction) { + expect(direction).toBe(EventTimeline.FORWARDS); + return { + getStateEvents: function(type) { + const store = state.get(type) || {}; + return Object.keys(store).map(key => store[key]); + }, + }; + }, + }; + }, + }; + }, + }; + rooms.set(roomId, room); + return Promise.resolve({ room_id: roomId }); + }; + client.getRoom = function(roomId) { + return rooms.get(roomId); + }; + client.joinRoom = function(roomId) { + return this.getRoom(roomId) || this.createRoom({ _roomId: roomId }); + }; + + // Mockup state events + client.sendStateEvent = function(roomId, type, content) { + const room = this.getRoom(roomId); + const state: Map = room._state; + let store = state.get(type); + if (!store) { + store = {}; + state.set(type, store); + } + const eventId = `$event-${Math.random()}:example.org`; + store[eventId] = { + getId: function() { + return eventId; + }, + getRoomId: function() { + return roomId; + }, + getContent: function() { + return content; + }, + }; + return { event_id: eventId }; + }; + client.redactEvent = function(roomId, eventId) { + const room = this.getRoom(roomId); + const state: Map = room._state; + for (const store of state.values()) { + delete store[eventId]; + } + }; + }); + + it("should initialize and return the same `target` consistently", async () => { + const target1 = await client.ignoredInvites.getOrCreateTargetRoom(); + const target2 = await client.ignoredInvites.getOrCreateTargetRoom(); + expect(target1).toBeTruthy(); + expect(target1).toBe(target2); + }); + + it("should initialize and return the same `sources` consistently", async () => { + const sources1 = await client.ignoredInvites.getOrCreateSourceRooms(); + const sources2 = await client.ignoredInvites.getOrCreateSourceRooms(); + expect(sources1).toBeTruthy(); + expect(sources1).toHaveLength(1); + expect(sources1).toEqual(sources2); + }); + + it("should initially not reject any invite", async () => { + const rule = await client.ignoredInvites.getRuleForInvite({ + sender: "@foobar:example.org", + roomId: "!snafu:somewhere.org", + }); + expect(rule).toBeFalsy(); + }); + + it("should reject invites once we have added a matching rule in the target room (scope: user)", async () => { + await client.ignoredInvites.addRule(PolicyScope.User, "*:example.org", "just a test"); + + // We should reject this invite. + const ruleMatch = await client.ignoredInvites.getRuleForInvite({ + sender: "@foobar:example.org", + roomId: "!snafu:somewhere.org", + }); + expect(ruleMatch).toBeTruthy(); + expect(ruleMatch.getContent()).toMatchObject({ + recommendation: "m.ban", + reason: "just a test", + }); + + // We should let these invites go through. + const ruleWrongServer = await client.ignoredInvites.getRuleForInvite({ + sender: "@foobar:somewhere.org", + roomId: "!snafu:somewhere.org", + }); + expect(ruleWrongServer).toBeFalsy(); + + const ruleWrongServerRoom = await client.ignoredInvites.getRuleForInvite({ + sender: "@foobar:somewhere.org", + roomId: "!snafu:example.org", + }); + expect(ruleWrongServerRoom).toBeFalsy(); + }); + + it("should reject invites once we have added a matching rule in the target room (scope: server)", async () => { + const REASON = `Just a test ${Math.random()}`; + await client.ignoredInvites.addRule(PolicyScope.Server, "example.org", REASON); + + // We should reject these invites. + const ruleSenderMatch = await client.ignoredInvites.getRuleForInvite({ + sender: "@foobar:example.org", + roomId: "!snafu:somewhere.org", + }); + expect(ruleSenderMatch).toBeTruthy(); + expect(ruleSenderMatch.getContent()).toMatchObject({ + recommendation: "m.ban", + reason: REASON, + }); + + const ruleRoomMatch = await client.ignoredInvites.getRuleForInvite({ + sender: "@foobar:somewhere.org", + roomId: "!snafu:example.org", + }); + expect(ruleRoomMatch).toBeTruthy(); + expect(ruleRoomMatch.getContent()).toMatchObject({ + recommendation: "m.ban", + reason: REASON, + }); + + // We should let these invites go through. + const ruleWrongServer = await client.ignoredInvites.getRuleForInvite({ + sender: "@foobar:somewhere.org", + roomId: "!snafu:somewhere.org", + }); + expect(ruleWrongServer).toBeFalsy(); + }); + + it("should reject invites once we have added a matching rule in the target room (scope: room)", async () => { + const REASON = `Just a test ${Math.random()}`; + const BAD_ROOM_ID = "!bad:example.org"; + const GOOD_ROOM_ID = "!good:example.org"; + await client.ignoredInvites.addRule(PolicyScope.Room, BAD_ROOM_ID, REASON); + + // We should reject this invite. + const ruleSenderMatch = await client.ignoredInvites.getRuleForInvite({ + sender: "@foobar:example.org", + roomId: BAD_ROOM_ID, + }); + expect(ruleSenderMatch).toBeTruthy(); + expect(ruleSenderMatch.getContent()).toMatchObject({ + recommendation: "m.ban", + reason: REASON, + }); + + // We should let these invites go through. + const ruleWrongRoom = await client.ignoredInvites.getRuleForInvite({ + sender: BAD_ROOM_ID, + roomId: GOOD_ROOM_ID, + }); + expect(ruleWrongRoom).toBeFalsy(); + }); + + it("should reject invites once we have added a matching rule in a non-target source room", async () => { + const NEW_SOURCE_ROOM_ID = "!another-source:example.org"; + + // Make sure that everything is initialized. + await client.ignoredInvites.getOrCreateSourceRooms(); + await client.joinRoom(NEW_SOURCE_ROOM_ID); + await client.ignoredInvites.addSource(NEW_SOURCE_ROOM_ID); + + // Add a rule in the new source room. + await client.sendStateEvent(NEW_SOURCE_ROOM_ID, PolicyScope.User, { + entity: "*:example.org", + reason: "just a test", + recommendation: "m.ban", + }); + + // We should reject this invite. + const ruleMatch = await client.ignoredInvites.getRuleForInvite({ + sender: "@foobar:example.org", + roomId: "!snafu:somewhere.org", + }); + expect(ruleMatch).toBeTruthy(); + expect(ruleMatch.getContent()).toMatchObject({ + recommendation: "m.ban", + reason: "just a test", + }); + + // We should let these invites go through. + const ruleWrongServer = await client.ignoredInvites.getRuleForInvite({ + sender: "@foobar:somewhere.org", + roomId: "!snafu:somewhere.org", + }); + expect(ruleWrongServer).toBeFalsy(); + + const ruleWrongServerRoom = await client.ignoredInvites.getRuleForInvite({ + sender: "@foobar:somewhere.org", + roomId: "!snafu:example.org", + }); + expect(ruleWrongServerRoom).toBeFalsy(); + }); + + it("should not reject invites anymore once we have removed a rule", async () => { + await client.ignoredInvites.addRule(PolicyScope.User, "*:example.org", "just a test"); + + // We should reject this invite. + const ruleMatch = await client.ignoredInvites.getRuleForInvite({ + sender: "@foobar:example.org", + roomId: "!snafu:somewhere.org", + }); + expect(ruleMatch).toBeTruthy(); + expect(ruleMatch.getContent()).toMatchObject({ + recommendation: "m.ban", + reason: "just a test", + }); + + // After removing the invite, we shouldn't reject it anymore. + await client.ignoredInvites.removeRule(ruleMatch); + const ruleMatch2 = await client.ignoredInvites.getRuleForInvite({ + sender: "@foobar:example.org", + roomId: "!snafu:somewhere.org", + }); + expect(ruleMatch2).toBeFalsy(); + }); + + it("should add new rules in the target room, rather than any other source room", async () => { + const NEW_SOURCE_ROOM_ID = "!another-source:example.org"; + + // Make sure that everything is initialized. + await client.ignoredInvites.getOrCreateSourceRooms(); + await client.joinRoom(NEW_SOURCE_ROOM_ID); + const newSourceRoom = client.getRoom(NEW_SOURCE_ROOM_ID); + + // Fetch the list of sources and check that we do not have the new room yet. + const policies = await client.getAccountData(POLICIES_ACCOUNT_EVENT_TYPE.name).getContent(); + expect(policies).toBeTruthy(); + const ignoreInvites = policies[IGNORE_INVITES_ACCOUNT_EVENT_KEY.name]; + expect(ignoreInvites).toBeTruthy(); + expect(ignoreInvites.sources).toBeTruthy(); + expect(ignoreInvites.sources).not.toContain(NEW_SOURCE_ROOM_ID); + + // Add a source. + const added = await client.ignoredInvites.addSource(NEW_SOURCE_ROOM_ID); + expect(added).toBe(true); + const added2 = await client.ignoredInvites.addSource(NEW_SOURCE_ROOM_ID); + expect(added2).toBe(false); + + // Fetch the list of sources and check that we have added the new room. + const policies2 = await client.getAccountData(POLICIES_ACCOUNT_EVENT_TYPE.name).getContent(); + expect(policies2).toBeTruthy(); + const ignoreInvites2 = policies2[IGNORE_INVITES_ACCOUNT_EVENT_KEY.name]; + expect(ignoreInvites2).toBeTruthy(); + expect(ignoreInvites2.sources).toBeTruthy(); + expect(ignoreInvites2.sources).toContain(NEW_SOURCE_ROOM_ID); + + // Add a rule. + const eventId = await client.ignoredInvites.addRule(PolicyScope.User, "*:example.org", "just a test"); + + // Check where it shows up. + const targetRoomId = ignoreInvites2.target; + const targetRoom = client.getRoom(targetRoomId); + expect(targetRoom._state.get(PolicyScope.User)[eventId]).toBeTruthy(); + expect(newSourceRoom._state.get(PolicyScope.User)?.[eventId]).toBeFalsy(); + }); + }); }); diff --git a/src/client.ts b/src/client.ts index d8fc75d56f2..d734d256c71 100644 --- a/src/client.ts +++ b/src/client.ts @@ -197,6 +197,7 @@ import { Thread, THREAD_RELATION_TYPE } from "./models/thread"; import { MBeaconInfoEventContent, M_BEACON_INFO } from "./@types/beacon"; import { ToDeviceMessageQueue } from "./ToDeviceMessageQueue"; import { ToDeviceBatch } from "./models/ToDeviceMessage"; +import { IgnoredInvites } from "./models/invites-ignorer"; export type Store = IStore; @@ -954,6 +955,9 @@ export class MatrixClient extends TypedEventEmitter { + const target = await this.getOrCreateTargetRoom(); + const response = await this.client.sendStateEvent(target.roomId, scope, { + entity, + reason, + recommendation: PolicyRecommendation.Ban, + }); + return response.event_id; + } + + /** + * Remove a rule. + */ + public async removeRule(event: MatrixEvent) { + await this.client.redactEvent(event.getRoomId()!, event.getId()!); + } + + /** + * Add a new room to the list of sources. If the user isn't a member of the + * room, attempt to join it. + * + * @param roomId A valid room id. If this room is already in the list + * of sources, it will not be duplicated. + * @return `true` if the source was added, `false` if it was already present. + * @throws If `roomId` isn't the id of a room that the current user is already + * member of or can join. + * + * # Safety + * + * This method will rewrite the `Policies` object in the user's account data. + * This rewrite is inherently racy and could overwrite or be overwritten by + * other concurrent rewrites of the same object. + */ + public async addSource(roomId: string): Promise { + // We attempt to join the room *before* calling + // `await this.getOrCreateSourceRooms()` to decrease the duration + // of the racy section. + await this.client.joinRoom(roomId); + // Race starts. + const sources = (await this.getOrCreateSourceRooms()) + .map(room => room.roomId); + if (sources.includes(roomId)) { + return false; + } + sources.push(roomId); + await this.withIgnoreInvitesPolicies(ignoreInvitesPolicies => { + ignoreInvitesPolicies.sources = sources; + }); + + // Race ends. + return true; + } + + /** + * Find out whether an invite should be ignored. + * + * @param sender The user id for the user who issued the invite. + * @param roomId The room to which the user is invited. + * @returns A rule matching the entity, if any was found, `null` otherwise. + */ + public async getRuleForInvite({ sender, roomId }: { + sender: string; + roomId: string; + }): Promise> { + // In this implementation, we perform a very naive lookup: + // - search in each policy room; + // - turn each (potentially glob) rule entity into a regexp. + // + // Real-world testing will tell us whether this is performant enough. + // In the (unfortunately likely) case it isn't, there are several manners + // in which we could optimize this: + // - match several entities per go; + // - pre-compile each rule entity into a regexp; + // - pre-compile entire rooms into a single regexp. + const policyRooms = await this.getOrCreateSourceRooms(); + const senderServer = sender.split(":")[1]; + const roomServer = roomId.split(":")[1]; + for (const room of policyRooms) { + const state = room.getUnfilteredTimelineSet().getLiveTimeline().getState(EventTimeline.FORWARDS); + + for (const { scope, entities } of [ + { scope: PolicyScope.Room, entities: [roomId] }, + { scope: PolicyScope.User, entities: [sender] }, + { scope: PolicyScope.Server, entities: [senderServer, roomServer] }, + ]) { + const events = state.getStateEvents(scope); + for (const event of events) { + const content = event.getContent(); + if (content?.recommendation != PolicyRecommendation.Ban) { + // Ignoring invites only looks at `m.ban` recommendations. + continue; + } + const glob = content?.entity; + if (!glob) { + // Invalid event. + continue; + } + let regexp: RegExp; + try { + regexp = new RegExp(globToRegexp(glob, false)); + } catch (ex) { + // Assume invalid event. + continue; + } + for (const entity of entities) { + if (entity && regexp.test(entity)) { + return event; + } + } + // No match. + } + } + } + return null; + } + + /** + * Get the target room, i.e. the room in which any new rule should be written. + * + * If there is no target room setup, a target room is created. + * + * Note: This method is public for testing reasons. Most clients should not need + * to call it directly. + * + * # Safety + * + * This method will rewrite the `Policies` object in the user's account data. + * This rewrite is inherently racy and could overwrite or be overwritten by + * other concurrent rewrites of the same object. + */ + public async getOrCreateTargetRoom(): Promise { + const ignoreInvitesPolicies = this.getIgnoreInvitesPolicies(); + let target = ignoreInvitesPolicies.target; + // Validate `target`. If it is invalid, trash out the current `target` + // and create a new room. + if (typeof target !== "string") { + target = null; + } + if (target) { + // Check that the room exists and is valid. + const room = this.client.getRoom(target); + if (room) { + return room; + } else { + target = null; + } + } + // We need to create our own policy room for ignoring invites. + target = (await this.client.createRoom({ + name: "Individual Policy Room", + preset: Preset.PrivateChat, + })).room_id; + await this.withIgnoreInvitesPolicies(ignoreInvitesPolicies => { + ignoreInvitesPolicies.target = target; + }); + + // Since we have just called `createRoom`, `getRoom` should not be `null`. + return this.client.getRoom(target)!; + } + + /** + * Get the list of source rooms, i.e. the rooms from which rules need to be read. + * + * If no source rooms are setup, the target room is used as sole source room. + * + * Note: This method is public for testing reasons. Most clients should not need + * to call it directly. + * + * # Safety + * + * This method will rewrite the `Policies` object in the user's account data. + * This rewrite is inherently racy and could overwrite or be overwritten by + * other concurrent rewrites of the same object. + */ + public async getOrCreateSourceRooms(): Promise { + const ignoreInvitesPolicies = this.getIgnoreInvitesPolicies(); + let sources = ignoreInvitesPolicies.sources; + + // Validate `sources`. If it is invalid, trash out the current `sources` + // and create a new list of sources from `target`. + let hasChanges = false; + if (!Array.isArray(sources)) { + // `sources` could not be an array. + hasChanges = true; + sources = []; + } + let sourceRooms: Room[] = sources + // `sources` could contain non-string / invalid room ids + .filter(roomId => typeof roomId === "string") + .map(roomId => this.client.getRoom(roomId)) + .filter(room => !!room); + if (sourceRooms.length != sources.length) { + hasChanges = true; + } + if (sourceRooms.length == 0) { + // `sources` could be empty (possibly because we've removed + // invalid content) + const target = await this.getOrCreateTargetRoom(); + hasChanges = true; + sourceRooms = [target]; + } + if (hasChanges) { + // Reload `policies`/`ignoreInvitesPolicies` in case it has been changed + // during or by our call to `this.getTargetRoom()`. + await this.withIgnoreInvitesPolicies(ignoreInvitesPolicies => { + ignoreInvitesPolicies.sources = sources; + }); + } + return sourceRooms; + } + + /** + * Fetch the `IGNORE_INVITES_POLICIES` object from account data. + * + * If both an unstable prefix version and a stable prefix version are available, + * it will return the stable prefix version preferentially. + * + * The result is *not* validated but is guaranteed to be a non-null object. + * + * @returns A non-null object. + */ + private getIgnoreInvitesPolicies(): {[key: string]: any} { + return this.getPoliciesAndIgnoreInvitesPolicies().ignoreInvitesPolicies; + } + + /** + * Modify in place the `IGNORE_INVITES_POLICIES` object from account data. + */ + private async withIgnoreInvitesPolicies(cb: (ignoreInvitesPolicies: {[key: string]: any}) => void) { + const { policies, ignoreInvitesPolicies } = this.getPoliciesAndIgnoreInvitesPolicies(); + cb(ignoreInvitesPolicies); + policies[IGNORE_INVITES_ACCOUNT_EVENT_KEY.name] = ignoreInvitesPolicies; + await this.client.setAccountData(POLICIES_ACCOUNT_EVENT_TYPE.name, policies); + } + + /** + * As `getIgnoreInvitesPolicies` but also return the `POLICIES_ACCOUNT_EVENT_TYPE` + * object. + */ + private getPoliciesAndIgnoreInvitesPolicies(): + {policies: {[key: string]: any}, ignoreInvitesPolicies: {[key: string]: any}} { + let policies = {}; + for (const key of [POLICIES_ACCOUNT_EVENT_TYPE.name, POLICIES_ACCOUNT_EVENT_TYPE.altName]) { + if (!key) { + continue; + } + const value = this.client.getAccountData(key)?.getContent(); + if (value) { + policies = value; + break; + } + } + + let ignoreInvitesPolicies = {}; + let hasIgnoreInvitesPolicies = false; + for (const key of [IGNORE_INVITES_ACCOUNT_EVENT_KEY.name, IGNORE_INVITES_ACCOUNT_EVENT_KEY.altName]) { + if (!key) { + continue; + } + const value = policies[key]; + if (value && typeof value == "object") { + ignoreInvitesPolicies = value; + hasIgnoreInvitesPolicies = true; + break; + } + } + if (!hasIgnoreInvitesPolicies) { + policies[IGNORE_INVITES_ACCOUNT_EVENT_KEY.name] = ignoreInvitesPolicies; + } + + return { policies, ignoreInvitesPolicies }; + } +} diff --git a/src/utils.ts b/src/utils.ts index ffb438d5b90..13f5dd44ce2 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -341,7 +341,7 @@ export function escapeRegExp(string: string): string { return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); } -export function globToRegexp(glob: string, extended?: any): string { +export function globToRegexp(glob: string, extended = false): string { // From // https://github.com/matrix-org/synapse/blob/abbee6b29be80a77e05730707602f3bbfc3f38cb/synapse/push/__init__.py#L132 // Because micromatch is about 130KB with dependencies, @@ -349,7 +349,7 @@ export function globToRegexp(glob: string, extended?: any): string { const replacements: ([RegExp, string | ((substring: string, ...args: any[]) => string) ])[] = [ [/\\\*/g, '.*'], [/\?/g, '.'], - extended !== false && [ + !extended && [ /\\\[(!|)(.*)\\]/g, (_match: string, neg: string, pat: string) => [ '[', From 8490f72488b1e49d531f1a1a5e1cb4e8a39fe72b Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 7 Sep 2022 12:51:11 +0100 Subject: [PATCH 14/33] Tweak backport labels (#2652) --- .github/workflows/backport.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 21ebc70c27c..10bda8e205f 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -25,6 +25,6 @@ jobs: steps: - uses: tibdex/backport@v2 with: - labels_template: "<%= JSON.stringify(labels) %>" + labels_template: "<%= JSON.stringify([...labels, 'X-Release-Blocker']) %>" # We can't use GITHUB_TOKEN here or CI won't run on the new PR github_token: ${{ secrets.ELEMENT_BOT_TOKEN }} From d2f7a2575e0de75f4367ffa5d59c8ef2f9afa3bf Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 8 Sep 2022 09:52:50 +0000 Subject: [PATCH 15/33] Update all (major) (#2651) * Update all * Pin p-retry once more Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com> --- .github/workflows/static_analysis.yml | 2 +- yarn.lock | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/static_analysis.yml b/.github/workflows/static_analysis.yml index 2ef9866dbe7..10394ff797a 100644 --- a/.github/workflows/static_analysis.yml +++ b/.github/workflows/static_analysis.yml @@ -73,7 +73,7 @@ jobs: - name: Detecting files changed id: files - uses: futuratrepadeira/changed-files@v3.3.0 + uses: futuratrepadeira/changed-files@v4.0.0 with: repo-token: ${{ secrets.GITHUB_TOKEN }} pattern: '^.*\.tsx?$' diff --git a/yarn.lock b/yarn.lock index ebd2cc1ab92..04c581c763e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1410,7 +1410,6 @@ "@matrix-org/olm@https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.12.tgz": version "3.2.12" - uid "0bce3c86f9d36a4984d3c3e07df1c3fb4c679bd9" resolved "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.12.tgz#0bce3c86f9d36a4984d3c3e07df1c3fb4c679bd9" "@nicolo-ribaudo/chokidar-2@2.1.8-no-fsevents.3": From 1b86acb2fbceef7937e83205900ea5f7894ad3d2 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 8 Sep 2022 20:51:42 +0100 Subject: [PATCH 16/33] Fix import locations (#2655) These were causing circular references in the group call branch --- src/models/invites-ignorer.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/models/invites-ignorer.ts b/src/models/invites-ignorer.ts index d70a3667490..5fcc3d12984 100644 --- a/src/models/invites-ignorer.ts +++ b/src/models/invites-ignorer.ts @@ -17,7 +17,9 @@ limitations under the License. import { UnstableValue } from "matrix-events-sdk"; import { MatrixClient } from "../client"; -import { EventTimeline, MatrixEvent, Preset } from "../matrix"; +import { MatrixEvent } from "./event"; +import { EventTimeline } from "./event-timeline"; +import { Preset } from "../@types/partials"; import { globToRegexp } from "../utils"; import { Room } from "./room"; From b22c671fee5ea7b7c15d0104e217815b9c2914d2 Mon Sep 17 00:00:00 2001 From: Robin Date: Fri, 9 Sep 2022 09:55:17 -0400 Subject: [PATCH 17/33] Add a property aggregating all names of a NamespacedValue (#2656) For convenience --- spec/unit/NamespacedValue.spec.ts | 5 +++++ src/NamespacedValue.ts | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/spec/unit/NamespacedValue.spec.ts b/spec/unit/NamespacedValue.spec.ts index 834acd0c9fa..d2864a134b4 100644 --- a/spec/unit/NamespacedValue.spec.ts +++ b/spec/unit/NamespacedValue.spec.ts @@ -21,18 +21,21 @@ describe("NamespacedValue", () => { const ns = new NamespacedValue("stable", "unstable"); expect(ns.name).toBe(ns.stable); expect(ns.altName).toBe(ns.unstable); + expect(ns.names).toEqual([ns.stable, ns.unstable]); }); it("should return unstable if there is no stable", () => { const ns = new NamespacedValue(null, "unstable"); expect(ns.name).toBe(ns.unstable); expect(ns.altName).toBeFalsy(); + expect(ns.names).toEqual([ns.unstable]); }); it("should have a falsey unstable if needed", () => { const ns = new NamespacedValue("stable", null); expect(ns.name).toBe(ns.stable); expect(ns.altName).toBeFalsy(); + expect(ns.names).toEqual([ns.stable]); }); it("should match against either stable or unstable", () => { @@ -58,12 +61,14 @@ describe("UnstableValue", () => { const ns = new UnstableValue("stable", "unstable"); expect(ns.name).toBe(ns.unstable); expect(ns.altName).toBe(ns.stable); + expect(ns.names).toEqual([ns.unstable, ns.stable]); }); it("should return unstable if there is no stable", () => { const ns = new UnstableValue(null, "unstable"); expect(ns.name).toBe(ns.unstable); expect(ns.altName).toBeFalsy(); + expect(ns.names).toEqual([ns.unstable]); }); it("should not permit falsey unstable values", () => { diff --git a/src/NamespacedValue.ts b/src/NamespacedValue.ts index 59c2a1f830e..794366f8b32 100644 --- a/src/NamespacedValue.ts +++ b/src/NamespacedValue.ts @@ -41,6 +41,13 @@ export class NamespacedValue { return this.unstable; } + public get names(): (U | S)[] { + const names = [this.name]; + const altName = this.altName; + if (altName) names.push(altName); + return names; + } + public matches(val: string): boolean { return this.name === val || this.altName === val; } From 583e48086bd510f8df313de9a2396c3fe5201946 Mon Sep 17 00:00:00 2001 From: Hugh Nimmo-Smith Date: Sun, 11 Sep 2022 21:50:10 +0100 Subject: [PATCH 18/33] Add login flow types from matrix-react-sdk (#2633) Co-authored-by: Faye Duxovni --- src/@types/auth.ts | 55 ++++++++++++++++++++++++++++++++++++++++++++++ src/client.ts | 6 ++--- 2 files changed, 58 insertions(+), 3 deletions(-) diff --git a/src/@types/auth.ts b/src/@types/auth.ts index 592974221ba..db07ce66143 100644 --- a/src/@types/auth.ts +++ b/src/@types/auth.ts @@ -27,3 +27,58 @@ export interface IRefreshTokenResponse { } /* eslint-enable camelcase */ + +/** + * Response to GET login flows as per https://spec.matrix.org/latest/client-server-api/#get_matrixclientv3login + */ +export interface ILoginFlowsResponse { + flows: LoginFlow[]; +} + +export type LoginFlow = ISSOFlow | IPasswordFlow | ILoginFlow; + +export interface ILoginFlow { + type: string; +} + +export interface IPasswordFlow extends ILoginFlow { + type: "m.login.password"; +} + +/** + * Representation of SSO flow as per https://spec.matrix.org/latest/client-server-api/#client-login-via-sso + */ +export interface ISSOFlow extends ILoginFlow { + type: "m.login.sso" | "m.login.cas"; + // eslint-disable-next-line camelcase + identity_providers?: IIdentityProvider[]; +} + +export enum IdentityProviderBrand { + Gitlab = "gitlab", + Github = "github", + Apple = "apple", + Google = "google", + Facebook = "facebook", + Twitter = "twitter", +} + +export interface IIdentityProvider { + id: string; + name: string; + icon?: string; + brand?: IdentityProviderBrand | string; +} + +/** + * Parameters to login request as per https://spec.matrix.org/latest/client-server-api/#login + */ +/* eslint-disable camelcase */ +export interface ILoginParams { + identifier?: object; + password?: string; + token?: string; + device_id?: string; + initial_device_display_name?: string; +} +/* eslint-enable camelcase */ diff --git a/src/client.ts b/src/client.ts index d734d256c71..66e3ec2da5b 100644 --- a/src/client.ts +++ b/src/client.ts @@ -188,7 +188,7 @@ import { IPusher, IPusherRequest, IPushRules, PushRuleAction, PushRuleKind, Rule import { IThreepid } from "./@types/threepids"; import { CryptoStore } from "./crypto/store/base"; import { MediaHandler } from "./webrtc/mediaHandler"; -import { IRefreshTokenResponse } from "./@types/auth"; +import { ILoginFlowsResponse, IRefreshTokenResponse } from "./@types/auth"; import { TypedEventEmitter } from "./models/typed-event-emitter"; import { ReceiptType } from "./@types/read_receipts"; import { MSC3575SlidingSyncRequest, MSC3575SlidingSyncResponse, SlidingSync } from "./sliding-sync"; @@ -7077,10 +7077,10 @@ export class MatrixClient extends TypedEventEmitter} Resolves to the available login flows * @return {module:http-api.MatrixError} Rejects: with an error response. */ - public loginFlows(callback?: Callback): Promise { // TODO: Types + public loginFlows(callback?: Callback): Promise { return this.http.request(callback, Method.Get, "/login"); } From a57c430b09cc57b8197c0e5b64d08a16d0d37b0e Mon Sep 17 00:00:00 2001 From: Hugh Nimmo-Smith Date: Sun, 11 Sep 2022 22:18:33 +0100 Subject: [PATCH 19/33] Implementation of MSC3824 to add action= param on SSO login (#2398) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Šimon Brandner --- spec/unit/login.spec.ts | 35 +++++++++++++++++++++++++++++++++++ src/@types/auth.ts | 8 ++++++++ src/client.ts | 20 +++++++++++++++++--- 3 files changed, 60 insertions(+), 3 deletions(-) diff --git a/spec/unit/login.spec.ts b/spec/unit/login.spec.ts index f7cf6d307ab..6b3ae47fe97 100644 --- a/spec/unit/login.spec.ts +++ b/spec/unit/login.spec.ts @@ -1,3 +1,4 @@ +import { SSOAction } from '../../src/@types/auth'; import { TestClient } from '../TestClient'; describe('Login request', function() { @@ -22,3 +23,37 @@ describe('Login request', function() { expect(client.client.getUserId()).toBe(response.user_id); }); }); + +describe('SSO login URL', function() { + let client: TestClient; + + beforeEach(function() { + client = new TestClient(); + }); + + afterEach(function() { + client.stop(); + }); + + describe('SSOAction', function() { + const redirectUri = "https://test.com/foo"; + + it('No action', function() { + const urlString = client.client.getSsoLoginUrl(redirectUri, undefined, undefined, undefined); + const url = new URL(urlString); + expect(url.searchParams.has('org.matrix.msc3824.action')).toBe(false); + }); + + it('register', function() { + const urlString = client.client.getSsoLoginUrl(redirectUri, undefined, undefined, SSOAction.REGISTER); + const url = new URL(urlString); + expect(url.searchParams.get('org.matrix.msc3824.action')).toEqual('register'); + }); + + it('login', function() { + const urlString = client.client.getSsoLoginUrl(redirectUri, undefined, undefined, SSOAction.LOGIN); + const url = new URL(urlString); + expect(url.searchParams.get('org.matrix.msc3824.action')).toEqual('login'); + }); + }); +}); diff --git a/src/@types/auth.ts b/src/@types/auth.ts index db07ce66143..86d478944ee 100644 --- a/src/@types/auth.ts +++ b/src/@types/auth.ts @@ -82,3 +82,11 @@ export interface ILoginParams { initial_device_display_name?: string; } /* eslint-enable camelcase */ + +export enum SSOAction { + /** The user intends to login to an existing account */ + LOGIN = "login", + + /** The user intends to register for a new account */ + REGISTER = "register", +} diff --git a/src/client.ts b/src/client.ts index 66e3ec2da5b..27f698b885f 100644 --- a/src/client.ts +++ b/src/client.ts @@ -188,13 +188,14 @@ import { IPusher, IPusherRequest, IPushRules, PushRuleAction, PushRuleKind, Rule import { IThreepid } from "./@types/threepids"; import { CryptoStore } from "./crypto/store/base"; import { MediaHandler } from "./webrtc/mediaHandler"; -import { ILoginFlowsResponse, IRefreshTokenResponse } from "./@types/auth"; +import { ILoginFlowsResponse, IRefreshTokenResponse, SSOAction } from "./@types/auth"; import { TypedEventEmitter } from "./models/typed-event-emitter"; import { ReceiptType } from "./@types/read_receipts"; import { MSC3575SlidingSyncRequest, MSC3575SlidingSyncResponse, SlidingSync } from "./sliding-sync"; import { SlidingSyncSdk } from "./sliding-sync-sdk"; import { Thread, THREAD_RELATION_TYPE } from "./models/thread"; import { MBeaconInfoEventContent, M_BEACON_INFO } from "./@types/beacon"; +import { UnstableValue } from "./NamespacedValue"; import { ToDeviceMessageQueue } from "./ToDeviceMessageQueue"; import { ToDeviceBatch } from "./models/ToDeviceMessage"; import { IgnoredInvites } from "./models/invites-ignorer"; @@ -881,6 +882,8 @@ export type ClientEventHandlerMap = { & HttpApiEventHandlerMap & BeaconEventHandlerMap; +const SSO_ACTION_PARAM = new UnstableValue("action", "org.matrix.msc3824.action"); + /** * Represents a Matrix Client. Only directly construct this if you want to use * custom modules. Normally, {@link createClient} should be used @@ -7156,15 +7159,26 @@ export class MatrixClient extends TypedEventEmitter Date: Mon, 12 Sep 2022 11:25:39 +0100 Subject: [PATCH 20/33] Revert "Add login flow types from matrix-react-sdk (#2633)" (#2661) * Revert "Add login flow types from matrix-react-sdk (#2633)" This reverts commit 583e4808 * Leave login flow types, only revert method return type Co-authored-by: Hugh Nimmo-Smith --- src/client.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client.ts b/src/client.ts index 27f698b885f..dabb1a95979 100644 --- a/src/client.ts +++ b/src/client.ts @@ -188,7 +188,7 @@ import { IPusher, IPusherRequest, IPushRules, PushRuleAction, PushRuleKind, Rule import { IThreepid } from "./@types/threepids"; import { CryptoStore } from "./crypto/store/base"; import { MediaHandler } from "./webrtc/mediaHandler"; -import { ILoginFlowsResponse, IRefreshTokenResponse, SSOAction } from "./@types/auth"; +import { IRefreshTokenResponse, SSOAction } from "./@types/auth"; import { TypedEventEmitter } from "./models/typed-event-emitter"; import { ReceiptType } from "./@types/read_receipts"; import { MSC3575SlidingSyncRequest, MSC3575SlidingSyncResponse, SlidingSync } from "./sliding-sync"; @@ -7080,10 +7080,10 @@ export class MatrixClient extends TypedEventEmitter} Resolves to the available login flows + * @return {Promise} Resolves: TODO * @return {module:http-api.MatrixError} Rejects: with an error response. */ - public loginFlows(callback?: Callback): Promise { + public loginFlows(callback?: Callback): Promise { // TODO: Types return this.http.request(callback, Method.Get, "/login"); } From fb565f301b96fc962dd4b4ba7c234f1e87a61eeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Mon, 12 Sep 2022 18:04:14 +0200 Subject: [PATCH 21/33] Remove support for unstable private read receipts (#2624) --- spec/unit/room.spec.ts | 42 +++++-------------- spec/unit/sync-accumulator.spec.ts | 6 --- spec/unit/utils.spec.ts | 36 ---------------- src/@types/read_receipts.ts | 4 -- src/client.ts | 5 +-- src/models/room.ts | 67 ++++++++---------------------- src/utils.ts | 14 +------ 7 files changed, 32 insertions(+), 142 deletions(-) diff --git a/spec/unit/room.spec.ts b/spec/unit/room.spec.ts index 800415d2b8d..f94eca4a9be 100644 --- a/spec/unit/room.spec.ts +++ b/spec/unit/room.spec.ts @@ -2452,15 +2452,13 @@ describe("Room", function() { if (receiptType === ReceiptType.ReadPrivate) { return { eventId: "eventId1" } as IWrappedReceipt; } - if (receiptType === ReceiptType.UnstableReadPrivate) { - return { eventId: "eventId2" } as IWrappedReceipt; - } if (receiptType === ReceiptType.Read) { - return { eventId: "eventId3" } as IWrappedReceipt; + return { eventId: "eventId2" } as IWrappedReceipt; } + return null; }; - for (let i = 1; i <= 3; i++) { + for (let i = 1; i <= 2; i++) { room.getUnfilteredTimelineSet = () => ({ compareEventOrdering: (event1, event2) => { return (event1 === `eventId${i}`) ? 1 : -1; } } as EventTimelineSet); @@ -2471,20 +2469,18 @@ describe("Room", function() { describe("correctly compares by timestamp", () => { it("should correctly compare, if we have all receipts", () => { - for (let i = 1; i <= 3; i++) { + for (let i = 1; i <= 2; i++) { room.getUnfilteredTimelineSet = () => ({ compareEventOrdering: (_1, _2) => null, } as EventTimelineSet); room.getReadReceiptForUserId = (userId, ignore, receiptType) => { if (receiptType === ReceiptType.ReadPrivate) { - return { eventId: "eventId1", data: { ts: i === 1 ? 1 : 0 } } as IWrappedReceipt; - } - if (receiptType === ReceiptType.UnstableReadPrivate) { - return { eventId: "eventId2", data: { ts: i === 2 ? 1 : 0 } } as IWrappedReceipt; + return { eventId: "eventId1", data: { ts: i === 1 ? 2 : 1 } } as IWrappedReceipt; } if (receiptType === ReceiptType.Read) { - return { eventId: "eventId3", data: { ts: i === 3 ? 1 : 0 } } as IWrappedReceipt; + return { eventId: "eventId2", data: { ts: i === 2 ? 2 : 1 } } as IWrappedReceipt; } + return null; }; expect(room.getEventReadUpTo(userA)).toEqual(`eventId${i}`); @@ -2496,12 +2492,10 @@ describe("Room", function() { compareEventOrdering: (_1, _2) => null, } as EventTimelineSet); room.getReadReceiptForUserId = (userId, ignore, receiptType) => { - if (receiptType === ReceiptType.UnstableReadPrivate) { - return { eventId: "eventId1", data: { ts: 0 } } as IWrappedReceipt; - } if (receiptType === ReceiptType.Read) { return { eventId: "eventId2", data: { ts: 1 } } as IWrappedReceipt; } + return null; }; expect(room.getEventReadUpTo(userA)).toEqual(`eventId2`); @@ -2520,28 +2514,13 @@ describe("Room", function() { if (receiptType === ReceiptType.ReadPrivate) { return { eventId: "eventId1" } as IWrappedReceipt; } - if (receiptType === ReceiptType.UnstableReadPrivate) { - return { eventId: "eventId2" } as IWrappedReceipt; - } - if (receiptType === ReceiptType.Read) { - return { eventId: "eventId3" } as IWrappedReceipt; - } - }; - - expect(room.getEventReadUpTo(userA)).toEqual(`eventId1`); - }); - - it("should give precedence to org.matrix.msc2285.read.private", () => { - room.getReadReceiptForUserId = (userId, ignore, receiptType) => { - if (receiptType === ReceiptType.UnstableReadPrivate) { - return { eventId: "eventId2" } as IWrappedReceipt; - } if (receiptType === ReceiptType.Read) { return { eventId: "eventId2" } as IWrappedReceipt; } + return null; }; - expect(room.getEventReadUpTo(userA)).toEqual(`eventId2`); + expect(room.getEventReadUpTo(userA)).toEqual(`eventId1`); }); it("should give precedence to m.read", () => { @@ -2549,6 +2528,7 @@ describe("Room", function() { if (receiptType === ReceiptType.Read) { return { eventId: "eventId3" } as IWrappedReceipt; } + return null; }; expect(room.getEventReadUpTo(userA)).toEqual(`eventId3`); diff --git a/spec/unit/sync-accumulator.spec.ts b/spec/unit/sync-accumulator.spec.ts index b5385330be0..645efbfbba4 100644 --- a/spec/unit/sync-accumulator.spec.ts +++ b/spec/unit/sync-accumulator.spec.ts @@ -302,9 +302,6 @@ describe("SyncAccumulator", function() { [ReceiptType.ReadPrivate]: { "@dan:localhost": { ts: 4 }, }, - [ReceiptType.UnstableReadPrivate]: { - "@matthew:localhost": { ts: 5 }, - }, "some.other.receipt.type": { "@should_be_ignored:localhost": { key: "val" }, }, @@ -350,9 +347,6 @@ describe("SyncAccumulator", function() { [ReceiptType.ReadPrivate]: { "@dan:localhost": { ts: 4 }, }, - [ReceiptType.UnstableReadPrivate]: { - "@matthew:localhost": { ts: 5 }, - }, }, "$event2:localhost": { [ReceiptType.Read]: { diff --git a/spec/unit/utils.spec.ts b/spec/unit/utils.spec.ts index be30890edea..5d804022ede 100644 --- a/spec/unit/utils.spec.ts +++ b/spec/unit/utils.spec.ts @@ -528,38 +528,6 @@ describe("utils", function() { }); }); - describe('getPrivateReadReceiptField', () => { - it('should return m.read.private if server supports stable', async () => { - expect(await utils.getPrivateReadReceiptField({ - doesServerSupportUnstableFeature: jest.fn().mockImplementation((feature) => { - return feature === "org.matrix.msc2285.stable"; - }), - } as any)).toBe(ReceiptType.ReadPrivate); - }); - - it('should return m.read.private if server supports stable and unstable', async () => { - expect(await utils.getPrivateReadReceiptField({ - doesServerSupportUnstableFeature: jest.fn().mockImplementation((feature) => { - return ["org.matrix.msc2285.stable", "org.matrix.msc2285"].includes(feature); - }), - } as any)).toBe(ReceiptType.ReadPrivate); - }); - - it('should return org.matrix.msc2285.read.private if server supports unstable', async () => { - expect(await utils.getPrivateReadReceiptField({ - doesServerSupportUnstableFeature: jest.fn().mockImplementation((feature) => { - return feature === "org.matrix.msc2285"; - }), - } as any)).toBe(ReceiptType.UnstableReadPrivate); - }); - - it('should return none if server does not support either', async () => { - expect(await utils.getPrivateReadReceiptField({ - doesServerSupportUnstableFeature: jest.fn().mockResolvedValue(false), - } as any)).toBeFalsy(); - }); - }); - describe('isSupportedReceiptType', () => { it('should support m.read', () => { expect(utils.isSupportedReceiptType(ReceiptType.Read)).toBeTruthy(); @@ -569,10 +537,6 @@ describe("utils", function() { expect(utils.isSupportedReceiptType(ReceiptType.ReadPrivate)).toBeTruthy(); }); - it('should support org.matrix.msc2285.read.private', () => { - expect(utils.isSupportedReceiptType(ReceiptType.UnstableReadPrivate)).toBeTruthy(); - }); - it('should not support other receipt types', () => { expect(utils.isSupportedReceiptType("this is a receipt type")).toBeFalsy(); }); diff --git a/src/@types/read_receipts.ts b/src/@types/read_receipts.ts index 16a67feb3f3..4e90ac2ea94 100644 --- a/src/@types/read_receipts.ts +++ b/src/@types/read_receipts.ts @@ -18,8 +18,4 @@ export enum ReceiptType { Read = "m.read", FullyRead = "m.fully_read", ReadPrivate = "m.read.private", - /** - * @deprecated Please use the ReadPrivate type when possible. This value may be removed at any time without notice. - */ - UnstableReadPrivate = "org.matrix.msc2285.read.private", } diff --git a/src/client.ts b/src/client.ts index dabb1a95979..0c42fdd8c27 100644 --- a/src/client.ts +++ b/src/client.ts @@ -7543,9 +7543,8 @@ export class MatrixClient extends TypedEventEmitter // some more intelligent manner or the client should just use timestamps const timelineSet = this.getUnfilteredTimelineSet(); - const publicReadReceipt = this.getReadReceiptForUserId( - userId, - ignoreSynthesized, - ReceiptType.Read, - ); - const privateReadReceipt = this.getReadReceiptForUserId( - userId, - ignoreSynthesized, - ReceiptType.ReadPrivate, - ); - const unstablePrivateReadReceipt = this.getReadReceiptForUserId( - userId, - ignoreSynthesized, - ReceiptType.UnstableReadPrivate, - ); + const publicReadReceipt = this.getReadReceiptForUserId(userId, ignoreSynthesized, ReceiptType.Read); + const privateReadReceipt = this.getReadReceiptForUserId(userId, ignoreSynthesized, ReceiptType.ReadPrivate); - // If we have all, compare them - if (publicReadReceipt?.eventId && privateReadReceipt?.eventId && unstablePrivateReadReceipt?.eventId) { - const comparison1 = timelineSet.compareEventOrdering( - publicReadReceipt.eventId, - privateReadReceipt.eventId, - ); - const comparison2 = timelineSet.compareEventOrdering( - publicReadReceipt.eventId, - unstablePrivateReadReceipt.eventId, - ); - const comparison3 = timelineSet.compareEventOrdering( - privateReadReceipt.eventId, - unstablePrivateReadReceipt.eventId, - ); - if (comparison1 && comparison2 && comparison3) { - return (comparison1 > 0) - ? ((comparison2 > 0) ? publicReadReceipt.eventId : unstablePrivateReadReceipt.eventId) - : ((comparison3 > 0) ? privateReadReceipt.eventId : unstablePrivateReadReceipt.eventId); - } + // If we have both, compare them + let comparison: number | null | undefined; + if (publicReadReceipt?.eventId && privateReadReceipt?.eventId) { + comparison = timelineSet.compareEventOrdering(publicReadReceipt?.eventId, privateReadReceipt?.eventId); } - let latest = privateReadReceipt; - [unstablePrivateReadReceipt, publicReadReceipt].forEach((receipt) => { - if (receipt?.data?.ts > latest?.data?.ts || !latest) { - latest = receipt; - } - }); - if (latest?.eventId) return latest?.eventId; - - // The more less likely it is for a read receipt to drift out of date - // the bigger is its precedence - return ( - privateReadReceipt?.eventId ?? - unstablePrivateReadReceipt?.eventId ?? - publicReadReceipt?.eventId ?? - null - ); + // If we didn't get a comparison try to compare the ts of the receipts + if (!comparison && publicReadReceipt?.data?.ts && privateReadReceipt?.data?.ts) { + comparison = publicReadReceipt?.data?.ts - privateReadReceipt?.data?.ts; + } + + // The public receipt is more likely to drift out of date so the private + // one has precedence + if (!comparison) return privateReadReceipt?.eventId ?? publicReadReceipt?.eventId ?? null; + + // If public read receipt is older, return the private one + return ((comparison < 0) ? privateReadReceipt?.eventId : publicReadReceipt?.eventId) ?? null; } /** diff --git a/src/utils.ts b/src/utils.ts index 13f5dd44ce2..f51be323bbf 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -24,7 +24,7 @@ import unhomoglyph from "unhomoglyph"; import promiseRetry from "p-retry"; import type * as NodeCrypto from "crypto"; -import { MatrixClient, MatrixEvent } from "."; +import { MatrixEvent } from "."; import { M_TIMESTAMP } from "./@types/location"; import { ReceiptType } from "./@types/read_receipts"; @@ -670,17 +670,7 @@ export function sortEventsByLatestContentTimestamp(left: MatrixEvent, right: Mat return getContentTimestampWithFallback(right) - getContentTimestampWithFallback(left); } -export async function getPrivateReadReceiptField(client: MatrixClient): Promise { - if (await client.doesServerSupportUnstableFeature("org.matrix.msc2285.stable")) return ReceiptType.ReadPrivate; - if (await client.doesServerSupportUnstableFeature("org.matrix.msc2285")) return ReceiptType.UnstableReadPrivate; - return null; -} - export function isSupportedReceiptType(receiptType: string): boolean { - return [ - ReceiptType.Read, - ReceiptType.ReadPrivate, - ReceiptType.UnstableReadPrivate, - ].includes(receiptType as ReceiptType); + return [ReceiptType.Read, ReceiptType.ReadPrivate].includes(receiptType as ReceiptType); } From 59c82cb67972257cded956d25291961c21bd27ba Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Tue, 13 Sep 2022 12:32:41 +0100 Subject: [PATCH 22/33] Resetting package fields for development --- package.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 7e79c96f56f..8c8aa452229 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "keywords": [ "matrix-org" ], - "main": "./lib/index.js", + "main": "./src/index.ts", "browser": "./lib/browser-index.js", "matrix_src_main": "./src/index.ts", "matrix_src_browser": "./src/browser-index.js", @@ -125,6 +125,5 @@ "jestSonar": { "reportPath": "coverage", "sonar56x": true - }, - "typings": "./lib/index.d.ts" + } } From 829110b5804e259ba440b3f89aa39358dcac6d41 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 14 Sep 2022 08:57:36 +0100 Subject: [PATCH 23/33] Update release-npm.yml (#2665) --- .github/workflows/release-npm.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release-npm.yml b/.github/workflows/release-npm.yml index 512af0c151f..c70408fb041 100644 --- a/.github/workflows/release-npm.yml +++ b/.github/workflows/release-npm.yml @@ -17,6 +17,7 @@ jobs: uses: actions/setup-node@v3 with: cache: "yarn" + registry-url: 'https://registry.npmjs.org' - name: 🔨 Install dependencies run: "yarn install --pure-lockfile" From 53de8d5690d42c6cea320459e73cbc052abba45e Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 14 Sep 2022 08:57:52 +0100 Subject: [PATCH 24/33] Fix reset_dependency for if the dep is indirect (#2664) Like for in element-desktop --- release.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/release.sh b/release.sh index 622426be32f..d54f5e3e6c2 100755 --- a/release.sh +++ b/release.sh @@ -96,6 +96,9 @@ function check_dependency { } function reset_dependency { + local depver=$(cat package.json | jq -r .dependencies[\"$1\"]) + if [ "$depver" == "null" ]; then return 0; fi + echo "Resetting $1 to develop branch..." yarn add "github:matrix-org/$1#develop" git add -u From d32d190a8a6a8f43dccc57b5341bb6e87c0085b4 Mon Sep 17 00:00:00 2001 From: Germain Date: Wed, 14 Sep 2022 09:02:16 +0100 Subject: [PATCH 25/33] Change return type to avoid null strict error (#2630) --- src/client.ts | 2 +- src/models/event-timeline.ts | 2 +- src/models/thread.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/client.ts b/src/client.ts index 0c42fdd8c27..cf7c45082fb 100644 --- a/src/client.ts +++ b/src/client.ts @@ -5368,7 +5368,7 @@ export class MatrixClient extends TypedEventEmitter { /** * Return last reply to the thread, if known. */ - public lastReply(matches: (ev: MatrixEvent) => boolean = () => true): Optional { + public lastReply(matches: (ev: MatrixEvent) => boolean = () => true): MatrixEvent | null { for (let i = this.events.length - 1; i >= 0; i--) { const event = this.events[i]; if (matches(event)) { @@ -384,7 +384,7 @@ export class Thread extends TypedEventEmitter { public async fetchEvents(opts: IRelationsRequestOpts = { limit: 20, direction: Direction.Backward }): Promise<{ originalEvent: MatrixEvent; events: MatrixEvent[]; - nextBatch?: string; + nextBatch?: string | null; prevBatch?: string; }> { let { From e09936cc9ba13064dfa04d27649501fd249fbde8 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 15 Sep 2022 14:16:15 +0100 Subject: [PATCH 26/33] Update sonarcloud.yml (#2671) --- .github/workflows/sonarcloud.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index e9d965f02a0..a3409e0b91d 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -10,6 +10,8 @@ jobs: runs-on: ubuntu-latest if: github.event.workflow_run.conclusion == 'success' steps: + - uses: haya14busa/action-workflow_run-status@v1 + - name: "🩻 SonarCloud Scan" uses: matrix-org/sonarcloud-workflow-action@v2.2 with: From 1432e094c26338d23dfe24456b48829ef0473f42 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 15 Sep 2022 14:26:22 +0100 Subject: [PATCH 27/33] Update sonarcloud.yml --- .github/workflows/sonarcloud.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index a3409e0b91d..c1a7423abee 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -10,9 +10,18 @@ jobs: runs-on: ubuntu-latest if: github.event.workflow_run.conclusion == 'success' steps: - - uses: haya14busa/action-workflow_run-status@v1 + # We create the status here and then update it to success/failure in the `report` stage + # This provides an easy link to this workflow_run from the PR before Cypress is done. + - uses: Sibz/github-status-action@v1 + with: + authToken: ${{ secrets.GITHUB_TOKEN }} + state: pending + context: ${{ github.workflow }} / SonarCloud (${{ github.event.workflow_run.event }} => ${{ github.event_name }}) + sha: ${{ github.event.workflow_run.head_sha }} + target_url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} - name: "🩻 SonarCloud Scan" + id: sonarcloud uses: matrix-org/sonarcloud-workflow-action@v2.2 with: repository: ${{ github.event.workflow_run.head_repository.full_name }} @@ -24,3 +33,13 @@ jobs: coverage_run_id: ${{ github.event.workflow_run.id }} coverage_workflow_name: tests.yml coverage_extract_path: coverage + + + - uses: Sibz/github-status-action@v1 + if: always() + with: + authToken: ${{ secrets.GITHUB_TOKEN }} + state: ${{ steps.sonarcloud.outcome == 'success' && 'success' || 'failure' }} + context: ${{ github.workflow }} / SonarCloud (${{ github.event.workflow_run.event }} => ${{ github.event_name }}) + sha: ${{ github.event.workflow_run.head_sha }} + target_url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} From 41ab3337b532b632ba0d7572635be14bfd9cc923 Mon Sep 17 00:00:00 2001 From: Kerry Date: Fri, 16 Sep 2022 10:46:56 +0200 Subject: [PATCH 28/33] test typescriptification - spec/unit/crypto/verification (#2673) * renamed: spec/unit/crypto/verification/request.spec.js -> spec/unit/crypto/verification/request.spec.ts * renamed: spec/unit/crypto/verification/qr_code.spec.js -> spec/unit/crypto/verification/qr_code.spec.ts * renamed: spec/unit/crypto/verification/InRoomChannel.spec.js -> spec/unit/crypto/verification/InRoomChannel.spec.ts * fix ts issues in InRoomChannel.spec * renamed: spec/unit/crypto/verification/util.js -> spec/unit/crypto/verification/util.ts * fix ts issues in util.t * fix strict errors in util.ts * js lint --- spec/unit/crypto/secrets.spec.ts | 8 ++-- ...mChannel.spec.js => InRoomChannel.spec.ts} | 4 +- .../{qr_code.spec.js => qr_code.spec.ts} | 0 .../{request.spec.js => request.spec.ts} | 19 ++++---- .../crypto/verification/{util.js => util.ts} | 45 +++++++++++-------- 5 files changed, 41 insertions(+), 35 deletions(-) rename spec/unit/crypto/verification/{InRoomChannel.spec.js => InRoomChannel.spec.ts} (97%) rename spec/unit/crypto/verification/{qr_code.spec.js => qr_code.spec.ts} (100%) rename spec/unit/crypto/verification/{request.spec.js => request.spec.ts} (82%) rename spec/unit/crypto/verification/{util.js => util.ts} (66%) diff --git a/spec/unit/crypto/secrets.spec.ts b/spec/unit/crypto/secrets.spec.ts index 7939cdae2d1..8a8326867f0 100644 --- a/spec/unit/crypto/secrets.spec.ts +++ b/spec/unit/crypto/secrets.spec.ts @@ -250,8 +250,8 @@ describe("Secrets", function() { osborne2.client.crypto.deviceList.storeDevicesForUser("@alice:example.com", { "VAX": { - user_id: "@alice:example.com", - device_id: "VAX", + verified: 0, + known: false, algorithms: [olmlib.OLM_ALGORITHM, olmlib.MEGOLM_ALGORITHM], keys: { "ed25519:VAX": vaxDevice.deviceEd25519Key, @@ -261,9 +261,9 @@ describe("Secrets", function() { }); vax.client.crypto.deviceList.storeDevicesForUser("@alice:example.com", { "Osborne2": { - user_id: "@alice:example.com", - device_id: "Osborne2", algorithms: [olmlib.OLM_ALGORITHM, olmlib.MEGOLM_ALGORITHM], + verified: 0, + known: false, keys: { "ed25519:Osborne2": osborne2Device.deviceEd25519Key, "curve25519:Osborne2": osborne2Device.deviceCurve25519Key, diff --git a/spec/unit/crypto/verification/InRoomChannel.spec.js b/spec/unit/crypto/verification/InRoomChannel.spec.ts similarity index 97% rename from spec/unit/crypto/verification/InRoomChannel.spec.js rename to spec/unit/crypto/verification/InRoomChannel.spec.ts index 90fd05b475d..c6f9db33997 100644 --- a/spec/unit/crypto/verification/InRoomChannel.spec.js +++ b/spec/unit/crypto/verification/InRoomChannel.spec.ts @@ -13,9 +13,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { MatrixClient } from "../../../../src/client"; import { InRoomChannel } from "../../../../src/crypto/verification/request/InRoomChannel"; import { MatrixEvent } from "../../../../src/models/event"; - "../../../../src/crypto/verification/request/ToDeviceChannel"; describe("InRoomChannel tests", function() { const ALICE = "@alice:hs.tld"; @@ -23,7 +23,7 @@ describe("InRoomChannel tests", function() { const MALORY = "@malory:hs.tld"; const client = { getUserId() { return ALICE; }, - }; + } as unknown as MatrixClient; it("getEventType only returns .request for a message with a msgtype", function() { const invalidEvent = new MatrixEvent({ diff --git a/spec/unit/crypto/verification/qr_code.spec.js b/spec/unit/crypto/verification/qr_code.spec.ts similarity index 100% rename from spec/unit/crypto/verification/qr_code.spec.js rename to spec/unit/crypto/verification/qr_code.spec.ts diff --git a/spec/unit/crypto/verification/request.spec.js b/spec/unit/crypto/verification/request.spec.ts similarity index 82% rename from spec/unit/crypto/verification/request.spec.js rename to spec/unit/crypto/verification/request.spec.ts index e530344e2eb..10b29bf9fee 100644 --- a/spec/unit/crypto/verification/request.spec.js +++ b/spec/unit/crypto/verification/request.spec.ts @@ -15,7 +15,7 @@ See the License for the specific language governing permissions and limitations under the License. */ import "../../../olm-loader"; -import { verificationMethods } from "../../../../src/crypto"; +import { CryptoEvent, verificationMethods } from "../../../../src/crypto"; import { logger } from "../../../../src/logger"; import { SAS } from "../../../../src/crypto/verification/SAS"; import { makeTestClients, setupWebcrypto, teardownWebcrypto } from './util'; @@ -52,23 +52,22 @@ describe("verification request integration tests with crypto layer", function() alice.client.crypto.deviceList.getRawStoredDevicesForUser = function() { return { Dynabook: { + algorithms: [], + verified: 0, + known: false, keys: { "ed25519:Dynabook": "bob+base64+ed25519+key", }, }, }; }; - alice.client.downloadKeys = () => { - return Promise.resolve(); - }; - bob.client.downloadKeys = () => { - return Promise.resolve(); - }; - bob.client.on("crypto.verification.request", (request) => { + alice.client.downloadKeys = jest.fn().mockResolvedValue({}); + bob.client.downloadKeys = jest.fn().mockResolvedValue({}); + bob.client.on(CryptoEvent.VerificationRequest, (request) => { const bobVerifier = request.beginKeyVerification(verificationMethods.SAS); bobVerifier.verify(); - // XXX: Private function access (but it's a test, so we're okay) + // @ts-ignore Private function access (but it's a test, so we're okay) bobVerifier.endTimer(); }); const aliceRequest = await alice.client.requestVerification("@bob:example.com"); @@ -76,7 +75,7 @@ describe("verification request integration tests with crypto layer", function() const aliceVerifier = aliceRequest.verifier; expect(aliceVerifier).toBeInstanceOf(SAS); - // XXX: Private function access (but it's a test, so we're okay) + // @ts-ignore Private function access (but it's a test, so we're okay) aliceVerifier.endTimer(); alice.stop(); diff --git a/spec/unit/crypto/verification/util.js b/spec/unit/crypto/verification/util.ts similarity index 66% rename from spec/unit/crypto/verification/util.js rename to spec/unit/crypto/verification/util.ts index 572a4b270d2..d7c519e74ae 100644 --- a/spec/unit/crypto/verification/util.js +++ b/spec/unit/crypto/verification/util.ts @@ -19,20 +19,23 @@ import nodeCrypto from "crypto"; import { TestClient } from '../../../TestClient'; import { MatrixEvent } from "../../../../src/models/event"; +import { IRoomTimelineData } from "../../../../src/models/event-timeline-set"; +import { Room, RoomEvent } from "../../../../src/models/room"; import { logger } from '../../../../src/logger'; +import { MatrixClient, ClientEvent } from '../../../../src/client'; -export async function makeTestClients(userInfos, options) { - const clients = []; - const timeouts = []; - const clientMap = {}; - const sendToDevice = function(type, map) { +export async function makeTestClients(userInfos, options): Promise<[TestClient[], () => void]> { + const clients: TestClient[] = []; + const timeouts: ReturnType[] = []; + const clientMap: Record> = {}; + const makeSendToDevice = (matrixClient: MatrixClient): MatrixClient['sendToDevice'] => async (type, map) => { // logger.log(this.getUserId(), "sends", type, map); for (const [userId, devMap] of Object.entries(map)) { if (userId in clientMap) { for (const [deviceId, msg] of Object.entries(devMap)) { if (deviceId in clientMap[userId]) { const event = new MatrixEvent({ - sender: this.getUserId(), // eslint-disable-line @babel/no-invalid-this + sender: matrixClient.getUserId()!, type: type, content: msg, }); @@ -42,18 +45,19 @@ export async function makeTestClients(userInfos, options) { Promise.resolve(); decryptionPromise.then( - () => client.emit("toDeviceEvent", event), + () => client.emit(ClientEvent.ToDeviceEvent, event), ); } } } } + return {}; }; - const sendEvent = function(room, type, content) { + const makeSendEvent = (matrixClient: MatrixClient) => (room, type, content) => { // make up a unique ID as the event ID - const eventId = "$" + this.makeTxnId(); // eslint-disable-line @babel/no-invalid-this + const eventId = "$" + matrixClient.makeTxnId(); const rawEvent = { - sender: this.getUserId(), // eslint-disable-line @babel/no-invalid-this + sender: matrixClient.getUserId()!, type: type, content: content, room_id: room, @@ -63,22 +67,24 @@ export async function makeTestClients(userInfos, options) { const event = new MatrixEvent(rawEvent); const remoteEcho = new MatrixEvent(Object.assign({}, rawEvent, { unsigned: { - transaction_id: this.makeTxnId(), // eslint-disable-line @babel/no-invalid-this + transaction_id: matrixClient.makeTxnId(), }, })); const timeout = setTimeout(() => { for (const tc of clients) { - if (tc.client === this) { // eslint-disable-line @babel/no-invalid-this + const room = new Room('test', tc.client, tc.client.getUserId()!); + const roomTimelineData = {} as unknown as IRoomTimelineData; + if (tc.client === matrixClient) { logger.log("sending remote echo!!"); - tc.client.emit("Room.timeline", remoteEcho); + tc.client.emit(RoomEvent.Timeline, remoteEcho, room, false, false, roomTimelineData); } else { - tc.client.emit("Room.timeline", event); + tc.client.emit(RoomEvent.Timeline, event, room, false, false, roomTimelineData); } } }); - timeouts.push(timeout); + timeouts.push(timeout as unknown as ReturnType); return Promise.resolve({ event_id: eventId }); }; @@ -99,8 +105,8 @@ export async function makeTestClients(userInfos, options) { clientMap[userInfo.userId] = {}; } clientMap[userInfo.userId][userInfo.deviceId] = testClient.client; - testClient.client.sendToDevice = sendToDevice; - testClient.client.sendEvent = sendEvent; + testClient.client.sendToDevice = makeSendToDevice(testClient.client); + testClient.client.sendEvent = makeSendEvent(testClient.client); clients.push(testClient); } @@ -116,11 +122,12 @@ export async function makeTestClients(userInfos, options) { export function setupWebcrypto() { global.crypto = { getRandomValues: (buf) => { - return nodeCrypto.randomFillSync(buf); + return nodeCrypto.randomFillSync(buf as any); }, - }; + } as unknown as Crypto; } export function teardownWebcrypto() { + // @ts-ignore undefined != Crypto global.crypto = undefined; } From 9ff11d1f325fe53f81e9609a44ca07509fe2a5da Mon Sep 17 00:00:00 2001 From: Kerry Date: Fri, 16 Sep 2022 18:00:40 +0200 Subject: [PATCH 29/33] test typescriptification - last few unit test files (#2675) * renamed: spec/unit/crypto/verification/sas.spec.js -> spec/unit/crypto/verification/sas.spec.ts * ts issues in sas.spec * renamed: spec/unit/crypto/verification/secret_request.spec.js -> spec/unit/crypto/verification/secret_request.spec.ts * ts issues in secret_request.spec * renamed: spec/unit/crypto/verification/verification_request.spec.js -> spec/unit/crypto/verification/verification_request.spec.ts * ts fix verification_req.spec * renamed: spec/browserify/sync-browserify.spec.js -> spec/browserify/sync-browserify.spec.ts * fix strict * formatting --- ...serify.spec.js => sync-browserify.spec.ts} | 0 .../verification/{sas.spec.js => sas.spec.ts} | 32 +++-- ...request.spec.js => secret_request.spec.ts} | 37 +++-- ...t.spec.js => verification_request.spec.ts} | 132 +++++++++++++----- 4 files changed, 142 insertions(+), 59 deletions(-) rename spec/browserify/{sync-browserify.spec.js => sync-browserify.spec.ts} (100%) rename spec/unit/crypto/verification/{sas.spec.js => sas.spec.ts} (94%) rename spec/unit/crypto/verification/{secret_request.spec.js => secret_request.spec.ts} (77%) rename spec/unit/crypto/verification/{verification_request.spec.js => verification_request.spec.ts} (74%) diff --git a/spec/browserify/sync-browserify.spec.js b/spec/browserify/sync-browserify.spec.ts similarity index 100% rename from spec/browserify/sync-browserify.spec.js rename to spec/browserify/sync-browserify.spec.ts diff --git a/spec/unit/crypto/verification/sas.spec.js b/spec/unit/crypto/verification/sas.spec.ts similarity index 94% rename from spec/unit/crypto/verification/sas.spec.js rename to spec/unit/crypto/verification/sas.spec.ts index 7344c037968..f82b313fbc7 100644 --- a/spec/unit/crypto/verification/sas.spec.js +++ b/spec/unit/crypto/verification/sas.spec.ts @@ -19,10 +19,14 @@ import { makeTestClients, setupWebcrypto, teardownWebcrypto } from './util'; import { MatrixEvent } from "../../../../src/models/event"; import { SAS } from "../../../../src/crypto/verification/SAS"; import { DeviceInfo } from "../../../../src/crypto/deviceinfo"; -import { verificationMethods } from "../../../../src/crypto"; +import { CryptoEvent, verificationMethods } from "../../../../src/crypto"; import * as olmlib from "../../../../src/crypto/olmlib"; import { logger } from "../../../../src/logger"; import { resetCrossSigningKeys } from "../crypto-utils"; +import { VerificationBase } from "../../../../src/crypto/verification/Base"; +import { IVerificationChannel } from "../../../../src/crypto/verification/request/Channel"; +import { MatrixClient } from "../../../../src"; +import { VerificationRequest } from "../../../../src/crypto/verification/request/VerificationRequest"; const Olm = global.Olm; @@ -48,13 +52,15 @@ describe("SAS verification", function() { //channel, baseApis, userId, deviceId, startEvent, request const request = { onVerifierCancelled: function() {}, - }; + } as VerificationRequest; const channel = { send: function() { return Promise.resolve(); }, - }; - const sas = new SAS(channel, {}, "@alice:example.com", "ABCDEFG", null, request); + } as unknown as IVerificationChannel; + const mockClient = {} as unknown as MatrixClient; + const event = new MatrixEvent({ type: 'test' }); + const sas = new SAS(channel, mockClient, "@alice:example.com", "ABCDEFG", event, request); sas.handleEvent(new MatrixEvent({ sender: "@alice:example.com", type: "es.inquisition", @@ -65,7 +71,7 @@ describe("SAS verification", function() { expect(spy).toHaveBeenCalled(); // Cancel the SAS for cleanup (we started a verification, so abort) - sas.cancel(); + sas.cancel(new Error('error')); }); describe("verification", () => { @@ -403,16 +409,12 @@ describe("SAS verification", function() { }, ); alice.client.setDeviceVerified = jest.fn(); - alice.client.downloadKeys = () => { - return Promise.resolve(); - }; + alice.client.downloadKeys = jest.fn().mockResolvedValue({}); bob.client.setDeviceVerified = jest.fn(); - bob.client.downloadKeys = () => { - return Promise.resolve(); - }; + bob.client.downloadKeys = jest.fn().mockResolvedValue({}); - const bobPromise = new Promise((resolve, reject) => { - bob.client.on("crypto.verification.request", request => { + const bobPromise = new Promise>((resolve, reject) => { + bob.client.on(CryptoEvent.VerificationRequest, request => { request.verifier.on("show_sas", (e) => { e.mismatch(); }); @@ -421,7 +423,7 @@ describe("SAS verification", function() { }); const aliceVerifier = alice.client.beginKeyVerification( - verificationMethods.SAS, bob.client.getUserId(), bob.client.deviceId, + verificationMethods.SAS, bob.client.getUserId()!, bob.client.deviceId!, ); const aliceSpy = jest.fn(); @@ -501,7 +503,7 @@ describe("SAS verification", function() { aliceSasEvent = null; bobSasEvent = null; - bobPromise = new Promise((resolve, reject) => { + bobPromise = new Promise((resolve, reject) => { bob.client.on("crypto.verification.request", async (request) => { const verifier = request.beginKeyVerification(SAS.NAME); verifier.on("show_sas", (e) => { diff --git a/spec/unit/crypto/verification/secret_request.spec.js b/spec/unit/crypto/verification/secret_request.spec.ts similarity index 77% rename from spec/unit/crypto/verification/secret_request.spec.js rename to spec/unit/crypto/verification/secret_request.spec.ts index 398edc10a60..1c0a7410a4d 100644 --- a/spec/unit/crypto/verification/secret_request.spec.js +++ b/spec/unit/crypto/verification/secret_request.spec.ts @@ -18,6 +18,9 @@ import { CrossSigningInfo } from '../../../../src/crypto/CrossSigning'; import { encodeBase64 } from "../../../../src/crypto/olmlib"; import { setupWebcrypto, teardownWebcrypto } from './util'; import { VerificationBase } from '../../../../src/crypto/verification/Base'; +import { MatrixClient, MatrixEvent } from '../../../../src'; +import { VerificationRequest } from '../../../../src/crypto/verification/request/VerificationRequest'; +import { IVerificationChannel } from '../../../../src/crypto/verification/request/Channel'; jest.useFakeTimers(); @@ -54,9 +57,21 @@ describe("self-verifications", () => { cacheCallbacks, ); crossSigningInfo.keys = { - master: { keys: { X: testKeyPub } }, - self_signing: { keys: { X: testKeyPub } }, - user_signing: { keys: { X: testKeyPub } }, + master: { + keys: { X: testKeyPub }, + usage: [], + user_id: 'user-id', + }, + self_signing: { + keys: { X: testKeyPub }, + usage: [], + user_id: 'user-id', + }, + user_signing: { + keys: { X: testKeyPub }, + usage: [], + user_id: 'user-id', + }, }; const secretStorage = { @@ -79,20 +94,22 @@ describe("self-verifications", () => { getUserId: () => userId, getKeyBackupVersion: () => Promise.resolve({}), restoreKeyBackupWithCache, - }; + } as unknown as MatrixClient; const request = { onVerifierFinished: () => undefined, - }; + } as unknown as VerificationRequest; const verification = new VerificationBase( - undefined, // channel + undefined as unknown as IVerificationChannel, // channel client, // baseApis userId, "ABC", // deviceId - undefined, // startEvent + undefined as unknown as MatrixEvent, // startEvent request, ); + + // @ts-ignore set private property verification.resolve = () => undefined; const result = await verification.done(); @@ -102,12 +119,12 @@ describe("self-verifications", () => { expect(secretStorage.request.mock.calls.length).toBe(4); expect(cacheCallbacks.storeCrossSigningKeyCache.mock.calls[0][1]) - .toEqual(testKey); + .toEqual(testKey); expect(cacheCallbacks.storeCrossSigningKeyCache.mock.calls[1][1]) - .toEqual(testKey); + .toEqual(testKey); expect(storeSessionBackupPrivateKey.mock.calls[0][0]) - .toEqual(testKey); + .toEqual(testKey); expect(restoreKeyBackupWithCache).toHaveBeenCalled(); diff --git a/spec/unit/crypto/verification/verification_request.spec.js b/spec/unit/crypto/verification/verification_request.spec.ts similarity index 74% rename from spec/unit/crypto/verification/verification_request.spec.js rename to spec/unit/crypto/verification/verification_request.spec.ts index f8de29cee66..0b759efb993 100644 --- a/spec/unit/crypto/verification/verification_request.spec.js +++ b/spec/unit/crypto/verification/verification_request.spec.ts @@ -19,11 +19,18 @@ import { InRoomChannel } from "../../../../src/crypto/verification/request/InRoo import { ToDeviceChannel } from "../../../../src/crypto/verification/request/ToDeviceChannel"; import { MatrixEvent } from "../../../../src/models/event"; +import { MatrixClient } from "../../../../src/client"; import { setupWebcrypto, teardownWebcrypto } from "./util"; - -function makeMockClient(userId, deviceId) { +import { IVerificationChannel } from "../../../../src/crypto/verification/request/Channel"; +import { VerificationBase } from "../../../../src/crypto/verification/Base"; + +type MockClient = MatrixClient & { + popEvents: () => MatrixEvent[]; + popDeviceEvents: (userId: string, deviceId: string) => MatrixEvent[]; +}; +function makeMockClient(userId: string, deviceId: string): MockClient { let counter = 1; - let events = []; + let events: MatrixEvent[] = []; const deviceEvents = {}; return { getUserId() { return userId; }, @@ -54,16 +61,18 @@ function makeMockClient(userId, deviceId) { deviceEvents[userId][deviceId].push(event); } } - return Promise.resolve(); + return Promise.resolve({}); }, - popEvents() { + // @ts-ignore special testing fn + popEvents(): MatrixEvent[] { const e = events; events = []; return e; }, - popDeviceEvents(userId, deviceId) { + // @ts-ignore special testing fn + popDeviceEvents(userId: string, deviceId: string): MatrixEvent[] { const forDevice = deviceEvents[userId]; const events = forDevice && forDevice[deviceId]; const result = events || []; @@ -72,12 +81,21 @@ function makeMockClient(userId, deviceId) { } return result; }, - }; + } as unknown as MockClient; } const MOCK_METHOD = "mock-verify"; -class MockVerifier { - constructor(channel, client, userId, deviceId, startEvent) { +class MockVerifier extends VerificationBase<'', any> { + public _channel; + public _startEvent; + constructor( + channel: IVerificationChannel, + client: MatrixClient, + userId: string, + deviceId: string, + startEvent: MatrixEvent, + ) { + super(channel, client, userId, deviceId, startEvent, {} as unknown as VerificationRequest); this._channel = channel; this._startEvent = startEvent; } @@ -115,7 +133,10 @@ function makeRemoteEcho(event) { async function distributeEvent(ownRequest, theirRequest, event) { await ownRequest.channel.handleEvent( - makeRemoteEcho(event), ownRequest, true); + makeRemoteEcho(event), + ownRequest, + true, + ); await theirRequest.channel.handleEvent(event, theirRequest, true); } @@ -133,12 +154,19 @@ describe("verification request unit tests", function() { it("transition from UNSENT to DONE through happy path", async function() { const alice = makeMockClient("@alice:matrix.tld", "device1"); const bob = makeMockClient("@bob:matrix.tld", "device1"); + const verificationMethods = new Map( + [[MOCK_METHOD, MockVerifier]], + ) as unknown as Map; const aliceRequest = new VerificationRequest( - new InRoomChannel(alice, "!room", bob.getUserId()), - new Map([[MOCK_METHOD, MockVerifier]]), alice); + new InRoomChannel(alice, "!room", bob.getUserId()!), + verificationMethods, + alice, + ); const bobRequest = new VerificationRequest( new InRoomChannel(bob, "!room"), - new Map([[MOCK_METHOD, MockVerifier]]), bob); + verificationMethods, + bob, + ); expect(aliceRequest.invalid).toBe(true); expect(bobRequest.invalid).toBe(true); @@ -157,7 +185,7 @@ describe("verification request unit tests", function() { expect(aliceRequest.ready).toBe(true); const verifier = aliceRequest.beginKeyVerification(MOCK_METHOD); - await verifier.start(); + await (verifier as MockVerifier).start(); const [startEvent] = alice.popEvents(); expect(startEvent.getType()).toBe(START_TYPE); await distributeEvent(aliceRequest, bobRequest, startEvent); @@ -165,8 +193,7 @@ describe("verification request unit tests", function() { expect(aliceRequest.verifier).toBeInstanceOf(MockVerifier); expect(bobRequest.started).toBe(true); expect(bobRequest.verifier).toBeInstanceOf(MockVerifier); - - await bobRequest.verifier.start(); + await (bobRequest.verifier as MockVerifier).start(); const [bobDoneEvent] = bob.popEvents(); expect(bobDoneEvent.getType()).toBe(DONE_TYPE); await distributeEvent(bobRequest, aliceRequest, bobDoneEvent); @@ -180,12 +207,20 @@ describe("verification request unit tests", function() { it("methods only contains common methods", async function() { const alice = makeMockClient("@alice:matrix.tld", "device1"); const bob = makeMockClient("@bob:matrix.tld", "device1"); + const aliceVerificationMethods = new Map( + [["c", function() {}], ["a", function() {}]], + ) as unknown as Map; + const bobVerificationMethods = new Map( + [["c", function() {}], ["b", function() {}]], + ) as unknown as Map; const aliceRequest = new VerificationRequest( - new InRoomChannel(alice, "!room", bob.getUserId()), - new Map([["c", function() {}], ["a", function() {}]]), alice); + new InRoomChannel(alice, "!room", bob.getUserId()!), + aliceVerificationMethods, alice); const bobRequest = new VerificationRequest( new InRoomChannel(bob, "!room"), - new Map([["c", function() {}], ["b", function() {}]]), bob); + bobVerificationMethods, + bob, + ); await aliceRequest.sendRequest(); const [requestEvent] = alice.popEvents(); await distributeEvent(aliceRequest, bobRequest, requestEvent); @@ -201,13 +236,22 @@ describe("verification request unit tests", function() { const bob1 = makeMockClient("@bob:matrix.tld", "device1"); const bob2 = makeMockClient("@bob:matrix.tld", "device2"); const aliceRequest = new VerificationRequest( - new InRoomChannel(alice, "!room", bob1.getUserId()), new Map(), alice); + new InRoomChannel(alice, "!room", bob1.getUserId()!), + new Map(), + alice, + ); await aliceRequest.sendRequest(); const [requestEvent] = alice.popEvents(); const bob1Request = new VerificationRequest( - new InRoomChannel(bob1, "!room"), new Map(), bob1); + new InRoomChannel(bob1, "!room"), + new Map(), + bob1, + ); const bob2Request = new VerificationRequest( - new InRoomChannel(bob2, "!room"), new Map(), bob2); + new InRoomChannel(bob2, "!room"), + new Map(), + bob2, + ); await bob1Request.channel.handleEvent(requestEvent, bob1Request, true); await bob2Request.channel.handleEvent(requestEvent, bob2Request, true); @@ -222,22 +266,34 @@ describe("verification request unit tests", function() { it("verify own device with to_device messages", async function() { const bob1 = makeMockClient("@bob:matrix.tld", "device1"); const bob2 = makeMockClient("@bob:matrix.tld", "device2"); + const verificationMethods = new Map( + [[MOCK_METHOD, MockVerifier]], + ) as unknown as Map; const bob1Request = new VerificationRequest( - new ToDeviceChannel(bob1, bob1.getUserId(), ["device1", "device2"], - ToDeviceChannel.makeTransactionId(), "device2"), - new Map([[MOCK_METHOD, MockVerifier]]), bob1); + new ToDeviceChannel( + bob1, + bob1.getUserId()!, + ["device1", "device2"], + ToDeviceChannel.makeTransactionId(), + "device2", + ), + verificationMethods, + bob1, + ); const to = { userId: "@bob:matrix.tld", deviceId: "device2" }; const verifier = bob1Request.beginKeyVerification(MOCK_METHOD, to); expect(verifier).toBeInstanceOf(MockVerifier); - await verifier.start(); + await (verifier as MockVerifier).start(); const [startEvent] = bob1.popDeviceEvents(to.userId, to.deviceId); expect(startEvent.getType()).toBe(START_TYPE); const bob2Request = new VerificationRequest( - new ToDeviceChannel(bob2, bob2.getUserId(), ["device1"]), - new Map([[MOCK_METHOD, MockVerifier]]), bob2); + new ToDeviceChannel(bob2, bob2.getUserId()!, ["device1"]), + verificationMethods, + bob2, + ); await bob2Request.channel.handleEvent(startEvent, bob2Request, true); - await bob2Request.verifier.start(); + await (bob2Request.verifier as MockVerifier).start(); const [doneEvent1] = bob2.popDeviceEvents("@bob:matrix.tld", "device1"); expect(doneEvent1.getType()).toBe(DONE_TYPE); await bob1Request.channel.handleEvent(doneEvent1, bob1Request, true); @@ -253,11 +309,13 @@ describe("verification request unit tests", function() { const alice = makeMockClient("@alice:matrix.tld", "device1"); const bob = makeMockClient("@bob:matrix.tld", "device1"); const aliceRequest = new VerificationRequest( - new InRoomChannel(alice, "!room", bob.getUserId()), new Map(), alice); + new InRoomChannel(alice, "!room", bob.getUserId()!), + new Map(), + alice, + ); await aliceRequest.sendRequest(); const [requestEvent] = alice.popEvents(); - await aliceRequest.channel.handleEvent(requestEvent, aliceRequest, true, - true, true); + await aliceRequest.channel.handleEvent(requestEvent, aliceRequest, true); expect(aliceRequest.cancelled).toBe(false); expect(aliceRequest._cancellingUserId).toBe(undefined); @@ -269,11 +327,17 @@ describe("verification request unit tests", function() { const alice = makeMockClient("@alice:matrix.tld", "device1"); const bob = makeMockClient("@bob:matrix.tld", "device1"); const aliceRequest = new VerificationRequest( - new InRoomChannel(alice, "!room", bob.getUserId()), new Map(), alice); + new InRoomChannel(alice, "!room", bob.getUserId()!), + new Map(), + alice, + ); await aliceRequest.sendRequest(); const [requestEvent] = alice.popEvents(); const bobRequest = new VerificationRequest( - new InRoomChannel(bob, "!room"), new Map(), bob); + new InRoomChannel(bob, "!room"), + new Map(), + bob, + ); await bobRequest.channel.handleEvent(requestEvent, bobRequest, true); From 6fd80ed3edf832766d9f56ebf3bceb5a11821597 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Tue, 20 Sep 2022 13:55:50 +0100 Subject: [PATCH 30/33] Prepare changelog for v19.6.0-rc.1 --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 66820e0248a..94238495023 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +Changes in [19.6.0-rc.1](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v19.6.0-rc.1) (2022-09-20) +============================================================================================================ + +## ✨ Features + * Add a property aggregating all names of a NamespacedValue ([\#2656](https://github.com/matrix-org/matrix-js-sdk/pull/2656)). + * Implementation of MSC3824 to add action= param on SSO login ([\#2398](https://github.com/matrix-org/matrix-js-sdk/pull/2398)). Contributed by @hughns. + * Add invited_count and joined_count to sliding sync room responses. ([\#2628](https://github.com/matrix-org/matrix-js-sdk/pull/2628)). + * Base support for MSC3847: Ignore invites with policy rooms ([\#2626](https://github.com/matrix-org/matrix-js-sdk/pull/2626)). Contributed by @Yoric. + +## 🐛 Bug Fixes + * Fix handling of remote echoes doubling up ([\#2639](https://github.com/matrix-org/matrix-js-sdk/pull/2639)). Fixes #2618. + Changes in [19.5.0](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v19.5.0) (2022-09-13) ================================================================================================== From f34e568a98b44b48a10da6231877ecbf0019274f Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Tue, 20 Sep 2022 13:55:51 +0100 Subject: [PATCH 31/33] v19.6.0-rc.1 --- package.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 8c8aa452229..e16077a36ba 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matrix-js-sdk", - "version": "19.5.0", + "version": "19.6.0-rc.1", "description": "Matrix Client-Server SDK for Javascript", "engines": { "node": ">=12.9.0" @@ -32,7 +32,7 @@ "keywords": [ "matrix-org" ], - "main": "./src/index.ts", + "main": "./lib/index.js", "browser": "./lib/browser-index.js", "matrix_src_main": "./src/index.ts", "matrix_src_browser": "./src/browser-index.js", @@ -125,5 +125,6 @@ "jestSonar": { "reportPath": "coverage", "sonar56x": true - } + }, + "typings": "./lib/index.d.ts" } From 5451f6139a250083d8728165ba6adc30e5186227 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Tue, 27 Sep 2022 16:46:52 +0100 Subject: [PATCH 32/33] Prepare changelog for v19.6.0 --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 94238495023..e051ea89fbd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ -Changes in [19.6.0-rc.1](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v19.6.0-rc.1) (2022-09-20) -============================================================================================================ +Changes in [19.6.0](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v19.6.0) (2022-09-27) +================================================================================================== ## ✨ Features * Add a property aggregating all names of a NamespacedValue ([\#2656](https://github.com/matrix-org/matrix-js-sdk/pull/2656)). From b64a30f0ad35022b342ef8142e526fe12f43673a Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Tue, 27 Sep 2022 16:46:53 +0100 Subject: [PATCH 33/33] v19.6.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e16077a36ba..01f9f6a6944 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matrix-js-sdk", - "version": "19.6.0-rc.1", + "version": "19.6.0", "description": "Matrix Client-Server SDK for Javascript", "engines": { "node": ">=12.9.0"