Releases: zenstackhq/zenstack
ZenStack Release v2.16.0
New Features
- Prisma 6.10.x support.
- Support for the new "prisma-client" generator introduced since Prisma 6.6 #2093 #2135 doc
- Added a new runtime option to control toggle data validation behavior and let it only check fields included in the input data #2025 doc
Fixes and Improvements
- Fixed wrong validation errors in IDEs about declarations in
stdlib.zmodel
. - Cleaned up many small npm dependencies by @DoctorFTB
Full Changelog: v2.15.1...v2.16.0
ZenStack Release v2.15.1
What's Changed
- Custom plugins can now use the
preprocessor
option to run before built-in plugins by @chunkerchunker docs - Fixed a typing error in the generated
Enhanced
utility type
Full Changelog: v2.15.0...v2.15.1
v2.15.0
New Features
- ElysiaJS server adapter by @rodrigoburigool doc
- Prisma 6.8 support
Fixes and Improvements
- Fixed bun compatibility for running
zenstack generate
andzenstack init
#2124 - (delegate) Make sure
@updatedAt
fields inherited from base models are updated automatically upon update #2101 - (delegate) Fixed the issue that when cascade-delete happens, delegate base rows are not deleted #2102
- (policy) Fixed the issue that Prisma client extension computed fields are not returned when field-level policies are used #2117
- Fixed logging error when data contains BigInt #2106
New Contributors
- Welcome @rodrigoburigool as our new contributor ❤️!
Full Changelog: v2.14.2...v2.15.0
ZenStack Release v2.14.2
What's Changed
NestJS server adapter is added with a ApiHandlerService
service for handling CRUD requests automatically by leveraging ZenStack's RPC or RESTful API handler by @ppodds doc
New Contributors
Welcome @ppodds as our new contributor!
Full Changelog: v2.14.1...v2.14.2
ZenStack Release v2.14.1
What's Changed
- Prisma 6.7 support
- Fixed JSDoc boilerplate in generated code by @DoctorFTB
New Contributors
Welcome @DoctorFTB as our new contributor ❤️ !
Full Changelog: v2.14.0...v2.14.1
ZenStack Release v2.14.0
What's Changed
- Prisma 6.6 support
Please note that Prisma 6.6 introduced a new prisma-client generator and ESM output as EA features. These are untested with ZenStack yet and I believe there will be issues. - Code generation performance optimization
We made some optimizations on how TS code is generated, and for large schemas, we've seenzenstack generate
run as much as 3 times faster. - Using typed-JSON fields is now enabled for SQLite by @liontariai
- Refactored how Prisma types and values are reexported at
@zenstackhq/runtime/models
by @diesal11 - Fixed RESTful API to properly filter by multiple relation ids separated by commas #2061
- Added JSON value equality filter to RESTful API
- Fixed OpenAPI generation errors when typed-JSON fields are used #2084
- Fixed OpenAPI generation errors when output folder doesn't exist #2080
New Contributors
Welcome @liontariai and @adnanalbeda as our new contributors!
Full Changelog: v2.13.3...v2.14.0
ZenStack Release v2.13.3
What's Changed
- Fully reexport
.zenstack/models
from@zenstackhq/runtime/models
.
Full Changelog: v2.13.2...v2.13.3
ZenStack Release v2.13.2
What's Changed
- Fixed the issue with failing to import enums when logical prisma client is generated #2065
Full Changelog: v2.13.1...v2.13.2
ZenStack Release v2.13.1
What's Changed
- [rest-server] Fixed the issue that using multiple deep filters can result in error #2020
- [runtime] Fixed the issue that node-based Prisma values are imported when targeting edge runtime by @fredevery
- [json] Fixed typing issue when optional JSON fields are used with the "strictedUndefinedChecks" Prisma preview feature by @diesal11
New Contributors
Welcome @fredevery as our new contributor!
Full Changelog: v2.13.0...v2.13.1
ZenStack Release v2.13.0
Critical Bug Fixes
This release fixed a critical issue that may result in more entities getting updated/deleted with a nested updateMany
/deleteMany
. It happens when the 3 conditions below are all met:
- Using
updatedMany
/deleteMany
under a topl-evelupdate
query. - The nested-updated model has access policies referencing its own fields, or is a polymorphic model.
- The top-level update query uses non-id unique fields as a filter condition.
Here's an example:
model User {
...
id Int
email String @unique
posts Post[]
}
model Post {
...
@@allow('all', published == false)
}
// note the top-level `update` call uses a unique field instead of primary key as filter
await db.user.update({ where: { email: ... }, data: { posts: { updateMany: { ... } } } });
The correct behavior should be only posts that have a relation to the user that matches the "email" filter should be affected by the update. However, in this case when all the 3 conditions above are met, the where: { email: ... }
filter would be lost, which might cause posts not related to the user to be updated too.
Please note that if
Post
has access policies (e.g., controlling it can only be updated by the owner), the policies are NOT bypassed and will still filter out theupdateMany
operation. That is why it says might even if all 3 conditions are met.
Please consider upgrading to this version ASAP. Also, please consider turning on Prisma's strict undefined checks preview feature. It can serve as an extra safety guard for issues caused by transforming Prisma queries.
A special thanks to @iksemot who filed the bug that made us aware of the issue!
New Features
- Prisma 6.5 support (since v2.12.3)
- Support calling
currentModel
andcurrentOperation
functions in access policy rules #1984
Fixes and Improvements
- [zod] Fixed incorrect Zod schema for JSON fields with default values by @diesal11
- Properly re-export model metadata types by @Gabrola
- Make sure the
Enhanced
type helper is always generated regardless if a logical prisma schema is used - [delegate] Fixed an incorrect TS typing when delegate models have long names #1994
- [cli] Fixed
zenstack generate
error when@default
references anauth()
field of boolean type #2038
Full Changelog: v2.12.3...v2.13.0