Releases: zenstackhq/zenstack
ZenStack Release v2.0.0-beta.13
What's Changed
- VSCode extension and the
zenstack
CLI formats ZModel files with prisma-like indentation style by default. #885 zenstack
CLI now auto-format the generated prisma schema by default.- Fixed several typing issues about using
auth()
inside@default()
. - Fixed the problem that member access from
auth()
is not properly resolved if the auth model is imported. #1257 - Fixed the problem that
@@index
attribute is incorrectly inherited from the base. #1243 - Removed several Prisma V4 dependencies since V4 is not supported anymore.
Full Changelog: v2.0.0-beta.8...v2.0.0-beta.13
ZenStack Release v1.12.3
What's Changed
- Fixed the issue that
enhance
doesn't handle relations of the same type but different names properly #1241 - Fixed openapi plugin to allow array form of input data
Full Changelog: v1.12.2...v1.12.3
ZenStack Release v1.12.2
What's Changed
- Fixed the issue that post-update rule for "id" field is not effective when the id field is changed during an update #1235
- Fixed incorrect access policy generation when
this
is used in post-update rules.
Full Changelog: v1.12.1...v1.12.2
ZenStack Release v2.0.0-beta.8
What's Changed
- Support for edge runtime (Vercel edge and Cloudflare worker)
- Clear plugins' output dir before running generation #1220
- Add Prisma as peer dependency #1084
- Make data validation a separate enhancement kind #1050
- Fixed ZModel linker errors #1210
Full Changelog: v2.0.0-beta.5...v2.0.0-beta.8
ZenStack Release v1.12.1
What's Changed
- [Zod] Generate a field schema as zod UUID if it has
@db.Uuid
attribute by @sakgoyal
New Contributors
- Welcome @sakgoyal to becoming our new contributor!
Full Changelog: v1.12.0...v1.12.1
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