Skip to content

Commit b932573

Browse files
committed
Update README.md to reflect support for Prisma 7 and clarify requirements and generator output configuration.
1 parent e0399b4 commit b932573

File tree

1 file changed

+24
-7
lines changed
  • packages/prisma-client-types-generator

1 file changed

+24
-7
lines changed

packages/prisma-client-types-generator/README.md

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
A tool to generate TypeScript types from your Prisma schema, can be safely imported on the browser.
44

5+
**✨ Now supports Prisma 7!**
6+
57
## what does it do
68

79
This package generates TypeScript types from your Prisma schema file that can be safely used in browser environments. Unlike the types generated by Prisma Client, these types:
@@ -13,7 +15,16 @@ This package generates TypeScript types from your Prisma schema file that can be
1315

1416
This is particularly useful when you want to share types between your backend and frontend code without bringing in the full Prisma Client library to the browser.
1517

16-
For example, if you have a Prisma model it will generate:
18+
## Requirements
19+
20+
- Prisma 7.x or higher
21+
- TypeScript 5.x or higher
22+
23+
For Prisma 6 support, use version 1.0.x of this package.
24+
25+
## What it generates
26+
27+
For each Prisma model it will generate:
1728

1829
- ModelValues => the scalars
1930
- ModelKeys => the unique keys
@@ -36,6 +47,10 @@ generator types {
3647
### 2. Example Prisma Schema
3748

3849
```prisma
50+
generator client {
51+
provider = "prisma-client"
52+
}
53+
3954
model User {
4055
id Int @id @default(autoincrement())
4156
email String @unique
@@ -96,13 +111,15 @@ async function fetchUser(id: number): Promise<UserExtended> {
96111
You can customize the generator output using configuration options in your `schema.prisma`:
97112

98113
```prisma
114+
generator client {
115+
provider = "prisma-client"
116+
}
117+
99118
generator types {
100-
provider = "prisma-client-types-generator"
101-
output = "./generated/types.ts"
102-
config = {
103-
pascalCase = true
104-
aliases = "./prisma/aliases.ts"
105-
}
119+
provider = "prisma-client-types-generator"
120+
output = "./generated/types.ts"
121+
pascalCase = true
122+
aliases = "./prisma/aliases.ts"
106123
}
107124
```
108125

0 commit comments

Comments
 (0)