Skip to content

Commit cb33cd7

Browse files
refactor: update ID generation handling and deprecate old options (#7)
- Removed deprecated `generateId` option from AdapterOptions and updated related code to use `database.generateId` instead. - Simplified ID generation logic in the create adapter by directly using `options.advanced?.database?.generateId`. - Removed warnings related to using an `id` in the create method, as ID generation is now handled internally. - Updated MongoDB adapter to align with the new ID generation approach. - Adjusted test files to reflect type changes for better compatibility with the new ID generation logic.
1 parent d9c0dd6 commit cb33cd7

File tree

7 files changed

+1381
-1024
lines changed

7 files changed

+1381
-1024
lines changed

package.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"type": "module",
44
"version": "0.1.0",
55
"private": false,
6-
"packageManager": "pnpm@10.8.1",
6+
"packageManager": "pnpm@10.10.0",
77
"description": "A modular adapter layer for working with any database (Drizzle, Prisma, MongoDB, Kysely & more)",
88
"author": "productdevbook <[email protected]>",
99
"license": "MIT",
@@ -95,32 +95,32 @@
9595
"dependencies": {
9696
"defu": "^6.1.4",
9797
"pathe": "^2.0.3",
98-
"zod": "^3.24.3"
98+
"zod": "^3.24.4"
9999
},
100100
"devDependencies": {
101-
"@antfu/eslint-config": "^4.12.0",
102-
"@prisma/client": "^6.6.0",
101+
"@antfu/eslint-config": "^4.13.0",
102+
"@prisma/client": "^6.7.0",
103103
"@types/better-sqlite3": "^7.6.13",
104-
"@types/node": "^22.14.1",
105-
"@types/pg": "^8.11.13",
106-
"@vitest/coverage-v8": "^3.1.1",
107-
"better-sqlite3": "^11.9.1",
104+
"@types/node": "^22.15.16",
105+
"@types/pg": "^8.15.0",
106+
"@vitest/coverage-v8": "^3.1.3",
107+
"better-sqlite3": "^11.10.0",
108108
"bumpp": "^10.1.0",
109109
"deepmerge": "^4.3.1",
110-
"drizzle-orm": "^0.42.0",
111-
"eslint": "^9.25.0",
112-
"kysely": "^0.28.1",
113-
"mongodb": "^6.15.0",
114-
"mysql2": "^3.14.0",
115-
"pg": "^8.14.1",
116-
"prisma": "^6.6.0",
110+
"drizzle-orm": "^0.43.1",
111+
"eslint": "^9.26.0",
112+
"kysely": "^0.28.2",
113+
"mongodb": "^6.16.0",
114+
"mysql2": "^3.14.1",
115+
"pg": "^8.15.6",
116+
"prisma": "^6.7.0",
117117
"tarn": "^3.0.2",
118118
"tedious": "^18.6.1",
119-
"tsdown": "^0.9.0",
119+
"tsdown": "^0.11.1",
120120
"typescript": "^5.8.3",
121121
"unbuild": "^3.5.0",
122122
"vite-tsconfig-paths": "^5.1.4",
123-
"vitest": "^3.1.1"
123+
"vitest": "^3.1.3"
124124
},
125125
"pnpm": {
126126
"onlyBuiltDependencies": [

playground/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
"name": "playground",
33
"type": "module",
44
"version": "1.0.0",
5-
"packageManager": "pnpm@10.8.1",
5+
"packageManager": "pnpm@10.10.0",
66
"scripts": {
77
"dev:memory": "tsx memory.ts"
88
},
99
"dependencies": {
1010
"unadapter": "link:",
11-
"zod": "^3.24.3"
11+
"zod": "^3.24.4"
1212
}
1313
}

0 commit comments

Comments
 (0)