arthurfiorette / prisma-json-types-generator

⚒️ Changes JsonValues to your custom typescript type.
https://npm.im/prisma-json-types-generator
MIT License
364 stars 20 forks source link

fix: find client generator by provider instead of the name #240

Closed Cauen closed 7 months ago

Cauen commented 7 months ago

The findPrismaClientGenerator was searching the client generator by name, which can be an arbitrary value chosen by the developer

This PR changes to code to finds the generator by provider prisma-client-js.

If this is a very intrusive change, I believe it is worth highlighting in the documentation that the generator title must be equal to client.

arthurfiorette commented 7 months ago

Hey @Cauen, thanks!

Yes, I'd love if you could reflect this change in the documentation.

generator client { // previous search
  provider = "prisma-client-js" // current search
}

If this is a very intrusive change, I believe it is worth highlighting in the documentation that the generator title must be equal to client.

must be equal to client or prisma-client-js?

Cauen commented 7 months ago

@arthurfiorette Thanks for you fast response \o/

Yes, I'd love if you could reflect this change in the documentation.

Today the documentation has no mentions to the methodology of searching the prisma client generator.

As the prisma client provider prisma-client-js "cannot be changed", I believe that adding this to the documentation may confuse more than help. What do you think?

I believe that for 100% of users this will not be a breaking change.

must be equal to client or prisma-client-js?

Currently, the generator title must be equal to client.

I mean if you dont want to merge, may be worth to highlight that in documentation (For those like me who had a different title and it didn't work.)

arthurfiorette commented 7 months ago

I believe that adding this to the documentation may confuse more than help. What do you think?

Probably yes.

thanks!