Skip to content

Releases: zenstackhq/zenstack

ZenStack Release v2.11.5

29 Jan 10:08
a1dfdcd
Compare
Choose a tag to compare

What's Changed

  • Prisma 6.3 support

Full Changelog: v2.11.4...v2.11.5

ZenStack Release v2.11.4

17 Jan 01:56
ff393da
Compare
Choose a tag to compare

What's Changed

  • Fixed ZModel generation for type definitions.

Full Changelog: v2.11.3...v2.11.4

ZenStack Release v2.11.3

14 Jan 10:30
b220213
Compare
Choose a tag to compare

What's Changed

  • Support for Prisma 6.2's new updateManyAndReturn
  • When a field has a default value involving auth(), a dummy default value is generated in the logical prisma schema to indicate the field doesn't require a value during create

Full Changelog: v2.11.2...v2.11.3

ZenStack Release v2.11.2

13 Jan 06:05
ba80eda
Compare
Choose a tag to compare

What's Changed

  • Fixed the issue that createManyAndReturn throws an error when model contains array fields #1955

Full Changelog: v2.11.1...v2.11.2

ZenStack Release v2.11.1

08 Jan 03:46
4b7d813
Compare
Choose a tag to compare

What's Changed

  • Updated max supported Prisma version to 6.2.x
  • Added the new ulid() attribute function

NOTE:

Prisma 6.2 added a new updateManyAndReturn API to PrismaClient. This API is not supported by ZenStack-enhanced PrismaClient yet. We'll complete the adaptation and testing soon.

Full Changelog: v2.11.0...v2.11.1

ZenStack Release v2.11.0

07 Jan 15:39
70a81c6
Compare
Choose a tag to compare

🥳 Happy New Year 🥳

Wish you all enjoyed the holidays and are having a great start of 2025!

New Features

  • Field encryption 🔑

    Thanks @genu for implementing this much-desired (preview) feature! This feature allows you to mark fields with the @encrypted attribute and create an enhanced PrismaClient that transparently encrypt/decrypt the field values. See how to use it here.

  • New attribute functions for access policies:

    • currentModel(): return the name of the model for which the policy rule is defined.
    • currentOperation(): return the operation for which the policy rule is defined for.

    These functions are handy for implementing fine-grained RBAC where users are assigned permissions for specific resources and operations. E.g.:

    model Resource {
        ...
        owner User @relation(...)
        @@allow('all', 
            owner.roles?[
                permissions?[resource == currentModel() && action == currentOperation()
        ]])
    }

Fixes and Improvements

  • [openapi] generate "id" field type according to its declared type in ZModel #1908
  • [zmodel] check for cyclic model inheritance and report errors
  • [delegate] fixed incorrect injection when check() function is used with delegate models #1930
  • [delegate] fixed errors when selecting "_count" of relation fields defined in delegate base models #1467
  • [rest-api] return an empty object response with status 200 for "DELETE" route #1668
  • [delegate] don't inherit @@schema attribute from base if the attribute is already defined in a sub model #1647

Full Changelog: v2.10.2...v2.11.0

ZenStack Release v2.10.2

18 Dec 13:50
689d013
Compare
Choose a tag to compare

What's Changed

  • Prisma 6.1 support

Full Changelog: v2.10.1...v2.10.2

ZenStack Release v2.10.1

13 Dec 03:20
f7f85ea
Compare
Choose a tag to compare

What's Changed

  • Preserve custom attributes as comments in the generated logical prisma schema #1909
  • Fixed a typing compatibility issue with the latest Zod

Full Changelog: v2.10.0...v2.10.1

ZenStack Release v2.10.0

05 Dec 08:14
7cc5f00
Compare
Choose a tag to compare

What's Changed

  • Prisma 6.0 support
  • TanStack Query query cancellation support doc #1872
  • Allow Unsupported fields in @@index #1870
  • Removed ZenStack version number from generated TS source files to avoid unnecessary file updates when upgrading ZenStack
  • Fixed a typing regression that incorrectly requires a foreign key field when creating a polymorphic model #1894
  • Fixed a regression in OpenAPI generation that foreign keys with default values are incorrectly marked as required in Create payload #1893
  • Fixed zenstack init command to install the maximum supported Prisma version instead of "latest" #1905

Full Changelog: v2.9.4...v2.10.0

ZenStack Release v2.9.4

27 Nov 12:16
251c699
Compare
Choose a tag to compare

What's Changed

  • RESTful API handler now supports upsert operation by @thomassnielsen doc
  • Fixed inconsistency between OpenAPI specification and REStful API handler by @thomassnielsen

Full Changelog: v2.9.3...v2.9.4