Fix kysely dependency version mismatch

This commit is contained in:
Alex Gleason 2024-07-31 14:59:42 -05:00
parent d73370cc68
commit 49bf38d27b
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
4 changed files with 4 additions and 6 deletions

5
deno.lock generated
View file

@ -50,9 +50,8 @@
"npm:iso-639-1@2.1.15": "npm:iso-639-1@2.1.15",
"npm:isomorphic-dompurify@^2.11.0": "npm:isomorphic-dompurify@2.11.0",
"npm:kysely-postgres-js@2.0.0": "npm:kysely-postgres-js@2.0.0_kysely@0.27.3_postgres@3.4.4",
"npm:kysely@0.27.3": "npm:kysely@0.27.3",
"npm:kysely@^0.27.2": "npm:kysely@0.27.3",
"npm:kysely@^0.27.3": "npm:kysely@0.27.3",
"npm:kysely@^0.27.2": "npm:kysely@0.27.4",
"npm:kysely@^0.27.3": "npm:kysely@0.27.4",
"npm:kysely@^0.27.4": "npm:kysely@0.27.4",
"npm:light-bolt11-decoder": "npm:light-bolt11-decoder@3.1.1",
"npm:linkify-plugin-hashtag@^4.1.1": "npm:linkify-plugin-hashtag@4.1.3_linkifyjs@4.1.3",

View file

@ -15,7 +15,6 @@ export class DittoSQLite {
await sqliteWorker.open(this.path);
this.db = new Kysely<DittoTables>({
// @ts-ignore Kysely version mismatch.
dialect: new PolySqliteDialect({
database: sqliteWorker,
}),

View file

@ -43,7 +43,6 @@ class EventsDB implements NStore {
};
constructor(private kysely: Kysely<DittoTables>) {
// @ts-ignore Kysely version mismatch.
this.store = new NDatabase(kysely, {
fts: Conf.db.dialect,
timeoutStrategy: Conf.db.dialect === 'postgres' ? 'setStatementTimeout' : undefined,

View file

@ -6,8 +6,8 @@ import { DenoSqlite3Dialect } from '@soapbox/kysely-deno-sqlite';
import { finalizeEvent, generateSecretKey } from 'nostr-tools';
import { NDatabase, NostrEvent } from '@nostrify/nostrify';
import { FileMigrationProvider, Kysely, Migrator } from 'kysely';
import postgres from 'postgres';
import { PostgresJSDialect, PostgresJSDialectConfig } from 'kysely-postgres-js';
import postgres from 'postgres';
import { DittoDB } from '@/db/DittoDB.ts';
import { DittoTables } from '@/db/DittoTables.ts';
@ -113,6 +113,7 @@ export const createTestDB = async (databaseUrl?: string) => {
});
} else {
kysely = new Kysely({
// @ts-ignore Kysely version mismatch.
dialect: new PostgresJSDialect({
postgres: postgres(Conf.databaseUrl, {
max: Conf.pg.poolSize,