Releases: zenstackhq/zenstack
Releases · zenstackhq/zenstack
ZenStack Release v1.0.0-alpha.102
What's Changed
- Fixed wrongly generated types for the
groupBy
andcount
hooks from the@zenstackhq/react
plugin - Fixed CLI checking for plugin setting fields when object syntax is used (reported by @Azzerty23)
Full Changelog: v1.0.0-alpha.99...v1.0.0-alpha.102
ZenStack Release v1.0.0-alpha.99
What's Changed
- Fixed VSCode extension error triggered by highlighting content when ZModel contains parse errors
- Fixed test environment compatibility with Win32 (by @potion-cellar )
- Added CLI config file support (see here for details)
- Added security scheme support and a few other configurations for
@zenstackhq/openapi
plugin - Fixed the issue that VSCode extension reports errors for
@@openapi.meta
attribute - Improved
@zenstackhq/trpc
plugin to wrap Prisma errors into proper trpc errors
Special thanks to @potion-cellar, @Azzerty23, and @jawadst for filing several issues.
Full Changelog: v1.0.0-alpha.98...v1.0.0-alpha.99
ZenStack Release v1.0.0-alpha.98
What's Changed
- More robust url and payload handling in OpenAPI services (by @potion-cellar)
- Allow to customize OpenAPI specification version (with the "specVersion" option in plugin, defaults to "3.1.0")
- Added support to use @tanstack/react-query as data fetcher for "react" plugin (by @jonathangerbaud)
zenstack init
command now installs ZenStack dependencies with pinned version- Added
zenstack info
command to show package versions and available upgrade - Added the missing
count
hooks for react hooks generation
New Contributors
- Welcome @potion-cellar and @jonathangerbaud to become our contributors. Thank you for your thoughtful ideas and code!
Full Changelog: v1.0.0-alpha.87...v1.0.0-alpha.98
ZenStack Release v1.0.0-alpha.87
What's Changed
- Support for implicit many-to-many relations
- Added attribute functions for filtering on fields in policy expressions: contains, search, startsWith, endsWith, has, hasSome, isEmpty. You can use these functions to write more flexible policy rules, e.g.:
See detailed documentation here: https://zenstack.dev/docs/reference/zmodel-language#predefined-attribute-functions.
model Post { id String @id title String @@allow('update', startsWith(title, '[DRAFT]')) }
- Improved consistency in handling undefined and null values in
auth()
object
Full Changelog: v1.0.0-alpha.85...v1.0.0-alpha.87
v1.0.0-alpha.85
What's Changed
- Upgraded
langium
dependency (old version results in a StackOverflow error) - Added support for Prisma's
@@ignore
and@ignore
attributes - VSCode: improved support for
@relation
field generation
ZenStack Release v1.0.0-alpha.79
What's Changed
- Server adapter for Express.js
- More plugin options for
@zenstackhq/openapi
plugin
Potential Breaking Changes
- Prisma relation-related mutations:
connect
,connectOrCreate
, andupdate
now trigger the validation of "update" policy on the relation owner side (since such operations update foreign keys). It wasn't enforced in the previous releases. You may need to adjust access policies accordingly.
E.g.:
model User {
...
posts Post[]
}
model Post {
...
author User? @relation(fields: [authorId], references: [id])
authorId String?
db.user.create({
data: {
posts: { connect: { id: 'post1' } }
}
});
The above code may fail if Post
model is not updatable by the current user.
ZenStack Release v1.0.0-alpha.73
What's Changed
- New OpenAPI plugin for generating OpenAPI V3 specification from zmodel! You can use it to generate a YAML/JSON spec and load it up into tools like swagger-ui. Check here for an example.
- Adapter for integrating with Fastify: automatic OpenAPI services for CRUD.
- Fix: make sure zod schemas are lazily loaded to avoid circular dependency issues.
Under the hood, this release includes a unified OpenAPI layer for handling CRUD operations, which is used by the new fastify adapter and will also be the foundation for other upcoming new server-side adapters.
ZenStack Release v1.0.0-alpha.62
What's Changed
- Added
@@schema
attribute for supporting "multi-schema setup" - Fixed code generation issue in monorepo environment
- Fixed package manager detection issue in monorepro environment
Thanks to @digoburigo for reporting the multi-schema issue.
Thanks to @keanugrieves for reporting mono-repro problems.