You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**BREAKING CHANGE**: Added support for Prisma client type definitions generated outside of node_modules.
6
+
7
+
The type definition for `PrismaClient` is no longer imported from `@prisma/client`. As a result, you must provide a type definition when instantiating fraci options or extensions. Please migrate as follows:
8
+
9
+
```diff
10
+
import { definePrismaFraci, prismaFraci } from "fraci/prisma";
11
+
import { PrismaClient } from "./path/to/your/prisma/client"; // Adjust the import path to your Prisma client
12
+
13
+
const baseClient = new PrismaClient();
14
+
15
+
- const definition = definePrismaFraci({
16
+
+ const definition = definePrismaFraci(baseClient, { // or you can use `PrismaClient` instead of `baseClient`
17
+
// your options here
18
+
});
19
+
20
+
const client = baseClient.$extends(
21
+
- prismaFraci(definition),
22
+
+ prismaFraci(baseClient, definition), // or you can use `PrismaClient` instead of `baseClient`
23
+
);
24
+
```
25
+
26
+
Along with this, the `PrismaClient` type argument was added first to the following related public type definitions:
27
+
28
+
-`prismaFraci`
29
+
-`definePrismaFraci`
30
+
-`FraciForPrisma`
31
+
-`PrismaFraciExtension`
32
+
-`PrismaFraciFieldOptionsRecord`
33
+
-`PrismaFraciOptions`
34
+
35
+
Furthermore, we are anticipating future changes to Prisma's architecture and reducing imports from `@prisma/client`. As a result, the `PrismaClientConflictError` type no longer inherits from `PrismaClientKnownRequestError`.
0 commit comments