-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
test(lib/data): ReplacementsSchema
#31714
test(lib/data): ReplacementsSchema
#31714
Conversation
d155531
to
89a2493
Compare
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.
Can we generate the schema automatically with zod-to-json-schema?
Will it be useful? ie. can we use thus generated schemas for better UX? |
Co-authored-by: HonkingGoose <[email protected]>
Co-authored-by: HonkingGoose <[email protected]>
We would not to have to manage a JSON and zod schema at the same time. |
Got that. For this we will need to add one step in the build process to save the schemas created using But, most users who come to add one replacement/monorepo won't run the build command I think as its not very necessary. |
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.
I, have meant that the json schema file still gets commited.
Though lets keep it like that. I guess there will be not many changes to the schema anyway.
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.
I'm happy with the text. I'll let the maintainers check the code and technical working.
🎉 This PR is included in version 38.124.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Changes
Add JsonSchema and ZodSchema for the
replacements.json
file.Context
It will help users detect errors when adding new replacements instantly + he updated file will get validated against the zod schema during CI, leading to quicker PR merges & less reviews.
Ref: #29942 (comment)
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: