From 0b193f466562304d7f9976aec1970d42cf2abb08 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Date: Thu, 13 Jul 2023 18:11:57 +0100 Subject: [PATCH] matrix-sdk-crypto-js -> matrix-sdk-crypto-wasm (#3602) We've renamed matrix-sdk-crypto-js and released a v1.0. --- package.json | 2 +- spec/integ/crypto/verification.spec.ts | 2 +- spec/unit/rust-crypto/CrossSigningIdentity.spec.ts | 2 +- spec/unit/rust-crypto/KeyClaimManager.spec.ts | 4 ++-- spec/unit/rust-crypto/OutgoingRequestProcessor.spec.ts | 4 ++-- spec/unit/rust-crypto/rust-crypto.spec.ts | 4 ++-- spec/unit/rust-crypto/verification.spec.ts | 2 +- src/rust-crypto/CrossSigningIdentity.ts | 2 +- src/rust-crypto/KeyClaimManager.ts | 2 +- src/rust-crypto/OutgoingRequestProcessor.ts | 2 +- src/rust-crypto/RoomEncryptor.ts | 2 +- src/rust-crypto/device-converter.ts | 2 +- src/rust-crypto/index.ts | 4 ++-- src/rust-crypto/rust-crypto.ts | 2 +- src/rust-crypto/verification.ts | 4 ++-- yarn.lock | 8 ++++---- 16 files changed, 24 insertions(+), 24 deletions(-) diff --git a/package.json b/package.json index 62e2b4efbd4..f32a3cad5a2 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ ], "dependencies": { "@babel/runtime": "^7.12.5", - "@matrix-org/matrix-sdk-crypto-js": "^0.1.4", + "@matrix-org/matrix-sdk-crypto-wasm": "^1.0.1", "another-json": "^0.2.0", "bs58": "^5.0.0", "content-type": "^1.0.4", diff --git a/spec/integ/crypto/verification.spec.ts b/spec/integ/crypto/verification.spec.ts index 56acc6d5c39..a245b56e25d 100644 --- a/spec/integ/crypto/verification.spec.ts +++ b/spec/integ/crypto/verification.spec.ts @@ -59,7 +59,7 @@ beforeAll(async () => { // load the rust library. This can take a few seconds on a slow GH worker. beforeAll(async () => { - const RustSdkCryptoJs = await require("@matrix-org/matrix-sdk-crypto-js"); + const RustSdkCryptoJs = await require("@matrix-org/matrix-sdk-crypto-wasm"); await RustSdkCryptoJs.initAsync(); }, 10000); diff --git a/spec/unit/rust-crypto/CrossSigningIdentity.spec.ts b/spec/unit/rust-crypto/CrossSigningIdentity.spec.ts index d0fb8bd36be..6187ec7ede3 100644 --- a/spec/unit/rust-crypto/CrossSigningIdentity.spec.ts +++ b/spec/unit/rust-crypto/CrossSigningIdentity.spec.ts @@ -15,7 +15,7 @@ limitations under the License. */ import { Mocked } from "jest-mock"; -import * as RustSdkCryptoJs from "@matrix-org/matrix-sdk-crypto-js"; +import * as RustSdkCryptoJs from "@matrix-org/matrix-sdk-crypto-wasm"; import { CrossSigningIdentity } from "../../../src/rust-crypto/CrossSigningIdentity"; import { OutgoingRequestProcessor } from "../../../src/rust-crypto/OutgoingRequestProcessor"; diff --git a/spec/unit/rust-crypto/KeyClaimManager.spec.ts b/spec/unit/rust-crypto/KeyClaimManager.spec.ts index e448feabeca..64a228d7f9a 100644 --- a/spec/unit/rust-crypto/KeyClaimManager.spec.ts +++ b/spec/unit/rust-crypto/KeyClaimManager.spec.ts @@ -14,10 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -import * as RustSdkCryptoJs from "@matrix-org/matrix-sdk-crypto-js"; +import * as RustSdkCryptoJs from "@matrix-org/matrix-sdk-crypto-wasm"; import fetchMock from "fetch-mock-jest"; import { Mocked } from "jest-mock"; -import { KeysClaimRequest, UserId } from "@matrix-org/matrix-sdk-crypto-js"; +import { KeysClaimRequest, UserId } from "@matrix-org/matrix-sdk-crypto-wasm"; import { OutgoingRequestProcessor } from "../../../src/rust-crypto/OutgoingRequestProcessor"; import { KeyClaimManager } from "../../../src/rust-crypto/KeyClaimManager"; diff --git a/spec/unit/rust-crypto/OutgoingRequestProcessor.spec.ts b/spec/unit/rust-crypto/OutgoingRequestProcessor.spec.ts index bb1cdff6ab1..94ce93b7ef1 100644 --- a/spec/unit/rust-crypto/OutgoingRequestProcessor.spec.ts +++ b/spec/unit/rust-crypto/OutgoingRequestProcessor.spec.ts @@ -16,7 +16,7 @@ limitations under the License. import MockHttpBackend from "matrix-mock-request"; import { Mocked } from "jest-mock"; -import * as RustSdkCryptoJs from "@matrix-org/matrix-sdk-crypto-js"; +import * as RustSdkCryptoJs from "@matrix-org/matrix-sdk-crypto-wasm"; import { KeysBackupRequest, KeysClaimRequest, @@ -26,7 +26,7 @@ import { SignatureUploadRequest, SigningKeysUploadRequest, ToDeviceRequest, -} from "@matrix-org/matrix-sdk-crypto-js"; +} from "@matrix-org/matrix-sdk-crypto-wasm"; import { TypedEventEmitter } from "../../../src/models/typed-event-emitter"; import { HttpApiEvent, HttpApiEventHandlerMap, MatrixHttpApi, UIAuthCallback } from "../../../src"; diff --git a/spec/unit/rust-crypto/rust-crypto.spec.ts b/spec/unit/rust-crypto/rust-crypto.spec.ts index 61b04e38867..74b55ff7396 100644 --- a/spec/unit/rust-crypto/rust-crypto.spec.ts +++ b/spec/unit/rust-crypto/rust-crypto.spec.ts @@ -14,8 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -import * as RustSdkCryptoJs from "@matrix-org/matrix-sdk-crypto-js"; -import { KeysQueryRequest, OlmMachine } from "@matrix-org/matrix-sdk-crypto-js"; +import * as RustSdkCryptoJs from "@matrix-org/matrix-sdk-crypto-wasm"; +import { KeysQueryRequest, OlmMachine } from "@matrix-org/matrix-sdk-crypto-wasm"; import { Mocked } from "jest-mock"; import fetchMock from "fetch-mock-jest"; diff --git a/spec/unit/rust-crypto/verification.spec.ts b/spec/unit/rust-crypto/verification.spec.ts index a2f671fdb0b..a22ee8fd662 100644 --- a/spec/unit/rust-crypto/verification.spec.ts +++ b/spec/unit/rust-crypto/verification.spec.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import * as RustSdkCryptoJs from "@matrix-org/matrix-sdk-crypto-js"; +import * as RustSdkCryptoJs from "@matrix-org/matrix-sdk-crypto-wasm"; import { Mocked } from "jest-mock"; import { RustVerificationRequest } from "../../../src/rust-crypto/verification"; diff --git a/src/rust-crypto/CrossSigningIdentity.ts b/src/rust-crypto/CrossSigningIdentity.ts index 5203bd87731..2c43ed60397 100644 --- a/src/rust-crypto/CrossSigningIdentity.ts +++ b/src/rust-crypto/CrossSigningIdentity.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { OlmMachine, CrossSigningStatus } from "@matrix-org/matrix-sdk-crypto-js"; +import { OlmMachine, CrossSigningStatus } from "@matrix-org/matrix-sdk-crypto-wasm"; import { BootstrapCrossSigningOpts } from "../crypto-api"; import { logger } from "../logger"; diff --git a/src/rust-crypto/KeyClaimManager.ts b/src/rust-crypto/KeyClaimManager.ts index 4b13ef432cf..ff7f3956536 100644 --- a/src/rust-crypto/KeyClaimManager.ts +++ b/src/rust-crypto/KeyClaimManager.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { OlmMachine, UserId } from "@matrix-org/matrix-sdk-crypto-js"; +import { OlmMachine, UserId } from "@matrix-org/matrix-sdk-crypto-wasm"; import { OutgoingRequestProcessor } from "./OutgoingRequestProcessor"; diff --git a/src/rust-crypto/OutgoingRequestProcessor.ts b/src/rust-crypto/OutgoingRequestProcessor.ts index 213f8dd8400..c67bcd7c298 100644 --- a/src/rust-crypto/OutgoingRequestProcessor.ts +++ b/src/rust-crypto/OutgoingRequestProcessor.ts @@ -24,7 +24,7 @@ import { SignatureUploadRequest, ToDeviceRequest, SigningKeysUploadRequest, -} from "@matrix-org/matrix-sdk-crypto-js"; +} from "@matrix-org/matrix-sdk-crypto-wasm"; import { logger } from "../logger"; import { IHttpOpts, MatrixHttpApi, Method } from "../http-api"; diff --git a/src/rust-crypto/RoomEncryptor.ts b/src/rust-crypto/RoomEncryptor.ts index 0b51663c2bd..3863c859272 100644 --- a/src/rust-crypto/RoomEncryptor.ts +++ b/src/rust-crypto/RoomEncryptor.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { EncryptionSettings, OlmMachine, RoomId, UserId } from "@matrix-org/matrix-sdk-crypto-js"; +import { EncryptionSettings, OlmMachine, RoomId, UserId } from "@matrix-org/matrix-sdk-crypto-wasm"; import { EventType } from "../@types/event"; import { IContent, MatrixEvent } from "../models/event"; diff --git a/src/rust-crypto/device-converter.ts b/src/rust-crypto/device-converter.ts index 56945be830a..b37a63dcca0 100644 --- a/src/rust-crypto/device-converter.ts +++ b/src/rust-crypto/device-converter.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import * as RustSdkCryptoJs from "@matrix-org/matrix-sdk-crypto-js"; +import * as RustSdkCryptoJs from "@matrix-org/matrix-sdk-crypto-wasm"; import { Device, DeviceVerification } from "../models/device"; import { DeviceKeys } from "../client"; diff --git a/src/rust-crypto/index.ts b/src/rust-crypto/index.ts index b606cb6da55..9d8fe8d53cc 100644 --- a/src/rust-crypto/index.ts +++ b/src/rust-crypto/index.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import * as RustSdkCryptoJs from "@matrix-org/matrix-sdk-crypto-js"; +import * as RustSdkCryptoJs from "@matrix-org/matrix-sdk-crypto-wasm"; import { RustCrypto } from "./rust-crypto"; import { logger } from "../logger"; @@ -44,7 +44,7 @@ export async function initRustCrypto( cryptoCallbacks: ICryptoCallbacks, storePrefix: string | null, ): Promise { - // initialise the rust matrix-sdk-crypto-js, if it hasn't already been done + // initialise the rust matrix-sdk-crypto-wasm, if it hasn't already been done await RustSdkCryptoJs.initAsync(); // enable tracing in the rust-sdk diff --git a/src/rust-crypto/rust-crypto.ts b/src/rust-crypto/rust-crypto.ts index d7248137c7b..7fa1d62215a 100644 --- a/src/rust-crypto/rust-crypto.ts +++ b/src/rust-crypto/rust-crypto.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import * as RustSdkCryptoJs from "@matrix-org/matrix-sdk-crypto-js"; +import * as RustSdkCryptoJs from "@matrix-org/matrix-sdk-crypto-wasm"; import type { IEventDecryptionResult, IMegolmSessionData } from "../@types/crypto"; import type { IDeviceLists, IToDeviceEvent } from "../sync-accumulator"; diff --git a/src/rust-crypto/verification.ts b/src/rust-crypto/verification.ts index 85ba876d22b..252189fca91 100644 --- a/src/rust-crypto/verification.ts +++ b/src/rust-crypto/verification.ts @@ -14,8 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -import * as RustSdkCryptoJs from "@matrix-org/matrix-sdk-crypto-js"; -import { Emoji, QrState } from "@matrix-org/matrix-sdk-crypto-js"; +import * as RustSdkCryptoJs from "@matrix-org/matrix-sdk-crypto-wasm"; +import { Emoji, QrState } from "@matrix-org/matrix-sdk-crypto-wasm"; import { ShowQrCodeCallbacks, diff --git a/yarn.lock b/yarn.lock index 49caa8cef22..ffa40e4ae34 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1530,10 +1530,10 @@ dependencies: lodash "^4.17.21" -"@matrix-org/matrix-sdk-crypto-js@^0.1.4": - version "0.1.4" - resolved "https://registry.yarnpkg.com/@matrix-org/matrix-sdk-crypto-js/-/matrix-sdk-crypto-js-0.1.4.tgz#c13c7c8c3a1d8da08e6ad195d25e5e61cc402df7" - integrity sha512-OxG84iSeR89zYLFeb+DCaFtZT+DDiIu+kTkqY8OYfhE5vpGLFX2sDVBRrAdos1IUqEoboDloDBR9+yU7hNRyog== +"@matrix-org/matrix-sdk-crypto-wasm@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@matrix-org/matrix-sdk-crypto-wasm/-/matrix-sdk-crypto-wasm-1.0.1.tgz#21a0557a7bb3f60b37c6d412be8906c056fe79b8" + integrity sha512-VTwV5IowvhhLXwAsDDAv02bC5/qBQbG2YtpYAije11253sQ3MePIoSR+dS40Ih3lAlEzqQ00GU3O+i45jMzIRQ== "@matrix-org/olm@https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.14.tgz": version "3.2.14"