Skip to content
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

merge dev to main (v2.1.0) #1438

Merged
merged 21 commits into from
May 12, 2024
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
b84241d
doc: add CodeRabbit in sponsor
jiashengguo May 7, 2024
fe85134
Export auth namespace on enhance.d.ts (#1412)
israelins85 May 7, 2024
0aa6ee9
feat: implementing permission checker (#1411)
ymc9 May 7, 2024
00250ea
chore(perm-checker): rename filter clause to where (#1413)
ymc9 May 7, 2024
153dd4f
fix(delegate): several generation issues (#1417)
ymc9 May 8, 2024
1243422
fix(delegate): fields from delegate models used in logical groups ins…
ymc9 May 8, 2024
1030770
feat: add `check` hooks generation to tanstack and swr plugins (#1422)
ymc9 May 9, 2024
c7b788d
chore: bump version (#1423)
ymc9 May 9, 2024
5806a4d
fix(zmodel): allow type names to be used as declaration names (#1424)
ymc9 May 9, 2024
3b38311
fix(trpc): make sure "import type" is used for type-only imports (#1425)
ymc9 May 9, 2024
bca13a7
fix(zod): generate optional field as `z.optional()` rather than `z.nu…
ymc9 May 9, 2024
cb50826
fix(zmodel): resolve `auth()` from all loaded and reachable documents…
ymc9 May 10, 2024
6a71742
fix: relation fields are included even if they are set `false` in sel…
ymc9 May 10, 2024
23a9bbb
fix: Validation error when @@unique attribute is defined in the diffe…
jiashengguo May 11, 2024
296ca25
fix: compatibility with Prisma's "omit" feature (#1432)
ymc9 May 11, 2024
2c7c82b
fix(zmodel): fix grammar ambiguity (#1433)
ymc9 May 11, 2024
273c107
fix(zod): createMany types shouldn't be generated when Prisma version…
ymc9 May 11, 2024
d2709f6
fix(trpc): temp workaround for Node.js importing from CJS module issu…
ymc9 May 11, 2024
6852958
fix(zmodel): enum is resolved to wrong element after merging base mod…
ymc9 May 12, 2024
a49b7b3
chore: misc code improvements (#1439)
ymc9 May 12, 2024
b22c6a3
fix: avoid importing prisma-related code into language server (#1441)
ymc9 May 12, 2024
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ Thank you for your support!

<table>
<tr>
<td align="center"><a href="https://github.com/coderabbitai"><img src="https://avatars.githubusercontent.com/u/132028505?v=4" width="100" style="border-radius:50%" alt="CodeRabbit"/><br />CodeRabbit</a></td>
<td align="center"><a href="https://github.com/j0hannr"><img src="https://avatars.githubusercontent.com/u/52762073?v=4" width="100" style="border-radius:50%" alt="Johann Rohn"/><br />Johann Rohn</a></td>

<td align="center"><a href="https://github.com/baenie"><img src="https://avatars.githubusercontent.com/u/58309104?v=4" width="100" style="border-radius:50%" alt="Benjamin Zecirovic"/><br />Benjamin Zecirovic</a></td>
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zenstack-monorepo",
"version": "2.0.3",
"version": "2.1.0",
"description": "",
"scripts": {
"build": "pnpm -r build",
Expand Down Expand Up @@ -29,7 +29,7 @@
"@typescript-eslint/parser": "^7.6.0",
"concurrently": "^7.4.0",
"copyfiles": "^2.4.1",
"eslint": "^8.56.0",
"eslint": "^8.57.0",
"eslint-plugin-jest": "^28.2.0",
"jest": "^29.7.0",
"replace-in-file": "^7.0.1",
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.0.3"
version = "2.1.0"

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.0.3",
"version": "2.1.0",
"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.0.3",
"version": "2.1.0",
"displayName": "ZenStack modeling language compiler",
"description": "ZenStack modeling language compiler",
"homepage": "https://zenstack.dev",
Expand Down
8 changes: 7 additions & 1 deletion packages/language/src/generated/ast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ export function isRegularID(item: unknown): item is RegularID {
return item === 'model' || item === 'enum' || item === 'attribute' || item === 'datasource' || item === 'plugin' || item === 'abstract' || item === 'in' || item === 'view' || item === 'import' || (typeof item === 'string' && (/[_a-zA-Z][\w_]*/.test(item)));
}

export type RegularIDWithTypeNames = 'Any' | 'BigInt' | 'Boolean' | 'Bytes' | 'DateTime' | 'Decimal' | 'Float' | 'Int' | 'Json' | 'Null' | 'Object' | 'String' | 'Unsupported' | RegularID;

export function isRegularIDWithTypeNames(item: unknown): item is RegularIDWithTypeNames {
return isRegularID(item) || item === 'String' || item === 'Boolean' || item === 'Int' || item === 'BigInt' || item === 'Float' || item === 'Decimal' || item === 'DateTime' || item === 'Json' || item === 'Bytes' || item === 'Null' || item === 'Object' || item === 'Any' || item === 'Unsupported';
}

export type TypeDeclaration = DataModel | Enum;

export const TypeDeclaration = 'TypeDeclaration';
Expand Down Expand Up @@ -288,7 +294,7 @@ export interface DataModelField extends AstNode {
readonly $type: 'DataModelField';
attributes: Array<DataModelFieldAttribute>
comments: Array<string>
name: RegularID
name: RegularIDWithTypeNames
type: DataModelFieldType
}

Expand Down
Loading
Loading