Releases: zenstackhq/zenstack
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.
ZenStack Release v1.0.0-alpha.60
ZenStack Release v1.0.0-alpha.55
ZenStack Release v1.0.0-alpha.53
What's Changed
- Fixed regression in
@zenstackhq/react
hooks generator: now when a mutation succeeds but the result can't be read back, hook returnsundefined
instead of throwing an error - Similarly,
@zenstackhq/trpc
generated routers returnundefined
when result can't be read back - Cleaned up unnecessary peer dependencies in
@zenstackhq/runtime
- When running
zenstack init
, install Prisma if not found #219 - VSCode: don't show validation errors when there're syntax errors #221
- Allow both "PUT" and "PATCH" HTTP verbs for "update" and "updateMany"
- Fixed support for using empty array as default field value
- Carry over
@@map
and@map
attributes from zmodel to prisma schema
Please upgrade your VSCode extension too (v1.0.7).
ZenStack Release v1.0.0-alpha.45
What's Changed
- fixed incorrect HTTP method for react hooks generated for "upsert" action
- relation filters, both for *-to-many filter (some/none/every) and *-to-one filter (is/isNot), now recognize access policies
- fixed bugs around policy evaluation for nested update/delete for to-one relations
- next.js integration now supports setting a custom logger
ZenStack Release v1.0.0-alpha.40
What's Changed
- Pinned "langium" dependency version due to an issue in its latest release
ZenStack Release v1.0.0-alpha.33
What's Changed
- @zenstackhq/react, hooks are generated regardless if a model has access control rules
- Fixed the issue that triple slash comments cannot be used on some ZModel declarations #194
- Added support for
@@unique
constraint with multiple fields #196 - @zenstackhq/react, fixed error handling in generated hooks code
- improved VSCode extension's auto-formatting, added code action for adding the opposite side of relations
- Support using enums as field's default value #204
ZenStack Release v1.0.0-alpha.28
Road to V1
After listening to the feedback from our enthusiastic early adopters, we've decided to repackage ZenStack's features to meet the following goals:
Enhancing Prisma instead of hiding it
We started to build ZenStack because we really liked Prisma and thought it had more potential than an ORM. In pre-v1 versions, ZenStack tried to inherit the schema language from Prisma but hide it from a tooling point of view.
Feedback showed that fully replicating Prisma CLI didn't add much value. We've decided to focus on extending Prisma's schema where necessary and act like a transpiler that generates Prisma schema file into its standard location and leaves the ORM tasks - sync database schema, seeding database, generating migrations, etc., to the Prisma CLI.
Framework agnostic
Previous versions have a strong binding to Next.js at the surface, although the toolkit's core is independent. For the V1 release, ZenStack will be framework-agnostic, and there'll be integration packages and plugins for interfacing with various popular full-stack frameworks.
Flexible and extensible
The V1 release delivers its main features by wrapping standard PrismaClient instances. You can create an enhanced PrismaClient with features like access control, field validation, and field omission and use it with exactly the same API as regular Prisma.
This level of encapsulation allows more flexibility because you can use ZenStack entirely as a backend toolkit to save time writing explicit authorization code. On the other hand, you can also use it full-stack by leveraging its capability of creating RESTful services and generating client libraries to reduce your entire backend development work to a minimum (if any).
We've also exposed extensibility at the schema language level by introducing the new plugin
construct. Users can implement their own plugins for custom code generation with full access to the schema's AST.
Changes
-
Simplified
zenstack
CLI to do only project initialization and code generation. -
Added Prisma enhancement APIs -
withPolicy
,withOmit
,withPassword
andwithPresets
. -
Added
plugin
construct to ZModel language for implementing custom code generation. -
Added
future()
attribute function for accessing an entity's "post-update" state. -
Extracted Next.js integration to the
@zenstackhq/next
package. -
Extracted "react hooks generation" as the
@zenstackhq/react
plugin that can be enabled on-demand. -
Added
@zenstackhq/trpc
plugin for generating tRPC CRUD routers. -
Triple-slash comments are preserved when generating Prisma schema. Custom attributes are also output as triple-slash comments. It allows interoperability with existing Prisma generators that use the comment hack.
-
VS Code extension now supports auto-formatting.
-
Website is rebuilt with Docusaurus - better readability and better SEO.
We know it's a pretty big change, and would love to hear what you think about it. Please join our discord server and let's chat!