npm @prisma/client 2.4.1

latest releases: 5.21.0-dev.3, 5.21.0-integration-itx-refactor.16, 5.21.0-integration-itx-refactor.15...
4 years ago

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',
    },
  ],
})

Don't miss a new client release

NewReleases is sending notifications on new releases.