@prisma/orm-better-auth 8.0.0-rc.25-dev.3 → 8.0.0-rc.25-dev.4

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.
Files changed (2) hide show
  1. package/README.md +4 -1
  2. package/package.json +10 -10
package/README.md CHANGED
@@ -2,6 +2,8 @@
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
+ > **This package is a release candidate, as Prisma 8 itself is.** Its versions are `8.0.0-rc.N`, in step with the Prisma 8 packages. Until `8.0.0` is released, any release may contain breaking changes, and only the latest release candidate is maintained. See [Prisma 8's release candidates](https://github.com/prisma/orm/blob/main/docs/oss/versioning.md#release-candidates).
6
+
5
7
  ```ts
6
8
  // src/lib/auth.ts
7
9
  import { betterAuth } from 'better-auth';
@@ -229,6 +231,7 @@ Model and field names: the adapter matches Better Auth's model names to your con
229
231
  - **Numbers.** The printed PSL declares Better Auth's number fields as `Int`, which on Postgres holds whole numbers up to about two billion. A number field that holds fractions or larger values, such as an interval in milliseconds, should be declared `Float` or `BigInt(as: number)` instead; both are accepted.
230
232
  - **Optional fields must be optional.** Every field Better Auth declares optional must be optional (`?`) in your contract, as the printed PSL writes it, because Better Auth can write `null` to it. A default does not help, whether it is a database default or Better Auth's own, since a default replaces only a missing value and never an explicit `null`. The contract check reports an optional field that is not optional.
231
233
  - **Ids.** With `generateId: false`, declare the id with a default, as the printed PSL does (`id String @id @onCreate(uuid())`). A `generateId` function that returns `false` for some models needs the same for those models' ids.
234
+ - **A primary key that is not named `id`.** Better Auth needs a field named `id`. When a model's primary key has another name and the model has no `id` field, the printed PSL adds `id String @id`, which gives the model two `@id` fields and does not emit. Write `@unique` in place of `@id` on the added line.
232
235
 
233
236
  ## Responsibilities
234
237
 
@@ -241,7 +244,7 @@ Model and field names: the adapter matches Better Auth's model names to your con
241
244
  - `@prisma/orm-framework` and `@prisma/orm-family-sql`, as peers at the same version as your database package.
242
245
  - `@better-auth/core` 1.7.6 or a later 1.7 release, below 1.8, as a peer.
243
246
 
244
- The package imports only published entrypoints, so it works outside the Prisma repository.
247
+ The package imports only published entrypoints, so it works outside the Prisma repository. [DEVELOPING.md](DEVELOPING.md) has notes for people who change it.
245
248
 
246
249
  ## Where this package lives
247
250
 
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@prisma/orm-better-auth",
3
- "version": "8.0.0-rc.25-dev.3",
3
+ "version": "8.0.0-rc.25-dev.4",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
- "description": "Better Auth database adapter for Prisma 8",
7
+ "description": "Better Auth database adapter for Prisma 8 (release candidate)",
8
8
  "keywords": [
9
9
  "better-auth",
10
10
  "prisma",
@@ -22,12 +22,12 @@
22
22
  "@better-auth/sso": "1.7.27",
23
23
  "@better-auth/test-utils": "1.7.27",
24
24
  "@prisma/dev": "0.25.2",
25
- "@prisma/orm-family-sql": "8.0.0-rc.25-dev.3",
26
- "@prisma/orm-framework": "8.0.0-rc.25-dev.3",
27
- "@prisma/orm-postgres": "8.0.0-rc.25-dev.3",
28
- "@prisma/orm-sqlite": "8.0.0-rc.25-dev.3",
29
- "@repo/tsconfig": "8.0.0-rc.25-dev.3",
30
- "@repo/tsdown": "8.0.0-rc.25-dev.3",
25
+ "@prisma/orm-family-sql": "8.0.0-rc.25-dev.4",
26
+ "@prisma/orm-framework": "8.0.0-rc.25-dev.4",
27
+ "@prisma/orm-postgres": "8.0.0-rc.25-dev.4",
28
+ "@prisma/orm-sqlite": "8.0.0-rc.25-dev.4",
29
+ "@repo/tsconfig": "8.0.0-rc.25-dev.4",
30
+ "@repo/tsdown": "8.0.0-rc.25-dev.4",
31
31
  "@types/node": "26.1.2",
32
32
  "@types/pg": "8.20.4",
33
33
  "better-auth": "1.7.27",
@@ -40,8 +40,8 @@
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@better-auth/core": ">=1.7.6 <1.8.0",
43
- "@prisma/orm-family-sql": "8.0.0-rc.25-dev.3",
44
- "@prisma/orm-framework": "8.0.0-rc.25-dev.3",
43
+ "@prisma/orm-family-sql": "8.0.0-rc.25-dev.4",
44
+ "@prisma/orm-framework": "8.0.0-rc.25-dev.4",
45
45
  "typescript": ">=5.9"
46
46
  },
47
47
  "peerDependenciesMeta": {