Prisma: 2.4.1 Release

Release date:
August 5, 2020
Previous version:
2.4.0 (released August 4, 2020)
Magnitude:
159 Diff Delta
Contributors:
3 total committers
Data confidence:
Commits:

Top Contributors in 2.4.1

timsuchanek
Jolg42
prisma-bot

Directory Browser for 2.4.1

We haven't yet finished calculating and confirming the files and directories changed in this release. Please check back soon.

Release Notes Published

Today, we are issuing the 2.4.1 patch release.

When we released the new "Order by multiple fields" feature, you gave us feedback, that the order of properties is not stable in JavaScript. Since ES2015 that is not a problem in the language itself anymore. However, some teams use the eslint sort-keys plugin, which sorts the keys of objects by alphabet.

Therefore we decided to change the API in a patch release to minimize any problems this might cause to you.

Order by multiple fields in 2.4.0

// order by `age` descending and then by `name` ascending
const users = await prisma.user.findMany({
  orderBy: {
    age: 'desc',
    name: 'asc'
  }
})

Order by multiple fields in 2.4.1

// order by `age` descending and then by `name` ascending
const data = await client.user.findMany({
  orderBy: [
    {
      age: 'desc',
    },
    {
      name: 'asc',
    },
  ],
})