-
-
Notifications
You must be signed in to change notification settings - Fork 12
fix: make helpers package browser-compatible, fix update args validation #90
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
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
A concise summary of the purpose of the PR, followed by summarized bullets of key changes
- Remove the Node‐only
findUphelper from common-helpers to support browser compatibility, inlining it where needed - Update
TsSchemaGenerator.generateto emit separateschema.tsandmodels.tsinto an output directory - Refactor update‐argument validation to produce a union of checked/unchecked input schemas and add a test for Prisma typing variants
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| samples/blog/zenstack/schema.zmodel | Added /// documentation comments for models and enums |
| packages/common-helpers/src/index.ts | Removed find-up export to make package browser-compatible |
| packages/common-helpers/src/find-up.ts | Deleted server-only helper file |
| packages/cli/src/actions/generate.ts | Updated TsSchemaGenerator.generate calls to use output directory |
| packages/cli/src/actions/action-utils.ts | Inlined findUp implementation and removed external helper import |
| packages/testtools/src/schema.ts | Updated generator usage to pass output directory |
| packages/sdk/src/ts-schema-generator.ts | Refactored generation to split schema and models output into directory |
| packages/runtime/src/client/crud/validator.ts | Refactored makeUpdateDataSchema to support checked/unchecked variants |
| packages/runtime/test/client-api/update.test.ts | Added test for Prisma checked/unchecked update typing |
| packages/runtime/test/typing/generate.ts | Updated generator usage to pass output directory |
| TODO.md | Added pending item for strict typing of checked/unchecked input |
Comments suppressed due to low confidence (1)
packages/cli/src/actions/action-utils.ts:1
- The
findUpfunction at the bottom usesfsandpathbut these modules are not imported; please addimport fs from 'fs'andimport path from 'path'at the top of the file.
import { loadDocument } from '@zenstackhq/language';
No description provided.