Skip to content

Commit

Permalink
fix(zod): don't include fields marked @ignore in schemas (#1881)
Browse files Browse the repository at this point in the history
  • Loading branch information
ymc9 authored Nov 22, 2024
1 parent 0625234 commit b2ee7a4
Show file tree
Hide file tree
Showing 8 changed files with 370 additions and 48 deletions.
5 changes: 5 additions & 0 deletions packages/language/src/ast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ declare module './generated/ast' {
* Indicates whether the model is already merged with the base types
*/
$baseMerged?: boolean;

/**
* All fields including those marked with `@ignore`
*/
$allFields?: DataModelField[];
}
}

Expand Down
128 changes: 127 additions & 1 deletion packages/plugins/trpc/tests/projects/nuxt-trpc-v10/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"devDependencies": {
"esbuild": "^0.24.0",
"prisma": "^5.19.1",
"typescript": "^5.6.2"
"typescript": "^5.6.2",
"vue-tsc": "^2.1.10"
}
}
Loading

0 comments on commit b2ee7a4

Please sign in to comment.