-
Notifications
You must be signed in to change notification settings - Fork 418
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
fix(cli): improve error handling on missing extracted schema #6204
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
No changes to documentation |
Component Testing Report Updated Apr 4, 2024 5:32 PM (UTC)
|
9061cbc
to
1a01fa1
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.
thanks for the fixes, some feedback, but only 1 critical
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.
Agree with @sgulseth 's suggestions but otherwise 👍
Co-authored-by: Sindre Gulseth <sgulseth@gmail.com>
348bd5e
to
ef550f1
Compare
Description
When you run
sanity typegen generate
, a fairly common case is that one may have forgotten to runsanity schema extract
first. This currently gives a rather unhelpful error (if you're unfamiliar with the setup):With this PR, I propose that we give a more helpful error if you have not provided even a custom path for the schema:
I also noticed that using a
--config-path
flag did not work, only--configPath
. To be consistent with other CLI commands, I changed this to allow both forms.Testing
Added some basic tests to ensure that the different forms work and gives the expected output.
Notes for release
sanity schema extract
) could not be found when runningsanity typegen generate