github prisma/prisma 2.0.0-preview017

latest releases: 5.16.1, 5.16.0, 5.15.1...
pre-release4 years ago

Today, we are issuing the seventeenth Preview release: 2.0.0-preview017 (short: preview017). Note that this release includes a major breaking change with respect to where Photon.js is being generated and how it's imported into your code. Read more below!

Note that we recently adjusted the versioning schema in order to fully comply to the semver spec (the first release with the new version schema was 2.0.0-preview014).

Breaking changes

Photon.js generation and usage

With this release, we're implementing the facade package @prisma/photon for Photon.js. This means, instead of generating Photon.js into node_modules/@generated/photon, it is now being generated into node_modules/@prisma/photon.

Furthermore, you now must add the @prisma/photon package to your project dependencies:

npm install @prisma/photon

Consequently, the Photon constructor is now imported from @prisma/photon into your code:

- import { Photon } from '@generated/photon'
+ import { Photon } from '@prisma/photon'

Also note that the versions of @prisma/photon and your prisma2 CLI installation must be the same! It is therefore recommended to add prisma2 as a development dependency to you project. Global installations of prisma2 are discouraged because it's more difficult to keep them in sync with individual projects.

You can add prisma2 as a development dependeency as follows:

npm install prisma2 --save-dev

You can now invoke this local prisma2 installation using npx:

npx prisma2

Usage of custom binaries in Photon.js

If you're using the platforms field on your Photon.js generator to explicitly specify a build target for the binaries that are used by Photon.js, you might need to update the naming of the binaries. Here's how the names have changed:

Before After
windows windows
darwin darwin
linux-glibc-libssl1.0.1 debian-openssl-1.0.x
linux-glibc-libssl1.0.2 debian-openssl-1.0.x
linux-glibc-libssl1.1.0 debian-openssl-1.1.x
linux-glibc-libssl1.1.1 debian-openssl-1.1.x

If you're using a RHEL-based systems (Fedora, Centos, etc.), replace debian with rhel, e.g. rhel-openssl-1.1.x.

You can learn more about this in the spec.

Fixes and improvements per Prisma Framework repository

prisma2

photonjs

lift

prisma-engine

Don't miss a new prisma release

NewReleases is sending notifications on new releases.