prisma-appsync icon indicating copy to clipboard operation
prisma-appsync copied to clipboard

Upcoming rename of `@prisma/sdk` to `@prisma/internals` with Prisma 4

Open janpio opened this issue 2 years ago • 5 comments

Hey,

Jan from Prisma Engineering here.

Quick heads up that we will soon rename our @prisma/sdk package to @prisma/internals with Prisma 4, which we plan to release on June 28th (soon!).

The @prisma/sdk package was meant as an Prisma internal package only, but somehow it leaked out over time and is now used across all kinds of tools - including yours of course 😄

With the rename of the Npm package we want to make it clearer that we can not give any API guarantees for @prisma/internals, might need to introduce breaking changes to the API from time to time and will not follow semantic versioning (breaking changes only in major upgrade) with it. We think that it is better communicated with internals than with sdk. With Prisma 4, besides the package name nothing should change though.

Additionally it would be super helpful if you could help us gain an understanding where, how and why you are using @prisma/sdk (soon @prisma/internals, remember 😀) to achieve, what exactly. We want to cleanup that package and your feedback will be valuable to us to define a better API.

Looking forward to your feedback.

Best Jan & your friends at Prisma

PS: Are you using Prisma.dmmf from import { Prisma } from '@prisma/client' in your code somewhere by chance? That will also change soon and not include the Prisma.dmmf.schema sub property. Instead you can use getDmmf from @prisma/internals moving forward.

janpio avatar Jun 16 '22 10:06 janpio

Hey @janpio, thanks for letting me know!

Removing @prisma/sdk entirely from Prisma-AppSync will not be an issue, as I’m only using it for its parseEnvValue function (which I was planning to remove in the next coming release). I am also not using Prisma.dmmf from @prisma/client anywhere.

Prisma-AppSync is mainly reliant on generatorHandler and DMMF exported from @prisma/generator-helper package, as well as the GeneratorOptions available from the generatorHandler :: onGenerate handler. I am reading the dmmf.datamodel property from there.

Any changes planned on the above?

maoosi avatar Jun 16 '22 11:06 maoosi

Not right now, but good to know - I guess we better start a list of which ones of these APIs are used externally, so we can better anticipate if any changes will cause trouble.

janpio avatar Jun 16 '22 12:06 janpio

Note: You can try prisma packages on the dev tag on npm, like @prisma/[email protected]

Jolg42 avatar Jun 22 '22 16:06 Jolg42

@Jolg42 Thanks! Will look into it.

maoosi avatar Jun 24 '22 02:06 maoosi

@maoosi Prisma 4.0.0 was published on Tuesday :canoe:

The internal package @prisma/sdk

  • was published for the last time to ease the upgrade (in the future we might reuse the package name, but its content will be different)
  • marked deprecated on npm
  • available under the new, more explicit package name @prisma/internals.

If you know people affected by this, feel free to point them to this GitHub discussion. It will help us understand where, how, and why people are using it, so we can define a better API.

Note: I posted your earlier comment of your current usage in that discussion to centralize the usage feedback.

Jolg42 avatar Jun 30 '22 10:06 Jolg42