Releases: zenstackhq/zenstack
ZenStack Release v2.11.5
ZenStack Release v2.11.4
ZenStack Release v2.11.3
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
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
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
🥳 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
ZenStack Release v2.10.1
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
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
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