diff --git a/package.json b/package.json index 028c796ce3..84064fa7b9 100644 --- a/package.json +++ b/package.json @@ -121,7 +121,7 @@ "@signalapp/libsignal-client": "0.68.0", "@signalapp/quill-cjs": "2.1.2", "@signalapp/ringrtc": "2.50.4", - "@signalapp/sqlcipher": "1.0.0", + "@signalapp/sqlcipher": "2.0.0", "@tanstack/react-virtual": "3.11.2", "@types/fabric": "4.5.3", "backbone": "1.6.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f8a7c9a2ac..aae13042d9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -137,8 +137,8 @@ importers: specifier: 2.50.4 version: 2.50.4 '@signalapp/sqlcipher': - specifier: 1.0.0 - version: 1.0.0 + specifier: 2.0.0 + version: 2.0.0 '@tanstack/react-virtual': specifier: 3.11.2 version: 3.11.2(react-dom@17.0.2(react@17.0.2))(react@17.0.2) @@ -2550,8 +2550,8 @@ packages: '@signalapp/ringrtc@2.50.4': resolution: {integrity: sha512-eNBmIunBavRO/xLk/IsOVYKTXUlgq0ikoDedxkzSf2pBHPy0DG+dFxWqAfYmp2H+U7dXL3IDTAiI+W2MC5MTtg==} - '@signalapp/sqlcipher@1.0.0': - resolution: {integrity: sha512-3+4Y/0Tf0gis8gaZrD58cnzVVRzeDtBCPhS3gUdvxgkEXMv4guSJ+MDfHZLQKmqvuPmjTlt+YOsTjvLCWruFaQ==} + '@signalapp/sqlcipher@2.0.0': + resolution: {integrity: sha512-1VglhOpAsAHvTFoqB1gkwbnWwU0h37flLhRHcKKYyfEbRVc+3TDRBJ54Fm8WEELnmZPju1HVGM4tnyKgq7eI+A==} '@sinclair/typebox@0.27.8': resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} @@ -12287,7 +12287,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@signalapp/sqlcipher@1.0.0': + '@signalapp/sqlcipher@2.0.0': dependencies: node-addon-api: 8.3.0 node-gyp-build: 4.8.4 diff --git a/ts/sql/Server.ts b/ts/sql/Server.ts index e2de70d284..0971be3940 100644 --- a/ts/sql/Server.ts +++ b/ts/sql/Server.ts @@ -751,6 +751,8 @@ function openAndSetUpSQLCipher(filePath: string, { key }: { key: string }) { ); } + db.initTokenizer(); + return db; } diff --git a/ts/test-electron/sql/utils_test.ts b/ts/test-electron/sql/utils_test.ts index 0a99dd3faf..5f010f33eb 100644 --- a/ts/test-electron/sql/utils_test.ts +++ b/ts/test-electron/sql/utils_test.ts @@ -11,6 +11,7 @@ describe('sql/utils/sql', () => { beforeEach(() => { db = new SQL(':memory:'); + db.initTokenizer(); }); afterEach(() => { diff --git a/ts/test-node/sql/helpers.ts b/ts/test-node/sql/helpers.ts index 4822748c77..373d21bb0b 100644 --- a/ts/test-node/sql/helpers.ts +++ b/ts/test-node/sql/helpers.ts @@ -10,7 +10,9 @@ import { SCHEMA_VERSIONS } from '../../sql/migrations'; import { consoleLogger } from '../../util/consoleLogger'; export function createDB(): WritableDB { - return new SQL(':memory:') as WritableDB; + const db = new SQL(':memory:') as WritableDB; + db.initTokenizer(); + return db; } export function updateToVersion(db: WritableDB, version: number): void {