Skip to content

Commit

Permalink
merge dev to main (v2.1.2) (#1460)
Browse files Browse the repository at this point in the history
  • Loading branch information
ymc9 authored May 20, 2024
2 parents fea8ec7 + 37f4a3b commit 71a389c
Show file tree
Hide file tree
Showing 18 changed files with 37 additions and 19 deletions.
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.1.1",
"version": "2.1.2",
"description": "",
"scripts": {
"build": "pnpm -r 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.1.1"
version = "2.1.2"

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.1.1",
"version": "2.1.2",
"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.1.1",
"version": "2.1.2",
"displayName": "ZenStack modeling language compiler",
"description": "ZenStack modeling language compiler",
"homepage": "https://zenstack.dev",
Expand Down
2 changes: 1 addition & 1 deletion packages/language/src/generated/ast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ export interface EnumField extends AstNode {
readonly $type: 'EnumField';
attributes: Array<DataModelFieldAttribute>
comments: Array<string>
name: RegularID
name: RegularIDWithTypeNames
}

export const EnumField = 'EnumField';
Expand Down
4 changes: 2 additions & 2 deletions packages/language/src/generated/grammar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ export const ZModelGrammar = (): Grammar => loadedZModelGrammar ?? (loadedZModel
"terminal": {
"$type": "RuleCall",
"rule": {
"$ref": "#/rules@46"
"$ref": "#/rules@47"
},
"arguments": []
},
Expand Down Expand Up @@ -2357,7 +2357,7 @@ export const ZModelGrammar = (): Grammar => loadedZModelGrammar ?? (loadedZModel
"terminal": {
"$type": "RuleCall",
"rule": {
"$ref": "#/rules@46"
"$ref": "#/rules@47"
},
"arguments": []
}
Expand Down
4 changes: 2 additions & 2 deletions packages/language/src/zmodel.langium
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ NullExpr:
value='null';

ReferenceExpr:
target=[ReferenceTarget:RegularID] ('(' ReferenceArgList ')')?;
target=[ReferenceTarget:RegularIDWithTypeNames] ('(' ReferenceArgList ')')?;

fragment ReferenceArgList:
args+=ReferenceArg (',' args+=ReferenceArg)*;
Expand Down Expand Up @@ -209,7 +209,7 @@ Enum:

EnumField:
(comments+=TRIPLE_SLASH_COMMENT)*
name=RegularID (attributes+=DataModelFieldAttribute)*;
name=RegularIDWithTypeNames (attributes+=DataModelFieldAttribute)*;

// function
FunctionDecl:
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.1.1",
"version": "2.1.2",
"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.1.1",
"version": "2.1.2",
"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.1.1",
"version": "2.1.2",
"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.1.1",
"version": "2.1.2",
"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.1.1",
"version": "2.1.2",
"description": "ZenStack plugin for tRPC",
"main": "index.js",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion 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.1.1",
"version": "2.1.2",
"description": "Runtime of ZenStack for both client-side and server-side environments.",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion 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": "Build scalable web apps with minimum code by defining authorization and validation rules inside the data schema that closer to the database",
"version": "2.1.1",
"version": "2.1.2",
"author": {
"name": "ZenStack Team"
},
Expand Down
18 changes: 18 additions & 0 deletions packages/schema/tests/schema/parser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,24 @@ describe('Parsing Tests', () => {
expect((attrVal.value as ReferenceExpr).target.ref?.name).toBe('USER');
});

it('enum fields named with type name', async () => {
const content = `
enum MyEnum {
DateTime
Int
String
}
model User {
id String @id
role MyEnum @default(DateTime)
@@allow('all', role == String)
}
`;
await loadModel(content);
});

it('enum dup name resolve', async () => {
const content = `
datasource db {
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zenstackhq/sdk",
"version": "2.1.1",
"version": "2.1.2",
"description": "ZenStack plugin development SDK",
"main": "index.js",
"scripts": {
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.1.1",
"version": "2.1.2",
"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.1.1",
"version": "2.1.2",
"description": "ZenStack Test Tools",
"main": "index.js",
"private": true,
Expand Down

0 comments on commit 71a389c

Please sign in to comment.