Releases: zenstackhq/zenstack
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
ZenStack Release v2.12.3
What's Changed
- Prisma 6.5 support
- Fixed the issue that
@json
field cannot use JSON string as default value by @diesal11 #2039 - Fixed zod generation issue with JSON list fields by @diesal11 #2039
Full Changelog: v2.12.2...v2.12.3
ZenStack Release v2.12.2
What's Changed
- [zod] Fixed incorrect schema field generation when delegate models and compound unique fields are used together #2028 by @diesal11
Full Changelog: v2.12.1...v2.12.2
ZenStack Release v2.12.1
What's Changed
- Intercepting Prisma client extension's
$parent
property and return enhanced PrismaClient by @Gabrola - Fixed the issue that installing Prisma client extensions causes losing some ZenStack enhancements #2014 by @Gabrola
- Refixed #1997 about injecting default foreign key values in nested creates
Full Changelog: v2.12.0...v2.12.1