Releases: zenstackhq/zenstack
ZenStack Release v2.0.0-beta.5
New Features
Fixes and Improvements
- [Runtime] Improved handling of Prisma fluent API call to make sure N+1 query optimization is effective #1178
- [ZModel] Fixed the issue that
auth()
field from a base model is not properly resolved #1179 - [ZModel] Fixed a linking error that happens after merging declarations from imported models #1186
- [Server] Changed several default exports to named ones for better bundler compatibility
Full Changelog: v2.0.0-beta.3...v2.0.0-beta.5
ZenStack Release v1.12.0
This release notes includes cumulated fixes and improvements since the last 1.11.0 release.
What's Changed
- [TRPC] Improved how the generated code imports zod schemas for better compatibility by @jbruxelle #1177
- [TanStack] Vue-query hooks now properly handle reactive input (for both query args and options)
- The
enhance
API now has an extraprismaModule
option to allow passing in thePrisma
module when the prisma client is generated into a custom location docs - Fixed unit test failures on Windows environments.
- Fixed the issue with insufficient unique constraint conflict detection when the
skipDuplicates
option is specified in a nestedcreateMany
payload #1162
Full Changelog: v1.11.0...v1.12.0
New Contributors
- Welcome @jbruxelle to becoming our new contributor ❤️ !
Full Changelog: v1.11.0...v1.12.0
ZenStack Release v2.0.0-beta.3
Breaking Changes
- Server adapters now return HTTP 422 when the request is rejected due to validation errors.
What's Changed
- Removed prettier dependency. The generated code is now directly formatted with ts-morph.
- Fixed the issue that
@@map
attribute is incorrectly inherited from base models. - Disallow
this
in collection predicate expressions.
Full Changelog: v1.11.0...v2.0.0-beta.3
ZenStack Release v2.0.0-beta.1
Breaking Changes
- [TanStack Query] hooks signature is cleaned up and extra parameters are merged into query/mutation options.
- [SWR] legacy mutation function generation is removed. Use mutation hooks instead.
- [SWR] removed the deprecated
initialData
option. UsefallbackData
instead. - [Server Adapter] the deprecated
useSuperJSON
flag is removed. - [Zod] generated model schemas now follows field optionality as defined in ZModel schema.
Features
- The
enhance
API now generates strong typing for theuser
context, based on the fields access fromauth()
in access policies. - [TanStack Query/SWR] a new
optimisticDataProvider
callback option is added. You can use it to fully control how optimistic update data is computed for each query cache entry. - [Polymorphism] the generated
enhance
API now respects the client extension's typing of theprisma
parameter.
Fixes and Improvements
- [Polymorphism] fixed the problem generated prisma schema may have foreign key constraint ambiguity issue.
- [Polymorphism] fixed the problem that generated auxiliary relations can cause naming conflict.
- [Polymorphism] fixed the problem that fields in base models cannot be used in
orderBy
. - [Polymorphism] return full entity data when queried with a base model.
- [Polymorphism] disallow inheriting from multiple delegate models.
- Fields with
@default
withauth()
are properly generated as TypeScript optional. - More robustly calculate the default location for code generation.
Full Changelog: v2.0.0-alpha.2...v2.0.0-beta.1
ZenStack Release v1.11.0
New Features
-
You can now import ZModel from packages in
node_modules
! Very useful if you want to manage and share ZModel files in a component-based setup. By @TGTGamerimport "@myorg/foo/bar" import "mypackage/base" ...
Fixes and Improvements
This release gives a minor version bump for several fixes made in the "1.10.x" patch releases.
- Fixed the issue that
@@validate
model-level rules cause incorrect runtime validation error for updates #1078 - Fixed the issue that
upsert
with array-form input results in a partial write #1080 - Fixed the issue that compound ids inherited from abstract models are not properly handled #1129
Full Changelog: v1.10.0...v1.11.0
ZenStack Release v1.10.0
Fixes and Improvements
- Fixed typing issue in generated query hooks for TanStack Query (for Vue) #1056
- Fixed
zenstack
CLI errors when running bun/bunx in non-tty environment by @ErikMCM - Allows enum types for id fields by @Ustice
- Fixed missing parameters for a few built-in attributes (
@@fulltext
,@@db.VarBinary
) by @Ustice - Fixed the problem that transformation attributes (
@trim
,@lower
,@upper
) are not effective for update operations #1005 - Fixed the incorrect policy rejection when field-level policy specifies override but no model-level policy is defined #1014
- Improved ZModel checking for nullability consistency between relation field and foreign key field #177
- Generated Zod schemas now include coercion (
z.coerce.date()
) forDateTime
typed fields #1067 - Improved typing of
error
field of the TanStack Query mutation hooks #1062
Docs
New quick start guide for NextJS app router.
New Contributors
Welcome @ErikMCM @Ustice and @TGTGamer to becoming our new contributors!
Full Changelog: v1.9.0...v1.10.0
v2.0.0-alpha.2
ZenStack Release v1.9.0
What's Changed
- New data transformation attributes
@trim
,@upper
,@lower
- they make sure values are transformed before storing into the database, and are also generated as corresponding Zod calls by the@core/zod
plugin. By @simonedelmann docs - The parameters of Prisma transactions (
timeout
,maxWait
, etc.) used internally by ZenStack are configurable #986 docs - Fixed several issues related to validating multi-level inheritance from abstract models #965 #971 #983
- Fixed the issue the
@omit
attribute doesn't trim fields included in a nested one-to-many #984 - Support for complex usage of
@@index
#987 - Tanstack-query plugin now generates
useSuspense
anduseSuspenseInfinite
query hooks when generating for version "v5" and targeting "react" #857
New Contributors
- Welcome @simonedelmann as our new contributor!
Full Changelog: v1.8.1...v1.9.0
ZenStack Release v2.0.0-alpha.1
New Features
Breaking Changes
Check here for a list of breaking changes.
Please make sure to check out the Upgrading to V2 documentation for more details.
ZenStack Release v1.8.1
Features and Improvements
- Fixed "hostname not found" error when deploying to Vercel #931 by @Azzerty23
- Fixed CLI crash when package.json is not found in the current dir #960
- Fixed typing of tanstack-query code generation to properly support "select" options #963
- Optimized typing of the generated TRPC code (to prepare for supporting trpc v11 down the road)
Thanks to @Azzerty23 for the contribution!
Full Changelog: v1.7.1...v1.8.0