Skip to content

Commit

Permalink
chore(adapters): cleanup sqlite3 + better-sqlite3 for libsql (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ndom91 committed May 9, 2024
1 parent 5bd3043 commit 05a5cc7
Show file tree
Hide file tree
Showing 12 changed files with 295 additions and 147 deletions.
6 changes: 3 additions & 3 deletions apps/dev/nextjs/package.json
Expand Up @@ -14,16 +14,16 @@
"dependencies": {
"@auth/prisma-adapter": "workspace:*",
"@prisma/client": "^5",
"next": "14.2.0-canary.47",
"next": "14.2.3",
"next-auth": "workspace:*",
"nodemailer": "^6.9.3",
"react": "^18",
"react-dom": "^18"
},
"devDependencies": {
"@libsql/client": "^0.6.0",
"@types/react": "^18.2.23",
"@types/react-dom": "^18.2.8",
"prisma": "^5",
"sqlite3": "^5.0.8"
"prisma": "^5"
}
}
2 changes: 1 addition & 1 deletion packages/adapter-d1/package.json
Expand Up @@ -47,6 +47,6 @@
"devDependencies": {
"@cloudflare/workers-types": "^4.20230321.0",
"@miniflare/d1": "^2.12.2",
"better-sqlite3": "^8.6.0"
"better-sqlite3": "^9.6.0"
}
}
3 changes: 1 addition & 2 deletions packages/adapter-drizzle/package.json
Expand Up @@ -49,11 +49,10 @@
"@auth/core": "workspace:*"
},
"devDependencies": {
"@types/better-sqlite3": "^7.6.4",
"@types/uuid": "^8.3.3",
"better-sqlite3": "^9.4.0",
"drizzle-kit": "^0.20.17",
"drizzle-orm": "^0.30.9",
"libsql": "^0.3.18",
"mysql2": "^3.9.7",
"postgres": "^3.4.3",
"tsx": "^4.7.0"
Expand Down
@@ -1,6 +1,6 @@
import { AdapterAccountType } from "@auth/core/adapters"
import Database from "better-sqlite3"
import { drizzle } from "drizzle-orm/better-sqlite3"
import Database from "libsql"
import {
integer,
primaryKey,
Expand Down
2 changes: 1 addition & 1 deletion packages/adapter-drizzle/test/sqlite/schema.ts
@@ -1,5 +1,5 @@
import { drizzle } from "drizzle-orm/better-sqlite3"
import Database from "better-sqlite3"
import Database from "libsql"
import { defineTables } from "../../src/lib/sqlite.ts"

export const {
Expand Down
3 changes: 1 addition & 2 deletions packages/adapter-kysely/package.json
Expand Up @@ -40,10 +40,9 @@
"kysely": "^0.26.1"
},
"devDependencies": {
"@types/better-sqlite3": "^7.6.3",
"@types/pg": "^8.6.5",
"better-sqlite3": "^8.6.0",
"kysely": "^0.24.2",
"libsql": "^0.3.18",
"mysql2": "^3.9.7",
"pg": "^8.10.0"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/adapter-kysely/test/index.test.ts
Expand Up @@ -10,7 +10,7 @@ import {
SqliteDialect,
} from "kysely"
import { createPool } from "mysql2"
import SqliteDatabase from "better-sqlite3"
import SqliteDatabase from "libsql"
import { KyselyAdapter, KyselyAuth } from "../src"
import type { Database } from "../src"

Expand Down
10 changes: 5 additions & 5 deletions packages/adapter-typeorm/package.json
Expand Up @@ -48,21 +48,24 @@
"@auth/core": "workspace:*"
},
"devDependencies": {
"libsql": "^0.3.18",
"mssql": "^7.2.1",
"mysql": "^2.18.1",
"pg": "^8.7.3",
"sqlite3": "^5.0.8",
"typeorm": "0.3.17",
"typeorm-naming-strategies": "^4.1.0"
},
"peerDependencies": {
"libsql": "^0.3.18",
"mssql": "^6.2.1 || ^7 || ^8 || ^9",
"mysql": "^2.18.1 || ^3",
"pg": "^8.2.1",
"sqlite3": "^5.0.2",
"typeorm": "^0.3.7"
},
"peerDependenciesMeta": {
"libsql": {
"optional": true
},
"mysql": {
"optional": true
},
Expand All @@ -71,9 +74,6 @@
},
"pg": {
"optional": true
},
"sqlite3": {
"optional": true
}
}
}
2 changes: 1 addition & 1 deletion packages/adapter-typeorm/test/sqlite/index.custom.test.ts
Expand Up @@ -4,7 +4,7 @@ import * as entities from "../custom-entities"
import { db } from "../helpers"

const sqliteConfig = {
type: "sqlite" as const,
type: "better-sqlite3" as const,
name: "next-auth-test-memory",
database: "./test/sqlite/dev.db",
synchronize: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/adapter-typeorm/tsconfig.json
Expand Up @@ -5,5 +5,5 @@
"rootDir": "src"
},
"exclude": ["*.js", "*.d.ts"],
"include": ["src/**/*"]
"include": ["src/*"]
}
2 changes: 1 addition & 1 deletion packages/utils/vitest.config.ts
Expand Up @@ -17,5 +17,5 @@ export default defineConfig({
},
setupFiles: ["../utils/vitest-setup.ts"],
},
plugins: [swc.vite(), preact()],
plugins: [swc.vite(), preact({ include: ["**/*[jt]sx"] })],
})

0 comments on commit 05a5cc7

Please sign in to comment.