From 3a5a30820ae03d589019ffe99f5b4587cf0e52f3 Mon Sep 17 00:00:00 2001 From: Amir Ghezelbash Date: Wed, 16 Oct 2024 12:59:01 +0330 Subject: [PATCH] fix(core, api-client): Add abort controller to notifications api call (WPB-11013) (#6577) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: Add abort controller to notifications api call (WPB-11013) * Update packages/api-client/src/http/HttpClient.ts Co-authored-by: Przemysław Jóźwik * Update packages/api-client/src/http/HttpClient.ts Co-authored-by: Przemysław Jóźwik * Update packages/api-client/src/http/HttpClient.ts Co-authored-by: Przemysław Jóźwik * Update packages/api-client/src/http/HttpClient.ts Co-authored-by: Przemysław Jóźwik * Update packages/api-client/src/http/HttpClient.ts Co-authored-by: Przemysław Jóźwik * fix broken code * fix tests * fix broken tests * remove @types/rimraf * add temporary skip lib check to tsconfig of core * change version * chore: Publish [skip ci] - @wireapp/api-client@27.6.0-experimental-abort-controller.1 - bazinga64@6.3.9 - @wireapp/certificate-check@0.7.16 - @wireapp/commons@5.2.11 - @wireapp/copy-config@2.2.8 - @wireapp/core@46.4.0-experimental-abort-controller.1 - @wireapp/license-collector@0.12.9 - @wireapp/priority-queue@2.1.9 - @wireapp/promise-queue@2.3.6 - @wireapp/react-ui-kit@9.23.7 - @wireapp/store-engine-dexie@2.1.13 - @wireapp/store-engine-fs@3.1.9 - @wireapp/store-engine@5.1.9 - @wireapp/webapp-events@0.24.1 * remove experimental versions * chore: Publish [skip ci] - @wireapp/api-client@27.6.1 - bazinga64@6.3.10 - @wireapp/certificate-check@0.7.17 - @wireapp/commons@5.2.12 - @wireapp/copy-config@2.2.9 - @wireapp/core@46.4.1 - @wireapp/license-collector@0.12.10 - @wireapp/priority-queue@2.1.10 - @wireapp/promise-queue@2.3.7 - @wireapp/react-ui-kit@9.23.8 - @wireapp/store-engine-dexie@2.1.14 - @wireapp/store-engine-fs@3.1.10 - @wireapp/store-engine@5.1.10 - @wireapp/webapp-events@0.24.2 --------- Co-authored-by: Przemysław Jóźwik Co-authored-by: Otto the Bot --- package.json | 1 - packages/api-client/package.json | 2 +- .../api-client/src/http/HttpClient.test.ts | 6 +- packages/api-client/src/http/HttpClient.ts | 26 ++++-- .../NotificationAPI/NotificationAPI.ts | 16 +++- .../api-client/src/shims/browser/cookie.ts | 2 +- packages/api-client/src/shims/node/cookie.ts | 2 +- .../api-client/src/tcp/WebSocketClient.ts | 16 +--- packages/bazinga64/package.json | 3 +- packages/certificate-check/package.json | 3 +- packages/commons/package.json | 3 +- packages/copy-config/package.json | 3 +- packages/core/package.json | 3 +- packages/core/src/Account.ts | 7 +- .../NotificationBackendRepository.ts | 4 +- .../src/notification/NotificationService.ts | 11 ++- packages/core/tsconfig.json | 3 +- packages/license-collector/package.json | 3 +- packages/priority-queue/package.json | 3 +- packages/promise-queue/package.json | 3 +- packages/react-ui-kit/package.json | 3 +- packages/store-engine-dexie/package.json | 5 +- packages/store-engine-fs/package.json | 5 +- packages/store-engine/package.json | 3 +- packages/webapp-events/package.json | 3 +- yarn.lock | 81 +------------------ 26 files changed, 73 insertions(+), 147 deletions(-) diff --git a/package.json b/package.json index 22bf16f6ea..323989dd6c 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,6 @@ "@types/babel__core": "^7", "@types/jest": "^29.2.0", "@types/node": "^22.0.0", - "@types/rimraf": "4.0.5", "@typescript-eslint/eslint-plugin": "7.17.0", "@typescript-eslint/parser": "7.17.0", "@wireapp/eslint-config": "workspace:^", diff --git a/packages/api-client/package.json b/packages/api-client/package.json index 3bebec0e0a..dcb5b743bf 100644 --- a/packages/api-client/package.json +++ b/packages/api-client/package.json @@ -66,6 +66,6 @@ "watch": "webpack serve --config webpack.browser.js", "prepare": "yarn dist" }, - "version": "27.6.0", + "version": "27.6.1", "gitHead": "5339f01fe01ef0871da8c8bc8662fbe9e604754a" } diff --git a/packages/api-client/src/http/HttpClient.test.ts b/packages/api-client/src/http/HttpClient.test.ts index c8a62211e4..68c2449bcd 100644 --- a/packages/api-client/src/http/HttpClient.test.ts +++ b/packages/api-client/src/http/HttpClient.test.ts @@ -56,7 +56,7 @@ describe('HttpClient', () => { return Promise.resolve(mockedAccessTokenStore.accessToken!); }; - await client._sendRequest({method: 'GET', baseURL: testConfig.urls.rest, url: AuthAPI.URL.ACCESS}); + await client._sendRequest({config: {method: 'GET', baseURL: testConfig.urls.rest, url: AuthAPI.URL.ACCESS}}); }); it('does not retry on 403 invalid token', async () => { @@ -73,7 +73,7 @@ describe('HttpClient', () => { let backendError; try { - await client._sendRequest({method: 'GET', baseURL: testConfig.urls.rest, url: AuthAPI.URL.ACCESS}); + await client._sendRequest({config: {method: 'GET', baseURL: testConfig.urls.rest, url: AuthAPI.URL.ACCESS}}); throw new Error('Should not resolve'); } catch (error) { backendError = error; @@ -97,7 +97,7 @@ describe('HttpClient', () => { }; let backendError; try { - await client._sendRequest({method: 'GET', baseURL: testConfig.urls.rest, url: AuthAPI.URL.ACCESS}); + await client._sendRequest({config: {method: 'GET', baseURL: testConfig.urls.rest, url: AuthAPI.URL.ACCESS}}); throw new Error('Should not resolve'); } catch (error) { backendError = error; diff --git a/packages/api-client/src/http/HttpClient.ts b/packages/api-client/src/http/HttpClient.ts index 56b8505110..19851aab0f 100644 --- a/packages/api-client/src/http/HttpClient.ts +++ b/packages/api-client/src/http/HttpClient.ts @@ -46,6 +46,12 @@ enum TOPIC { ON_INVALID_TOKEN = 'HttpClient.TOPIC.ON_INVALID_TOKEN', } +type SendRequest = { + config: AxiosRequestConfig; + isFirstTry?: boolean; + abortController?: AbortController; +}; + export interface HttpClient { on(event: TOPIC.ON_CONNECTION_STATE_CHANGE, listener: (state: ConnectionState) => void): this; @@ -131,7 +137,7 @@ export class HttpClient extends EventEmitter { } } - public async _sendRequest(config: AxiosRequestConfig, isFirstTry = true): Promise> { + public async _sendRequest({config, isFirstTry = true, abortController}: SendRequest): Promise> { if (this.accessTokenStore.accessToken) { // TODO: remove tokenAsParam const {token_type, access_token} = this.accessTokenStore.accessToken; @@ -145,6 +151,7 @@ export class HttpClient extends EventEmitter { try { const response = await this.client.request({ ...config, + signal: abortController?.signal, // We want to prefix all urls, except the ones with cookies which are attached to unprefixed urls url: config.withCredentials ? config.url : `${this.versionPrefix}${config.url}`, maxBodyLength: FILE_SIZE_100_MB, @@ -161,7 +168,7 @@ export class HttpClient extends EventEmitter { config['axios-retry'] = { retries: 0, }; - return this._sendRequest(config, false); + return this._sendRequest({config, isFirstTry: false, abortController}); }; const hasAccessToken = !!this.accessTokenStore?.accessToken; @@ -276,10 +283,11 @@ export class HttpClient extends EventEmitter { public async sendRequest( config: AxiosRequestConfig, isSynchronousRequest: boolean = false, + abortController?: AbortController, ): Promise> { const promise = isSynchronousRequest - ? this.requestQueue.add(() => this._sendRequest(config)) - : this._sendRequest(config); + ? this.requestQueue.add(() => this._sendRequest({config, abortController})) + : this._sendRequest({config, abortController}); try { return await promise; @@ -289,14 +297,18 @@ export class HttpClient extends EventEmitter { const isTooManyRequestsError = axios.isAxiosError(error) && error.response?.status === 420; if (isTooManyRequestsError) { - return this.backOffQueue.add(() => this._sendRequest(config)); + return this.backOffQueue.add(() => this._sendRequest({config, abortController})); } throw error; } } - public sendJSON(config: AxiosRequestConfig, isSynchronousRequest: boolean = false): Promise> { + public sendJSON( + config: AxiosRequestConfig, + isSynchronousRequest: boolean = false, + abortController?: AbortController, + ): Promise> { const shouldGzipData = process.env.NODE_ENV !== 'test' && !!config.data && @@ -312,7 +324,7 @@ export class HttpClient extends EventEmitter { 'Content-Encoding': shouldGzipData ? 'gzip' : config.headers?.['Content-Encoding'], }; - return this.sendRequest(config, isSynchronousRequest); + return this.sendRequest(config, isSynchronousRequest, abortController); } public sendXML(config: AxiosRequestConfig): Promise> { diff --git a/packages/api-client/src/notification/NotificationAPI/NotificationAPI.ts b/packages/api-client/src/notification/NotificationAPI/NotificationAPI.ts index 1b820135c3..34b0da279f 100644 --- a/packages/api-client/src/notification/NotificationAPI/NotificationAPI.ts +++ b/packages/api-client/src/notification/NotificationAPI/NotificationAPI.ts @@ -65,6 +65,7 @@ export class NotificationAPI { clientId?: string, size: number = NOTIFICATION_SIZE_MAXIMUM, since?: string, + abortController?: AbortController, ): Promise { const config: AxiosRequestConfig = { method: 'get', @@ -76,7 +77,7 @@ export class NotificationAPI { url: NotificationAPI.URL.NOTIFICATION, }; - const response = await this.client.sendJSON(config); + const response = await this.client.sendJSON(config, false, abortController); return response.data; } @@ -86,7 +87,11 @@ export class NotificationAPI { * @param lastNotificationId Only return notifications more recent than this * @see https://staging-nginz-https.zinfra.io/swagger-ui/#!/push/fetchNotifications */ - public async getAllNotifications(clientId?: string, lastNotificationId?: string): Promise { + public async getAllNotifications( + clientId?: string, + lastNotificationId?: string, + abortController?: AbortController, + ): Promise { const getNotificationChunks = async ( notificationList: Notification[], currentClientId?: string, @@ -101,7 +106,12 @@ export class NotificationAPI { let hasMissedNotifications = false; try { - payload = await this.getNotifications(currentClientId, NOTIFICATION_SIZE_MAXIMUM, currentNotificationId); + payload = await this.getNotifications( + currentClientId, + NOTIFICATION_SIZE_MAXIMUM, + currentNotificationId, + abortController, + ); } catch (error) { const isAxiosError = axios.isAxiosError(error); diff --git a/packages/api-client/src/shims/browser/cookie.ts b/packages/api-client/src/shims/browser/cookie.ts index e287b4c26a..04d162d5af 100644 --- a/packages/api-client/src/shims/browser/cookie.ts +++ b/packages/api-client/src/shims/browser/cookie.ts @@ -26,4 +26,4 @@ export const retrieveCookie = (response: AxiosResponse): Promis Promise.resolve(response.data); export const sendRequestWithCookie = (client: HttpClient, config: AxiosRequestConfig): Promise> => - client._sendRequest(config); + client._sendRequest({config}); diff --git a/packages/api-client/src/shims/node/cookie.ts b/packages/api-client/src/shims/node/cookie.ts index 5681a90c80..33c997e6a5 100644 --- a/packages/api-client/src/shims/node/cookie.ts +++ b/packages/api-client/src/shims/node/cookie.ts @@ -63,5 +63,5 @@ export const sendRequestWithCookie = async ( config.headers.set('Cookie', `zuid=${cookie.zuid}`); config.withCredentials = true; } - return client._sendRequest(config); + return client._sendRequest({config}); }; diff --git a/packages/api-client/src/tcp/WebSocketClient.ts b/packages/api-client/src/tcp/WebSocketClient.ts index c99d669b91..be82cae200 100644 --- a/packages/api-client/src/tcp/WebSocketClient.ts +++ b/packages/api-client/src/tcp/WebSocketClient.ts @@ -42,17 +42,7 @@ export interface WebSocketClient { on(event: TOPIC.ON_STATE_CHANGE, listener: (state: WEBSOCKET_STATE) => void): this; } -export class AbortHandler { - private aborted = false; - - abort = () => { - this.aborted = true; - }; - - isAborted = () => this.aborted; -} - -export type OnConnect = (abortHandler: AbortHandler) => Promise; +export type OnConnect = (abortHandler: AbortController) => Promise; export class WebSocketClient extends EventEmitter { private clientId?: string; @@ -64,7 +54,7 @@ export class WebSocketClient extends EventEmitter { public client: HttpClient; private isSocketLocked: boolean; private bufferedMessages: string[]; - private abortHandler?: AbortHandler; + private abortHandler?: AbortController; public static readonly TOPIC = TOPIC; @@ -146,7 +136,7 @@ export class WebSocketClient extends EventEmitter { this.socket.setOnOpen(() => { this.onOpen(); if (onConnect) { - this.abortHandler = new AbortHandler(); + this.abortHandler = new AbortController(); void onConnect(this.abortHandler); } }); diff --git a/packages/bazinga64/package.json b/packages/bazinga64/package.json index 3fe7a2b597..523e975fb2 100644 --- a/packages/bazinga64/package.json +++ b/packages/bazinga64/package.json @@ -26,7 +26,6 @@ "@types/jest": "^29.2.0", "@types/libsodium-wrappers-sumo": "0.7.8", "@types/node": "^22.0.0", - "@types/rimraf": "4.0.5", "cross-env": "7.0.3", "jest": "^29.2.1", "libsodium-wrappers-sumo": "0.7.15", @@ -41,5 +40,5 @@ "test": "jest", "test:coverage": "jest --coverage" }, - "version": "6.3.8" + "version": "6.3.10" } diff --git a/packages/certificate-check/package.json b/packages/certificate-check/package.json index 0a67715652..39a459aa97 100644 --- a/packages/certificate-check/package.json +++ b/packages/certificate-check/package.json @@ -16,7 +16,6 @@ "@types/jest": "^29.2.0", "@types/jsrsasign": "10.5.14", "@types/node": "^22.0.0", - "@types/rimraf": "4.0.5", "jest": "^29.2.1", "rimraf": "6.0.1", "ts-node": "^10.9.1", @@ -29,5 +28,5 @@ "test": "jest", "test:coverage": "jest --coverage" }, - "version": "0.7.15" + "version": "0.7.17" } diff --git a/packages/commons/package.json b/packages/commons/package.json index 10bde878a0..388e1bb8fb 100644 --- a/packages/commons/package.json +++ b/packages/commons/package.json @@ -23,7 +23,6 @@ "@types/fs-extra": "11.0.4", "@types/jest": "^29.2.0", "@types/platform": "1.3.6", - "@types/rimraf": "4.0.5", "jest": "^29.2.1", "rimraf": "6.0.1", "typescript": "^5.0.4" @@ -36,5 +35,5 @@ "test:coverage": "yarn test", "test:watch": "yarn jest --watch" }, - "version": "5.2.10" + "version": "5.2.12" } diff --git a/packages/copy-config/package.json b/packages/copy-config/package.json index 6e87cd2b87..3d0748fbfc 100644 --- a/packages/copy-config/package.json +++ b/packages/copy-config/package.json @@ -24,7 +24,6 @@ "@types/copy": "0.3.5", "@types/fs-extra": "11.0.4", "@types/jest": "^29.2.0", - "@types/rimraf": "4.0.5", "jest": "^29.2.1", "typescript": "^5.0.4" }, @@ -35,5 +34,5 @@ "test": "jest", "test:coverage": "jest --coverage" }, - "version": "2.2.7" + "version": "2.2.9" } diff --git a/packages/core/package.json b/packages/core/package.json index 7209984977..0c65382f96 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -36,7 +36,6 @@ "@swc/jest": "^0.2.23", "@types/jest": "^29.2.0", "@types/long": "^5.0.0", - "@types/rimraf": "4.0.5", "@types/tough-cookie": "4.0.5", "@types/uuid": "9.0.8", "commander": "12.1.0", @@ -62,6 +61,6 @@ "test:coverage": "jest --coverage", "watch": "tsc --watch" }, - "version": "46.4.0", + "version": "46.4.1", "gitHead": "5339f01fe01ef0871da8c8bc8662fbe9e604754a" } diff --git a/packages/core/src/Account.ts b/packages/core/src/Account.ts index 2fc16928ab..ec1ec3a0c4 100644 --- a/packages/core/src/Account.ts +++ b/packages/core/src/Account.ts @@ -32,7 +32,7 @@ import {SUBCONVERSATION_ID} from '@wireapp/api-client/lib/conversation'; import * as Events from '@wireapp/api-client/lib/event'; import {CONVERSATION_EVENT} from '@wireapp/api-client/lib/event'; import {Notification} from '@wireapp/api-client/lib/notification/'; -import {AbortHandler, WebSocketClient} from '@wireapp/api-client/lib/tcp/'; +import {WebSocketClient} from '@wireapp/api-client/lib/tcp/'; import {WEBSOCKET_STATE} from '@wireapp/api-client/lib/tcp/ReconnectingWebsocket'; import {QualifiedId} from '@wireapp/api-client/lib/user'; import {TimeInMillis} from '@wireapp/commons/lib/util/TimeUtil'; @@ -635,7 +635,7 @@ export class Account extends TypedEventEmitter { return onMissedNotifications(notificationId); }; - const processNotificationStream = async (abortHandler: AbortHandler) => { + const processNotificationStream = async (abortHandler: AbortController) => { // Lock websocket in order to buffer any message that arrives while we handle the notification stream this.apiClient.transport.ws.lock(); pauseMessageSending(); @@ -653,7 +653,7 @@ export class Account extends TypedEventEmitter { ); this.logger.info(`Finished processing notifications ${JSON.stringify(results)}`, results); - if (abortHandler.isAborted()) { + if (abortHandler.signal.aborted) { this.logger.warn('Ending connection process as websocket was closed'); return; } @@ -666,6 +666,7 @@ export class Account extends TypedEventEmitter { resumeMessageSending(); resumeRejoiningMLSConversations(); }; + this.apiClient.connect(processNotificationStream); return () => { diff --git a/packages/core/src/notification/NotificationBackendRepository.ts b/packages/core/src/notification/NotificationBackendRepository.ts index 755bd0531e..129d808733 100644 --- a/packages/core/src/notification/NotificationBackendRepository.ts +++ b/packages/core/src/notification/NotificationBackendRepository.ts @@ -24,8 +24,8 @@ import {APIClient} from '@wireapp/api-client'; export class NotificationBackendRepository { constructor(private readonly apiClient: APIClient) {} - public async getAllNotifications(clientId?: string, lastNotificationId?: string) { - return this.apiClient.api.notification.getAllNotifications(clientId, lastNotificationId); + public async getAllNotifications(clientId?: string, lastNotificationId?: string, abortController?: AbortController) { + return this.apiClient.api.notification.getAllNotifications(clientId, lastNotificationId, abortController); } public getLastNotification(clientId?: string): Promise { diff --git a/packages/core/src/notification/NotificationService.ts b/packages/core/src/notification/NotificationService.ts index 0eec751fc7..9733a86639 100644 --- a/packages/core/src/notification/NotificationService.ts +++ b/packages/core/src/notification/NotificationService.ts @@ -19,7 +19,6 @@ import {BackendEvent} from '@wireapp/api-client/lib/event'; import {Notification} from '@wireapp/api-client/lib/notification/'; -import {AbortHandler} from '@wireapp/api-client/lib/tcp'; import logdown from 'logdown'; import {APIClient} from '@wireapp/api-client'; @@ -90,9 +89,9 @@ export class NotificationService extends TypedEventEmitter { this.database = new NotificationDatabaseRepository(storeEngine); } - private async getAllNotifications(since: string) { + private async getAllNotifications(since: string, abortController: AbortController) { const clientId = this.apiClient.clientId; - return this.backend.getAllNotifications(clientId, since); + return this.backend.getAllNotifications(clientId, since, abortController); } /** Should only be called with a completely new client. */ @@ -140,10 +139,10 @@ export class NotificationService extends TypedEventEmitter { public async processNotificationStream( notificationHandler: NotificationHandler, onMissedNotifications: (notificationId: string) => void, - abortHandler: AbortHandler, + abortHandler: AbortController, ): Promise<{total: number; error: number; success: number}> { const lastNotificationId = await this.database.getLastNotificationId(); - const {notifications, missedNotification} = await this.getAllNotifications(lastNotificationId); + const {notifications, missedNotification} = await this.getAllNotifications(lastNotificationId, abortHandler); if (missedNotification) { onMissedNotifications(missedNotification); } @@ -155,7 +154,7 @@ export class NotificationService extends TypedEventEmitter { : `No notification to process from the stream`; this.logger.log(logMessage); for (const [index, notification] of notifications.entries()) { - if (abortHandler.isAborted()) { + if (abortHandler.signal.aborted) { /* Stop handling notifications if the websocket has been disconnected. * Upon reconnecting we are going to restart handling the notification stream for where we left of */ diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json index deda1bd57a..4ddad24292 100644 --- a/packages/core/tsconfig.json +++ b/packages/core/tsconfig.json @@ -2,7 +2,8 @@ "extends": "../../tsconfig.json", "compilerOptions": { "esModuleInterop": true, - "outDir": "lib" + "outDir": "lib", + "skipLibCheck": true }, "exclude": ["node_modules", "src/test", "**.test.ts", "src/demo"], "include": ["src"] diff --git a/packages/license-collector/package.json b/packages/license-collector/package.json index e9f4fe9572..c502f44e0d 100644 --- a/packages/license-collector/package.json +++ b/packages/license-collector/package.json @@ -20,7 +20,6 @@ "@types/fs-extra": "11.0.4", "@types/license-checker": "^25", "@types/npm-registry-package-info": "1.0.4", - "@types/rimraf": "4.0.5", "license-checker": "^25.0.1", "rimraf": "6.0.1", "typescript": "^5.0.4" @@ -31,5 +30,5 @@ "dist": "yarn build", "start": "ts-node -r tsconfig-paths/register ./src/cli.ts" }, - "version": "0.12.8" + "version": "0.12.10" } diff --git a/packages/priority-queue/package.json b/packages/priority-queue/package.json index 48c6ced35f..0e0fe31cd0 100644 --- a/packages/priority-queue/package.json +++ b/packages/priority-queue/package.json @@ -12,7 +12,6 @@ "@swc/jest": "^0.2.23", "@types/jest": "^29.2.0", "@types/node": "^22.0.0", - "@types/rimraf": "4.0.5", "jest": "^29.2.1", "rimraf": "6.0.1", "ts-node": "^10.9.1", @@ -25,5 +24,5 @@ "test": "jest", "test:coverage": "jest --coverage" }, - "version": "2.1.8" + "version": "2.1.10" } diff --git a/packages/promise-queue/package.json b/packages/promise-queue/package.json index d50b5ea551..2c6f57176f 100644 --- a/packages/promise-queue/package.json +++ b/packages/promise-queue/package.json @@ -11,7 +11,6 @@ "@swc/core": "^1.3.10", "@swc/jest": "^0.2.23", "@types/jest": "^29.2.0", - "@types/rimraf": "4.0.5", "@wireapp/commons": "workspace:^", "jest": "^29.2.1", "rimraf": "6.0.1", @@ -24,5 +23,5 @@ "test": "jest", "test:coverage": "jest --coverage" }, - "version": "2.3.5" + "version": "2.3.7" } diff --git a/packages/react-ui-kit/package.json b/packages/react-ui-kit/package.json index a90ef73e26..b4676a7d8b 100644 --- a/packages/react-ui-kit/package.json +++ b/packages/react-ui-kit/package.json @@ -33,7 +33,6 @@ "@types/node": "^22.0.0", "@types/react": "^18.0.25", "@types/react-dom": "^18.0.8", - "@types/rimraf": "4.0.5", "@types/webpack-env": "1.18.5", "babel-jest": "29.7.0", "babel-loader": "9.2.1", @@ -70,5 +69,5 @@ "test:watch": "jest --watch", "test:update": "jest --updateSnapshot" }, - "version": "9.23.6" + "version": "9.23.8" } diff --git a/packages/store-engine-dexie/package.json b/packages/store-engine-dexie/package.json index 058a7d4db6..73f66a8e73 100644 --- a/packages/store-engine-dexie/package.json +++ b/packages/store-engine-dexie/package.json @@ -18,9 +18,8 @@ "@swc/jest": "^0.2.23", "@types/jest": "^29.2.0", "@types/node": "^22.0.0", - "@types/rimraf": "4.0.5", "@types/uuid": "9.0.8", - "@wireapp/store-engine": "5.1.8", + "@wireapp/store-engine": "5.1.10", "core-js": "^3.36.0", "fake-indexeddb": "^5.0.2", "jest": "^29.2.1", @@ -37,5 +36,5 @@ "test": "jest", "test:coverage": "jest --coverage" }, - "version": "2.1.12" + "version": "2.1.14" } diff --git a/packages/store-engine-fs/package.json b/packages/store-engine-fs/package.json index b875739d4e..e96b21a3aa 100644 --- a/packages/store-engine-fs/package.json +++ b/packages/store-engine-fs/package.json @@ -19,8 +19,7 @@ "@types/fs-extra": "11.0.4", "@types/jest": "^29.2.0", "@types/node": "^22.0.0", - "@types/rimraf": "4.0.5", - "@wireapp/store-engine": "5.1.8", + "@wireapp/store-engine": "5.1.10", "jest": "^29.2.1", "rimraf": "6.0.1", "ts-node": "10.9.2", @@ -33,5 +32,5 @@ "test": "jest", "test:coverage": "jest --coverage" }, - "version": "3.1.8" + "version": "3.1.10" } diff --git a/packages/store-engine/package.json b/packages/store-engine/package.json index 0a6ef3951f..08e4f7aece 100644 --- a/packages/store-engine/package.json +++ b/packages/store-engine/package.json @@ -19,7 +19,6 @@ "@swc/jest": "^0.2.23", "@types/jest": "^29.2.0", "@types/node": "^22.0.0", - "@types/rimraf": "4.0.5", "jest": "^29.2.1", "rimraf": "6.0.1", "ts-node": "10.9.2", @@ -32,5 +31,5 @@ "test": "jest", "test:coverage": "jest --coverage" }, - "version": "5.1.8" + "version": "5.1.10" } diff --git a/packages/webapp-events/package.json b/packages/webapp-events/package.json index 3323edfc19..85e6ef0cbf 100644 --- a/packages/webapp-events/package.json +++ b/packages/webapp-events/package.json @@ -8,7 +8,6 @@ ], "main": "lib/index", "devDependencies": { - "@types/rimraf": "4.0.5", "rimraf": "6.0.1", "typescript": "^5.0.4" }, @@ -18,5 +17,5 @@ "dist": "yarn build", "test": "exit 0" }, - "version": "0.24.0" + "version": "0.24.2" } diff --git a/yarn.lock b/yarn.lock index 84b932980b..c1f8d1320d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4628,15 +4628,6 @@ __metadata: languageName: node linkType: hard -"@types/rimraf@npm:4.0.5": - version: 4.0.5 - resolution: "@types/rimraf@npm:4.0.5" - dependencies: - rimraf: "*" - checksum: 8c7201ff0ea89c4917d5010b22113e906930da65b6506ff4b45f99bde39099dc5195f095206fde8b84bc364cf801ee5eaf594c2676d3f3dd0e468344ab316187 - languageName: node - linkType: hard - "@types/semver@npm:^7.3.12": version: 7.5.0 resolution: "@types/semver@npm:7.5.0" @@ -5288,7 +5279,6 @@ __metadata: "@types/jest": ^29.2.0 "@types/jsrsasign": 10.5.14 "@types/node": ^22.0.0 - "@types/rimraf": 4.0.5 jest: ^29.2.1 jsrsasign: 11.1.0 rimraf: 6.0.1 @@ -5306,7 +5296,6 @@ __metadata: "@types/fs-extra": 11.0.4 "@types/jest": ^29.2.0 "@types/platform": 1.3.6 - "@types/rimraf": 4.0.5 ansi-regex: 5.0.1 fs-extra: 11.2.0 jest: ^29.2.1 @@ -5327,7 +5316,6 @@ __metadata: "@types/copy": 0.3.5 "@types/fs-extra": 11.0.4 "@types/jest": ^29.2.0 - "@types/rimraf": 4.0.5 axios: 1.7.7 copy: 0.3.2 cosmiconfig: 9.0.0 @@ -5358,7 +5346,6 @@ __metadata: "@swc/jest": ^0.2.23 "@types/jest": ^29.2.0 "@types/long": ^5.0.0 - "@types/rimraf": 4.0.5 "@types/tough-cookie": 4.0.5 "@types/uuid": 9.0.8 "@wireapp/api-client": "workspace:^" @@ -5446,7 +5433,6 @@ __metadata: "@types/fs-extra": 11.0.4 "@types/license-checker": ^25 "@types/npm-registry-package-info": 1.0.4 - "@types/rimraf": 4.0.5 fs-extra: 11.2.0 license-checker: ^25.0.1 logdown: 3.3.1 @@ -5491,7 +5477,6 @@ __metadata: "@swc/jest": ^0.2.23 "@types/jest": ^29.2.0 "@types/node": ^22.0.0 - "@types/rimraf": 4.0.5 jest: ^29.2.1 rimraf: 6.0.1 ts-node: ^10.9.1 @@ -5506,7 +5491,6 @@ __metadata: "@swc/core": ^1.3.10 "@swc/jest": ^0.2.23 "@types/jest": ^29.2.0 - "@types/rimraf": 4.0.5 "@wireapp/commons": "workspace:^" jest: ^29.2.1 rimraf: 6.0.1 @@ -5561,7 +5545,6 @@ __metadata: "@types/node": ^22.0.0 "@types/react": ^18.0.25 "@types/react-dom": ^18.0.8 - "@types/rimraf": 4.0.5 "@types/webpack-env": 1.18.5 babel-jest: 29.7.0 babel-loader: 9.2.1 @@ -5598,9 +5581,8 @@ __metadata: "@swc/jest": ^0.2.23 "@types/jest": ^29.2.0 "@types/node": ^22.0.0 - "@types/rimraf": 4.0.5 "@types/uuid": 9.0.8 - "@wireapp/store-engine": 5.1.8 + "@wireapp/store-engine": 5.1.10 core-js: ^3.36.0 dexie: ">3.2.0" fake-indexeddb: ^5.0.2 @@ -5624,8 +5606,7 @@ __metadata: "@types/fs-extra": 11.0.4 "@types/jest": ^29.2.0 "@types/node": ^22.0.0 - "@types/rimraf": 4.0.5 - "@wireapp/store-engine": 5.1.8 + "@wireapp/store-engine": 5.1.10 fs-extra: 11.2.0 jest: ^29.2.1 rimraf: 6.0.1 @@ -5636,7 +5617,7 @@ __metadata: languageName: unknown linkType: soft -"@wireapp/store-engine@5.1.8, @wireapp/store-engine@workspace:*, @wireapp/store-engine@workspace:^, @wireapp/store-engine@workspace:packages/store-engine": +"@wireapp/store-engine@5.1.10, @wireapp/store-engine@workspace:*, @wireapp/store-engine@workspace:^, @wireapp/store-engine@workspace:packages/store-engine": version: 0.0.0-use.local resolution: "@wireapp/store-engine@workspace:packages/store-engine" dependencies: @@ -5644,7 +5625,6 @@ __metadata: "@swc/jest": ^0.2.23 "@types/jest": ^29.2.0 "@types/node": ^22.0.0 - "@types/rimraf": 4.0.5 jest: ^29.2.1 rimraf: 6.0.1 ts-node: 10.9.2 @@ -5665,7 +5645,6 @@ __metadata: version: 0.0.0-use.local resolution: "@wireapp/webapp-events@workspace:packages/webapp-events" dependencies: - "@types/rimraf": 4.0.5 rimraf: 6.0.1 typescript: ^5.0.4 languageName: unknown @@ -6612,7 +6591,6 @@ __metadata: "@types/jest": ^29.2.0 "@types/libsodium-wrappers-sumo": 0.7.8 "@types/node": ^22.0.0 - "@types/rimraf": 4.0.5 cross-env: 7.0.3 jest: ^29.2.1 libsodium-wrappers-sumo: 0.7.15 @@ -10671,21 +10649,6 @@ __metadata: languageName: node linkType: hard -"glob@npm:^10.3.7": - version: 10.3.15 - resolution: "glob@npm:10.3.15" - dependencies: - foreground-child: ^3.1.0 - jackspeak: ^2.3.6 - minimatch: ^9.0.1 - minipass: ^7.0.4 - path-scurry: ^1.11.0 - bin: - glob: dist/esm/bin.mjs - checksum: c7aeae0b4eea0dfedc6682b71a8ad4d1ea9dfec0f2440571f916e1918c046824c8d441bbe1965c06fede025a0726c6daab5ae8019afe667364f43776eaaf9044 - languageName: node - linkType: hard - "glob@npm:^11.0.0": version: 11.0.0 resolution: "glob@npm:11.0.0" @@ -12334,7 +12297,7 @@ __metadata: languageName: node linkType: hard -"jackspeak@npm:^2.3.5, jackspeak@npm:^2.3.6": +"jackspeak@npm:^2.3.5": version: 2.3.6 resolution: "jackspeak@npm:2.3.6" dependencies: @@ -13708,13 +13671,6 @@ __metadata: languageName: node linkType: hard -"lru-cache@npm:^10.2.0": - version: 10.2.0 - resolution: "lru-cache@npm:10.2.0" - checksum: eee7ddda4a7475deac51ac81d7dd78709095c6fa46e8350dc2d22462559a1faa3b81ed931d5464b13d48cbd7e08b46100b6f768c76833912bc444b99c37e25db - languageName: node - linkType: hard - "lru-cache@npm:^10.2.2": version: 10.3.1 resolution: "lru-cache@npm:10.3.1" @@ -14304,13 +14260,6 @@ __metadata: languageName: node linkType: hard -"minipass@npm:^7.0.4": - version: 7.0.4 - resolution: "minipass@npm:7.0.4" - checksum: 87585e258b9488caf2e7acea242fd7856bbe9a2c84a7807643513a338d66f368c7d518200ad7b70a508664d408aa000517647b2930c259a8b1f9f0984f344a21 - languageName: node - linkType: hard - "minipass@npm:^7.1.2": version: 7.1.2 resolution: "minipass@npm:7.1.2" @@ -15563,16 +15512,6 @@ __metadata: languageName: node linkType: hard -"path-scurry@npm:^1.11.0": - version: 1.11.1 - resolution: "path-scurry@npm:1.11.1" - dependencies: - lru-cache: ^10.2.0 - minipass: ^5.0.0 || ^6.0.2 || ^7.0.0 - checksum: 890d5abcd593a7912dcce7cf7c6bf7a0b5648e3dee6caf0712c126ca0a65c7f3d7b9d769072a4d1baf370f61ce493ab5b038d59988688e0c5f3f646ee3c69023 - languageName: node - linkType: hard - "path-scurry@npm:^2.0.0": version: 2.0.0 resolution: "path-scurry@npm:2.0.0" @@ -17101,17 +17040,6 @@ __metadata: languageName: node linkType: hard -"rimraf@npm:*": - version: 5.0.7 - resolution: "rimraf@npm:5.0.7" - dependencies: - glob: ^10.3.7 - bin: - rimraf: dist/esm/bin.mjs - checksum: 884852abf8aefd4667448d87bdab04120a8641266c828cf382ac811713547eda18f81799d2146ffec3178f357d83d44ec01c10095949c82e23551660732bf14f - languageName: node - linkType: hard - "rimraf@npm:6.0.1": version: 6.0.1 resolution: "rimraf@npm:6.0.1" @@ -17164,7 +17092,6 @@ __metadata: "@types/babel__core": ^7 "@types/jest": ^29.2.0 "@types/node": ^22.0.0 - "@types/rimraf": 4.0.5 "@typescript-eslint/eslint-plugin": 7.17.0 "@typescript-eslint/parser": 7.17.0 "@wireapp/eslint-config": "workspace:^"