Skip to content

merge dev to main (v2.12.3) #2043

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zenstack-monorepo",
"version": "2.12.2",
"version": "2.12.3",
"description": "",
"scripts": {
"build": "pnpm -r --filter=\"!./packages/ide/*\" build",
Expand Down
2 changes: 1 addition & 1 deletion packages/ide/jetbrains/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
}

group = "dev.zenstack"
version = "2.12.2"
version = "2.12.3"

repositories {
mavenCentral()
Expand Down
2 changes: 1 addition & 1 deletion packages/ide/jetbrains/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jetbrains",
"version": "2.12.2",
"version": "2.12.3",
"displayName": "ZenStack JetBrains IDE Plugin",
"description": "ZenStack JetBrains IDE plugin",
"homepage": "https://zenstack.dev",
Expand Down
2 changes: 1 addition & 1 deletion packages/language/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zenstackhq/language",
"version": "2.12.2",
"version": "2.12.3",
"displayName": "ZenStack modeling language compiler",
"description": "ZenStack modeling language compiler",
"homepage": "https://zenstack.dev",
Expand Down
2 changes: 1 addition & 1 deletion packages/misc/redwood/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@zenstackhq/redwood",
"displayName": "ZenStack RedwoodJS Integration",
"version": "2.12.2",
"version": "2.12.3",
"description": "CLI and runtime for integrating ZenStack with RedwoodJS projects.",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/openapi/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@zenstackhq/openapi",
"displayName": "ZenStack Plugin and Runtime for OpenAPI",
"version": "2.12.2",
"version": "2.12.3",
"description": "ZenStack plugin and runtime supporting OpenAPI",
"main": "index.js",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/swr/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@zenstackhq/swr",
"displayName": "ZenStack plugin for generating SWR hooks",
"version": "2.12.2",
"version": "2.12.3",
"description": "ZenStack plugin for generating SWR hooks",
"main": "index.js",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/tanstack-query/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@zenstackhq/tanstack-query",
"displayName": "ZenStack plugin for generating tanstack-query hooks",
"version": "2.12.2",
"version": "2.12.3",
"description": "ZenStack plugin for generating tanstack-query hooks",
"main": "index.js",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/trpc/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@zenstackhq/trpc",
"displayName": "ZenStack plugin for tRPC",
"version": "2.12.2",
"version": "2.12.3",
"description": "ZenStack plugin for tRPC",
"main": "index.js",
"repository": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"postinstall": "nuxt prepare"
},
"dependencies": {
"@prisma/client": "6.4.x",
"@prisma/client": "6.5.x",
"@trpc/client": "^10.45.2",
"@trpc/server": "^10.45.2",
"nuxt": "^3.14.1592",
Expand All @@ -21,7 +21,7 @@
},
"devDependencies": {
"esbuild": "^0.24.0",
"prisma": "6.4.x",
"prisma": "6.5.x",
"typescript": "^5.6.2",
"vue-tsc": "^2.1.10"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"postinstall": "nuxt prepare"
},
"dependencies": {
"@prisma/client": "6.4.x",
"@prisma/client": "6.5.x",
"@trpc/client": "^11.0.0-rc.563",
"@trpc/server": "^11.0.0-rc.563",
"nuxt": "^3.14.1592",
Expand All @@ -21,7 +21,7 @@
},
"devDependencies": {
"esbuild": "^0.24.0",
"prisma": "6.4.x",
"prisma": "6.5.x",
"typescript": "^5.6.2",
"vue-tsc": "^2.1.10"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/trpc/tests/projects/t3-trpc-v11/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"start": "next start"
},
"dependencies": {
"@prisma/client": "6.4.x",
"@prisma/client": "6.5.x",
"@t3-oss/env-nextjs": "^0.10.1",
"@tanstack/react-query": "^5.50.0",
"@trpc/client": "^11.0.0-rc.446",
Expand All @@ -39,7 +39,7 @@
"@typescript-eslint/parser": "^8.1.0",
"eslint": "^8.57.0",
"eslint-config-next": "^14.2.4",
"prisma": "6.4.x",
"prisma": "6.5.x",
"typescript": "^5.5.3"
},
"ct3aMetadata": {
Expand Down
4 changes: 2 additions & 2 deletions packages/runtime/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@zenstackhq/runtime",
"displayName": "ZenStack Runtime Library",
"version": "2.12.2",
"version": "2.12.3",
"description": "Runtime of ZenStack for both client-side and server-side environments.",
"repository": {
"type": "git",
Expand Down Expand Up @@ -115,7 +115,7 @@
"zod-validation-error": "^1.5.0"
},
"peerDependencies": {
"@prisma/client": "5.0.0 - 6.4.x"
"@prisma/client": "5.0.0 - 6.5.x"
},
"author": {
"name": "ZenStack Team"
Expand Down
6 changes: 3 additions & 3 deletions packages/schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"publisher": "zenstack",
"displayName": "ZenStack Language Tools",
"description": "FullStack enhancement for Prisma ORM: seamless integration from database to UI",
"version": "2.12.2",
"version": "2.12.3",
"author": {
"name": "ZenStack Team"
},
Expand Down Expand Up @@ -123,10 +123,10 @@
"zod-validation-error": "^1.5.0"
},
"peerDependencies": {
"prisma": "5.0.0 - 6.4.x"
"prisma": "5.0.0 - 6.5.x"
},
"devDependencies": {
"@prisma/client": "6.4.x",
"@prisma/client": "6.5.x",
"@types/async-exit-hook": "^2.0.0",
"@types/pluralize": "^0.0.29",
"@types/semver": "^7.3.13",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,12 @@ function assignableToAttributeParam(arg: AttributeArg, param: AttributeParam, at
if (dstType === 'ContextType') {
// ContextType is inferred from the attribute's container's type
if (isDataModelField(attr.$container)) {
// If the field is Typed JSON, and the param is @default, the argument must be a string
const dstIsTypedJson = hasAttribute(attr.$container, '@json');
if (dstIsTypedJson && param.default) {
return argResolvedType.decl === 'String';
}

dstIsArray = attr.$container.type.array;
}
}
Expand Down Expand Up @@ -327,6 +333,7 @@ function assignableToAttributeParam(arg: AttributeArg, param: AttributeParam, at
if (!attr.$container?.type?.type) {
return false;
}

dstType = mapBuiltinTypeToExpressionType(attr.$container.type.type);
dstIsArray = attr.$container.type.array;
} else {
Expand Down
5 changes: 3 additions & 2 deletions packages/schema/src/plugins/enhancer/enhance/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,9 @@ export type { PrismaClient };
private createLogicalPrismaEnhanceFunction(authTypeParam: string) {
const prismaVersion = getPrismaVersion();

// Prisma 5.16.0 introduced a new generic parameter to `DynamicClientExtensionThis`
const hasClientOptions = prismaVersion && semver.gte(prismaVersion, '5.16.0');
// Prisma 5.16.0...6.5.0 introduced a new generic parameter to `DynamicClientExtensionThis`
const hasClientOptions =
prismaVersion && semver.gte(prismaVersion, '5.16.0') && semver.lt(prismaVersion, '6.5.0');

return `
// overload for plain PrismaClient
Expand Down
4 changes: 3 additions & 1 deletion packages/schema/src/plugins/zod/transformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,9 @@ export default class Transformer {
if (replaceJsonWithTypeDef) {
const dmField = contextDataModel?.fields.find((f) => f.name === field.name);
if (isTypeDef(dmField?.type.reference?.ref)) {
alternatives = [`z.lazy(() => ${upperCaseFirst(dmField?.type.reference!.$refText)}Schema)`];
const isList = dmField.type.array;
const lazyStr = `z.lazy(() => ${upperCaseFirst(dmField.type.reference!.$refText)}Schema)`;
alternatives = [isList ? `${lazyStr}.array()` : lazyStr];
}
}

Expand Down
6 changes: 3 additions & 3 deletions packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zenstackhq/sdk",
"version": "2.12.2",
"version": "2.12.3",
"description": "ZenStack plugin development SDK",
"main": "index.js",
"scripts": {
Expand All @@ -18,8 +18,8 @@
"author": "",
"license": "MIT",
"dependencies": {
"@prisma/generator-helper": "6.4.x",
"@prisma/internals": "6.4.x",
"@prisma/generator-helper": "6.5.x",
"@prisma/internals": "6.5.x",
"@zenstackhq/language": "workspace:*",
"@zenstackhq/runtime": "workspace:*",
"langium": "1.3.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zenstackhq/server",
"version": "2.12.2",
"version": "2.12.3",
"displayName": "ZenStack Server-side Adapters",
"description": "ZenStack server-side adapters",
"homepage": "https://zenstack.dev",
Expand Down
2 changes: 1 addition & 1 deletion packages/testtools/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zenstackhq/testtools",
"version": "2.12.2",
"version": "2.12.3",
"description": "ZenStack Test Tools",
"main": "index.js",
"private": true,
Expand Down
Loading
Loading