@prisma/orm-better-auth 8.0.0-rc.25-dev.17 → 8.0.0-rc.25-dev.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -5
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Use [Better Auth](https://www.better-auth.com) with Prisma 8. The adapter stores Better Auth's users, sessions, accounts and verification tokens through your application's Prisma 8 client, on Postgres or SQLite.
|
|
4
4
|
|
|
5
|
-
> **
|
|
5
|
+
> **Maturity level: Generally Available.** From release 8.0, no later 8.x release breaks code that uses this package. Until release 8.0 it is published as `8.0.0-rc.N`, like every Prisma 8 package, and any of those versions may contain breaking changes. See [Versions and support](https://github.com/prisma/orm/blob/main/docs/oss/versioning.md#maturity-levels).
|
|
6
6
|
|
|
7
7
|
```ts
|
|
8
8
|
// src/lib/auth.ts
|
|
@@ -18,13 +18,23 @@ export const auth = betterAuth({
|
|
|
18
18
|
|
|
19
19
|
## Install
|
|
20
20
|
|
|
21
|
-
Install the adapter
|
|
21
|
+
Install the adapter from the same release as your Prisma 8 packages, together with Better Auth 1.7.22 or a later 1.7 release.
|
|
22
|
+
|
|
23
|
+
- **Until release 8.0,** use the same exact `8.0.0-rc.N` as your database package.
|
|
24
|
+
- **From release 8.0,** the adapter is Generally Available, so its version has no level suffix, even when your database package is below GA. Write its line the way your other Prisma lines are written: with a caret beside `@prisma/orm-postgres`, which is GA, and with a tilde beside `@prisma/orm-sqlite`, which is not. With a tilde, an update cannot move the adapter to a release that your database package cannot follow.
|
|
25
|
+
|
|
26
|
+
For release 8.0:
|
|
22
27
|
|
|
23
28
|
```sh
|
|
24
|
-
|
|
29
|
+
# beside @prisma/orm-postgres
|
|
30
|
+
pnpm add "@prisma/orm-better-auth@^8.0.1" "better-auth@~1.7.22"
|
|
31
|
+
# beside @prisma/orm-sqlite
|
|
32
|
+
pnpm add "@prisma/orm-better-auth@~8.0.1" "better-auth@~1.7.22"
|
|
25
33
|
```
|
|
26
34
|
|
|
27
|
-
|
|
35
|
+
For a later release, such as 8.3, write `8.3.0` in place of `8.0.1`.
|
|
36
|
+
|
|
37
|
+
The adapter uses the Prisma packages your database package already installs: `@prisma/orm-framework`, `@prisma/orm-family-sql` and `@prisma/orm-toolchain`. If the adapter needs a later release of them than you have, your package manager warns you, or refuses to install when it checks peer dependencies strictly. So install the adapter from the same release as those packages.
|
|
28
38
|
|
|
29
39
|
Better Auth must load one copy of `@better-auth/core`, the one `better-auth` itself uses. Better Auth keeps the contract check described below in that package, so a second copy never sees it.
|
|
30
40
|
|
|
@@ -271,7 +281,7 @@ Model and field names: the adapter matches Better Auth's model names to your con
|
|
|
271
281
|
|
|
272
282
|
## Dependencies
|
|
273
283
|
|
|
274
|
-
- `@prisma/orm-framework`, `@prisma/orm-family-sql` and `@prisma/orm-toolchain`, as
|
|
284
|
+
- `@prisma/orm-framework`, `@prisma/orm-family-sql` and `@prisma/orm-toolchain`, as peer dependencies. Your database package already requires all three, at the same release. The adapter loads `@prisma/orm-toolchain` only while `auth generate` runs, to read `prisma.config.ts`. Reading it also needs `@prisma/cli-engine`, which your `prisma.config.ts` already imports.
|
|
275
285
|
- `@better-auth/core` 1.7.22 or a later 1.7 release, below 1.8, as a peer.
|
|
276
286
|
|
|
277
287
|
The package imports only published entrypoints, so it works outside the Prisma repository. [DEVELOPING.md](DEVELOPING.md) has notes for people who change it.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/orm-better-auth",
|
|
3
|
-
"version": "8.0.0-rc.25-dev.
|
|
3
|
+
"version": "8.0.0-rc.25-dev.18",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
"@better-auth/test-utils": "1.7.27",
|
|
24
24
|
"@prisma/cli-engine": "0.10.4",
|
|
25
25
|
"@prisma/dev": "0.25.2",
|
|
26
|
-
"@prisma/orm-family-sql": "8.0.0-rc.25-dev.
|
|
27
|
-
"@prisma/orm-framework": "8.0.0-rc.25-dev.
|
|
28
|
-
"@prisma/orm-postgres": "8.0.0-rc.25-dev.
|
|
29
|
-
"@prisma/orm-sqlite": "8.0.0-rc.25-dev.
|
|
30
|
-
"@prisma/orm-toolchain": "8.0.0-rc.25-dev.
|
|
31
|
-
"@repo/tsconfig": "8.0.0-rc.25-dev.
|
|
32
|
-
"@repo/tsdown": "8.0.0-rc.25-dev.
|
|
26
|
+
"@prisma/orm-family-sql": "8.0.0-rc.25-dev.18",
|
|
27
|
+
"@prisma/orm-framework": "8.0.0-rc.25-dev.18",
|
|
28
|
+
"@prisma/orm-postgres": "8.0.0-rc.25-dev.18",
|
|
29
|
+
"@prisma/orm-sqlite": "8.0.0-rc.25-dev.18",
|
|
30
|
+
"@prisma/orm-toolchain": "8.0.0-rc.25-dev.18",
|
|
31
|
+
"@repo/tsconfig": "8.0.0-rc.25-dev.18",
|
|
32
|
+
"@repo/tsdown": "8.0.0-rc.25-dev.18",
|
|
33
33
|
"@types/node": "26.1.2",
|
|
34
34
|
"@types/pg": "8.20.4",
|
|
35
35
|
"better-auth": "1.7.27",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"@better-auth/core": ">=1.7.22 <1.8.0",
|
|
45
|
-
"@prisma/orm-family-sql": "8.0.0-rc.25-dev.
|
|
46
|
-
"@prisma/orm-framework": "8.0.0-rc.25-dev.
|
|
47
|
-
"@prisma/orm-toolchain": "8.0.0-rc.25-dev.
|
|
45
|
+
"@prisma/orm-family-sql": "8.0.0-rc.25-dev.18",
|
|
46
|
+
"@prisma/orm-framework": "8.0.0-rc.25-dev.18",
|
|
47
|
+
"@prisma/orm-toolchain": "8.0.0-rc.25-dev.18",
|
|
48
48
|
"typescript": ">=5.9"
|
|
49
49
|
},
|
|
50
50
|
"peerDependenciesMeta": {
|