mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
Fix kysely dependency version mismatch
This commit is contained in:
parent
d73370cc68
commit
49bf38d27b
4 changed files with 4 additions and 6 deletions
5
deno.lock
generated
5
deno.lock
generated
|
|
@ -50,9 +50,8 @@
|
||||||
"npm:iso-639-1@2.1.15": "npm:iso-639-1@2.1.15",
|
"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: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-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.4",
|
||||||
"npm:kysely@^0.27.2": "npm:kysely@0.27.3",
|
"npm:kysely@^0.27.3": "npm:kysely@0.27.4",
|
||||||
"npm:kysely@^0.27.3": "npm:kysely@0.27.3",
|
|
||||||
"npm:kysely@^0.27.4": "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: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",
|
"npm:linkify-plugin-hashtag@^4.1.1": "npm:linkify-plugin-hashtag@4.1.3_linkifyjs@4.1.3",
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ export class DittoSQLite {
|
||||||
await sqliteWorker.open(this.path);
|
await sqliteWorker.open(this.path);
|
||||||
|
|
||||||
this.db = new Kysely<DittoTables>({
|
this.db = new Kysely<DittoTables>({
|
||||||
// @ts-ignore Kysely version mismatch.
|
|
||||||
dialect: new PolySqliteDialect({
|
dialect: new PolySqliteDialect({
|
||||||
database: sqliteWorker,
|
database: sqliteWorker,
|
||||||
}),
|
}),
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,6 @@ class EventsDB implements NStore {
|
||||||
};
|
};
|
||||||
|
|
||||||
constructor(private kysely: Kysely<DittoTables>) {
|
constructor(private kysely: Kysely<DittoTables>) {
|
||||||
// @ts-ignore Kysely version mismatch.
|
|
||||||
this.store = new NDatabase(kysely, {
|
this.store = new NDatabase(kysely, {
|
||||||
fts: Conf.db.dialect,
|
fts: Conf.db.dialect,
|
||||||
timeoutStrategy: Conf.db.dialect === 'postgres' ? 'setStatementTimeout' : undefined,
|
timeoutStrategy: Conf.db.dialect === 'postgres' ? 'setStatementTimeout' : undefined,
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@ import { DenoSqlite3Dialect } from '@soapbox/kysely-deno-sqlite';
|
||||||
import { finalizeEvent, generateSecretKey } from 'nostr-tools';
|
import { finalizeEvent, generateSecretKey } from 'nostr-tools';
|
||||||
import { NDatabase, NostrEvent } from '@nostrify/nostrify';
|
import { NDatabase, NostrEvent } from '@nostrify/nostrify';
|
||||||
import { FileMigrationProvider, Kysely, Migrator } from 'kysely';
|
import { FileMigrationProvider, Kysely, Migrator } from 'kysely';
|
||||||
import postgres from 'postgres';
|
|
||||||
import { PostgresJSDialect, PostgresJSDialectConfig } from 'kysely-postgres-js';
|
import { PostgresJSDialect, PostgresJSDialectConfig } from 'kysely-postgres-js';
|
||||||
|
import postgres from 'postgres';
|
||||||
|
|
||||||
import { DittoDB } from '@/db/DittoDB.ts';
|
import { DittoDB } from '@/db/DittoDB.ts';
|
||||||
import { DittoTables } from '@/db/DittoTables.ts';
|
import { DittoTables } from '@/db/DittoTables.ts';
|
||||||
|
|
@ -113,6 +113,7 @@ export const createTestDB = async (databaseUrl?: string) => {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
kysely = new Kysely({
|
kysely = new Kysely({
|
||||||
|
// @ts-ignore Kysely version mismatch.
|
||||||
dialect: new PostgresJSDialect({
|
dialect: new PostgresJSDialect({
|
||||||
postgres: postgres(Conf.databaseUrl, {
|
postgres: postgres(Conf.databaseUrl, {
|
||||||
max: Conf.pg.poolSize,
|
max: Conf.pg.poolSize,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue