Skip to content

Commit

Permalink
feat: add nexus_prisma bin for =<2.17 prisma users
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonkuhrt committed Mar 10, 2021
1 parent 58163b4 commit 469c9e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,19 @@ npm add --dev prisma

### Example

> **Note:** If you are using Prisma@=<2.17.x then you _must_ use the Nexus Prisma Prisma generator name of `nexus_prisma` instead of `nexus-prisma`. This is because prior to prisma@2.18.x there was a hardcode check for `nexus-prisma` generator name wherein it would give feedback about it no longer being a generator.
```prisma
generator client {
provider = "prisma-client-js"
}
generator nexusPrisma {
// This is a temporary name, soon will be just "nexus-prisma" (pending a change in Prisma core).
provider = "nexus-prisma"
provider = "nexus-prisma"
// provider = "nexus_prisma" <-- For prisma@=<2.17.x users
}
/// This is a user!
model User {
/// This is an id!
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"scalars.d.ts"
],
"bin": {
"nexus-prisma": "./dist/cli/nexus-prisma.js"
"nexus-prisma": "./dist/cli/nexus-prisma.js",
"nexus_prisma": "./dist/cli/nexus-prisma.js"
},
"scripts": {
"format": "prettier --write .",
Expand Down

0 comments on commit 469c9e9

Please sign in to comment.