From 01eb3b73b44e5fcb3337a35b7a948c3e50f23fc7 Mon Sep 17 00:00:00 2001 From: Jim Gustafson Date: Mon, 9 Jan 2023 10:38:57 -0800 Subject: [PATCH] Update to RingRTC v2.23.0 --- package.json | 7 ++++--- scripts/esbuild.js | 2 +- scripts/generate-acknowledgments.js | 2 +- ts/calling/findBestMatchingDevice.ts | 2 +- ts/components/CallManager.tsx | 2 +- ts/components/CallScreen.tsx | 2 +- ts/components/CallingDeviceSelection.tsx | 2 +- ts/components/CallingPip.tsx | 2 +- ts/components/CallingPipRemoteVideo.tsx | 2 +- ts/components/GroupCallOverflowArea.tsx | 2 +- ts/components/GroupCallRemoteParticipant.tsx | 2 +- ts/components/GroupCallRemoteParticipants.tsx | 2 +- ts/components/Preferences.tsx | 2 +- ts/services/calling.ts | 4 ++-- ts/state/ducks/calling.ts | 2 +- .../helpers/fakeGetGroupCallVideoFrameSource.ts | 2 +- ts/test-node/util/callingMessageToProto_test.ts | 2 +- ts/types/Calling.ts | 2 +- ts/types/Storage.d.ts | 2 +- ts/util/callingMessageToProto.ts | 4 ++-- ts/util/createIPCEvents.ts | 2 +- yarn.lock | 11 +++++++---- 22 files changed, 33 insertions(+), 29 deletions(-) diff --git a/package.json b/package.json index 5757495cc4c..41e49d91753 100644 --- a/package.json +++ b/package.json @@ -90,6 +90,7 @@ "@react-spring/web": "9.5.5", "@signalapp/better-sqlite3": "8.0.4", "@signalapp/libsignal-client": "0.21.1", + "@signalapp/ringrtc": "=2.23.0", "@sindresorhus/is": "0.8.0", "@types/fabric": "4.5.3", "array-move": "2.1.0", @@ -169,7 +170,6 @@ "redux-ts-utils": "3.2.2", "reselect": "4.1.2", "rimraf": "2.6.2", - "ringrtc": "https://github.com/signalapp/signal-ringrtc-node.git#9a9d9fbc1ca43e7a0707a960ce9642dbf82dc64a", "sanitize.css": "11.0.0", "semver": "5.4.1", "split2": "4.0.0", @@ -334,7 +334,7 @@ } ], "mergeASARs": true, - "singleArchFiles": "node_modules/{@signalapp/libsignal-client/prebuilds/**,ringrtc/build/**}", + "singleArchFiles": "node_modules/@signalapp/{libsignal-client/prebuilds/**,ringrtc/build/**}", "target": [ { "target": "zip", @@ -482,7 +482,8 @@ "!node_modules/@signalapp/better-sqlite3/src/*", "node_modules/@signalapp/better-sqlite3/build/Release/better_sqlite3.node", "node_modules/@signalapp/libsignal-client/prebuilds/${platform}-${arch}/*.node", - "node_modules/ringrtc/build/${platform}/*${arch}*.node", + "!node_modules/@signalapp/ringrtc/scripts/*", + "node_modules/@signalapp/ringrtc/build/${platform}/*${arch}*.node", "node_modules/mac-screen-capture-permissions/build/Release/*.node", "!**/node_modules/react-dom/*/*.development.js", "!node_modules/mp4box/**", diff --git a/scripts/esbuild.js b/scripts/esbuild.js index 3dd2287fa9c..f4d285f46f8 100644 --- a/scripts/esbuild.js +++ b/scripts/esbuild.js @@ -31,12 +31,12 @@ const bundleDefaults = { // Native libraries '@signalapp/libsignal-client', '@signalapp/libsignal-client/zkgroup', + '@signalapp/ringrtc', '@signalapp/better-sqlite3', 'electron', 'fs-xattr', 'fsevents', 'mac-screen-capture-permissions', - 'ringrtc', 'sass', 'bufferutil', 'utf-8-validate', diff --git a/scripts/generate-acknowledgments.js b/scripts/generate-acknowledgments.js index db64727f279..b75db638d66 100644 --- a/scripts/generate-acknowledgments.js +++ b/scripts/generate-acknowledgments.js @@ -13,8 +13,8 @@ const { } = require('../package.json'); const SKIPPED_DEPENDENCIES = new Set([ - 'ringrtc', '@signalapp/libsignal-client', + '@signalapp/ringrtc', ]); const rootDir = join(__dirname, '..'); diff --git a/ts/calling/findBestMatchingDevice.ts b/ts/calling/findBestMatchingDevice.ts index 16df0709931..55821198fb4 100644 --- a/ts/calling/findBestMatchingDevice.ts +++ b/ts/calling/findBestMatchingDevice.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { AudioDevice } from 'ringrtc'; +import type { AudioDevice } from '@signalapp/ringrtc'; import { AudioDeviceModule } from './audioDeviceModule'; export function findBestMatchingAudioDeviceIndex({ diff --git a/ts/components/CallManager.tsx b/ts/components/CallManager.tsx index 6ad08223f67..cfe414167bd 100644 --- a/ts/components/CallManager.tsx +++ b/ts/components/CallManager.tsx @@ -3,7 +3,7 @@ import React, { useCallback, useEffect } from 'react'; import { noop } from 'lodash'; -import type { VideoFrameSource } from 'ringrtc'; +import type { VideoFrameSource } from '@signalapp/ringrtc'; import { CallNeedPermissionScreen } from './CallNeedPermissionScreen'; import { CallScreen } from './CallScreen'; import { CallingLobby } from './CallingLobby'; diff --git a/ts/components/CallScreen.tsx b/ts/components/CallScreen.tsx index f14bd2a5785..25f056b1016 100644 --- a/ts/components/CallScreen.tsx +++ b/ts/components/CallScreen.tsx @@ -5,7 +5,7 @@ import type { ReactNode } from 'react'; import React, { useState, useRef, useEffect, useCallback } from 'react'; import { noop } from 'lodash'; import classNames from 'classnames'; -import type { VideoFrameSource } from 'ringrtc'; +import type { VideoFrameSource } from '@signalapp/ringrtc'; import type { ActiveCallStateType, SetLocalAudioType, diff --git a/ts/components/CallingDeviceSelection.tsx b/ts/components/CallingDeviceSelection.tsx index 4f137d2ba7a..25340c2ed62 100644 --- a/ts/components/CallingDeviceSelection.tsx +++ b/ts/components/CallingDeviceSelection.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import * as React from 'react'; -import type { AudioDevice } from 'ringrtc'; +import type { AudioDevice } from '@signalapp/ringrtc'; import { Modal } from './Modal'; import type { LocalizerType } from '../types/Util'; diff --git a/ts/components/CallingPip.tsx b/ts/components/CallingPip.tsx index f00b842d329..9b661cfd70c 100644 --- a/ts/components/CallingPip.tsx +++ b/ts/components/CallingPip.tsx @@ -3,7 +3,7 @@ import React from 'react'; import { minBy, debounce, noop } from 'lodash'; -import type { VideoFrameSource } from 'ringrtc'; +import type { VideoFrameSource } from '@signalapp/ringrtc'; import { CallingPipRemoteVideo } from './CallingPipRemoteVideo'; import type { LocalizerType } from '../types/Util'; import type { ActiveCallType, GroupCallVideoRequest } from '../types/Calling'; diff --git a/ts/components/CallingPipRemoteVideo.tsx b/ts/components/CallingPipRemoteVideo.tsx index be89a5e6d9a..44c5a556424 100644 --- a/ts/components/CallingPipRemoteVideo.tsx +++ b/ts/components/CallingPipRemoteVideo.tsx @@ -3,7 +3,7 @@ import React, { useMemo, useEffect } from 'react'; import { clamp, maxBy } from 'lodash'; -import type { VideoFrameSource } from 'ringrtc'; +import type { VideoFrameSource } from '@signalapp/ringrtc'; import { Avatar, AvatarSize } from './Avatar'; import { CallBackgroundBlur } from './CallBackgroundBlur'; import { DirectCallRemoteParticipant } from './DirectCallRemoteParticipant'; diff --git a/ts/components/GroupCallOverflowArea.tsx b/ts/components/GroupCallOverflowArea.tsx index 73be6fe8034..85d61fffb35 100644 --- a/ts/components/GroupCallOverflowArea.tsx +++ b/ts/components/GroupCallOverflowArea.tsx @@ -4,7 +4,7 @@ import type { ReactElement } from 'react'; import React, { useRef, useState, useEffect } from 'react'; import classNames from 'classnames'; -import type { VideoFrameSource } from 'ringrtc'; +import type { VideoFrameSource } from '@signalapp/ringrtc'; import type { LocalizerType } from '../types/Util'; import type { GroupCallRemoteParticipantType } from '../types/Calling'; import { GroupCallRemoteParticipant } from './GroupCallRemoteParticipant'; diff --git a/ts/components/GroupCallRemoteParticipant.tsx b/ts/components/GroupCallRemoteParticipant.tsx index e2ea2de87f0..e7f1ab00e0c 100644 --- a/ts/components/GroupCallRemoteParticipant.tsx +++ b/ts/components/GroupCallRemoteParticipant.tsx @@ -11,7 +11,7 @@ import React, { } from 'react'; import classNames from 'classnames'; import { noop } from 'lodash'; -import type { VideoFrameSource } from 'ringrtc'; +import type { VideoFrameSource } from '@signalapp/ringrtc'; import type { GroupCallRemoteParticipantType } from '../types/Calling'; import type { LocalizerType } from '../types/Util'; import { AvatarColors } from '../types/Colors'; diff --git a/ts/components/GroupCallRemoteParticipants.tsx b/ts/components/GroupCallRemoteParticipants.tsx index e9d9a1ed9a8..49344603fa7 100644 --- a/ts/components/GroupCallRemoteParticipants.tsx +++ b/ts/components/GroupCallRemoteParticipants.tsx @@ -4,7 +4,7 @@ import React, { useCallback, useState, useMemo, useEffect } from 'react'; import Measure from 'react-measure'; import { takeWhile, clamp, chunk, maxBy, flatten, noop } from 'lodash'; -import type { VideoFrameSource } from 'ringrtc'; +import type { VideoFrameSource } from '@signalapp/ringrtc'; import { GroupCallRemoteParticipant } from './GroupCallRemoteParticipant'; import { GroupCallOverflowArea, diff --git a/ts/components/Preferences.tsx b/ts/components/Preferences.tsx index 9fae24ded18..36dc7b02df1 100644 --- a/ts/components/Preferences.tsx +++ b/ts/components/Preferences.tsx @@ -5,7 +5,7 @@ import type { ReactNode } from 'react'; import React, { useEffect, useState, useCallback } from 'react'; import { noop } from 'lodash'; import classNames from 'classnames'; -import type { AudioDevice } from 'ringrtc'; +import type { AudioDevice } from '@signalapp/ringrtc'; import type { MediaDeviceSettings } from '../types/Calling'; import type { diff --git a/ts/services/calling.ts b/ts/services/calling.ts index 49721f7261b..fb42e814cd2 100644 --- a/ts/services/calling.ts +++ b/ts/services/calling.ts @@ -13,7 +13,7 @@ import type { UserId, VideoFrameSource, VideoRequest, -} from 'ringrtc'; +} from '@signalapp/ringrtc'; import { Call, CallEndedReason, @@ -34,7 +34,7 @@ import { RingRTC, RingUpdate, BandwidthMode, -} from 'ringrtc'; +} from '@signalapp/ringrtc'; import { uniqBy, noop } from 'lodash'; import type { diff --git a/ts/state/ducks/calling.ts b/ts/state/ducks/calling.ts index 04d4a5da9cb..e58842b614e 100644 --- a/ts/state/ducks/calling.ts +++ b/ts/state/ducks/calling.ts @@ -3,7 +3,7 @@ import { ipcRenderer } from 'electron'; import type { ThunkAction, ThunkDispatch } from 'redux-thunk'; -import { CallEndedReason } from 'ringrtc'; +import { CallEndedReason } from '@signalapp/ringrtc'; import { hasScreenCapturePermission, openSystemPreferences, diff --git a/ts/test-both/helpers/fakeGetGroupCallVideoFrameSource.ts b/ts/test-both/helpers/fakeGetGroupCallVideoFrameSource.ts index af7468a9b42..f54d316e5c2 100644 --- a/ts/test-both/helpers/fakeGetGroupCallVideoFrameSource.ts +++ b/ts/test-both/helpers/fakeGetGroupCallVideoFrameSource.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { VideoFrameSource } from 'ringrtc'; +import type { VideoFrameSource } from '@signalapp/ringrtc'; const COLORS: Array<[number, number, number]> = [ [0xff, 0x00, 0x00], diff --git a/ts/test-node/util/callingMessageToProto_test.ts b/ts/test-node/util/callingMessageToProto_test.ts index 48949378d1c..ccd05fd7285 100644 --- a/ts/test-node/util/callingMessageToProto_test.ts +++ b/ts/test-node/util/callingMessageToProto_test.ts @@ -8,7 +8,7 @@ import { HangupMessage, HangupType, OpaqueMessage, -} from 'ringrtc'; +} from '@signalapp/ringrtc'; import { SignalService as Proto } from '../../protobuf'; import { callingMessageToProto } from '../../util/callingMessageToProto'; diff --git a/ts/types/Calling.ts b/ts/types/Calling.ts index a29daacaea9..6916355ab18 100644 --- a/ts/types/Calling.ts +++ b/ts/types/Calling.ts @@ -1,7 +1,7 @@ // Copyright 2020 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { AudioDevice } from 'ringrtc'; +import type { AudioDevice } from '@signalapp/ringrtc'; import type { ConversationType } from '../state/ducks/conversations'; // These are strings (1) for the database (2) for Storybook. diff --git a/ts/types/Storage.d.ts b/ts/types/Storage.d.ts index 2882d956978..d08619019ad 100644 --- a/ts/types/Storage.d.ts +++ b/ts/types/Storage.d.ts @@ -1,7 +1,7 @@ // Copyright 2020 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { AudioDevice } from 'ringrtc'; +import type { AudioDevice } from '@signalapp/ringrtc'; import type { CustomColorsItemType, DefaultConversationColorType, diff --git a/ts/util/callingMessageToProto.ts b/ts/util/callingMessageToProto.ts index 2735a8a0d87..66f98376fe5 100644 --- a/ts/util/callingMessageToProto.ts +++ b/ts/util/callingMessageToProto.ts @@ -1,8 +1,8 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { CallingMessage } from 'ringrtc'; -import { CallMessageUrgency } from 'ringrtc'; +import type { CallingMessage } from '@signalapp/ringrtc'; +import { CallMessageUrgency } from '@signalapp/ringrtc'; import { SignalService as Proto } from '../protobuf'; import * as log from '../logging/log'; import { missingCaseError } from './missingCaseError'; diff --git a/ts/util/createIPCEvents.ts b/ts/util/createIPCEvents.ts index bc55c853b6f..63c1328ccb4 100644 --- a/ts/util/createIPCEvents.ts +++ b/ts/util/createIPCEvents.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import { webFrame } from 'electron'; -import type { AudioDevice } from 'ringrtc'; +import type { AudioDevice } from '@signalapp/ringrtc'; import { noop } from 'lodash'; import { getStoriesAvailable } from './stories'; diff --git a/yarn.lock b/yarn.lock index f6e13b6c3c5..68ffd5110e5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2073,6 +2073,13 @@ uuid "^8.3.2" ws "^8.4.2" +"@signalapp/ringrtc@=2.23.0": + version "2.23.0" + resolved "https://registry.yarnpkg.com/@signalapp/ringrtc/-/ringrtc-2.23.0.tgz#982fb6268eab2eb35a61624149b5f9ce9af28907" + integrity sha512-3Yj+s7jXWM172rrAADg5MXKdAbS7CWa62TavCMzFy3+Q0UtlrOFfTlnzT7XW+W+0QUhVYE5juLh3GzuS3B1gzw== + dependencies: + tar "^6.1.0" + "@sindresorhus/is@0.8.0": version "0.8.0" resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.8.0.tgz#073aee40b0aab2d4ace33c0a2a2672a37da6fa12" @@ -15540,10 +15547,6 @@ rimraf@^3.0.0, rimraf@^3.0.2: dependencies: glob "^7.1.3" -"ringrtc@https://github.com/signalapp/signal-ringrtc-node.git#9a9d9fbc1ca43e7a0707a960ce9642dbf82dc64a": - version "2.22.0" - resolved "https://github.com/signalapp/signal-ringrtc-node.git#9a9d9fbc1ca43e7a0707a960ce9642dbf82dc64a" - ripemd160@^2.0.0, ripemd160@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.1.tgz#0f4584295c53a3628af7e6d79aca21ce57d1c6e7"