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

fix!: mark return type for custom fields as optional #294

Merged
merged 5 commits into from
Oct 7, 2022

Conversation

LiamMartens
Copy link
Collaborator

This would be better from a type safety perspective since Sanity doesn't strictly require data to be available.

@codecov-commenter
Copy link

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage 👍

Coverage data is based on head (ea92108) compared to base (f9f4bba).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #294   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            7         7           
  Lines         1391      1394    +3     
  Branches        78        78           
=========================================
+ Hits          1391      1394    +3     
Impacted Files Coverage Δ
src/extractor.ts 100.00% <100.00%> (ø)
src/query/builder.ts 100.00% <100.00%> (ø)
src/schema/fields.ts 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@LiamMartens
Copy link
Collaborator Author

@danielroe if we get this through, what would you want to do from a version perspective? Since this will suddenly introduce a lot of type errors if they weren't checked properly before in people's codebases. Might be considered breaking.

@danielroe
Copy link
Owner

I agree. This is a right but breaking change.

Unrelated, but any chance you could upgrade your pnpm version or revert lockfile changes?

@danielroe danielroe changed the title feat: All fields can be optional fix!: mark return type for custom fields as optional Oct 7, 2022
@danielroe danielroe merged commit 3f34410 into main Oct 7, 2022
@danielroe danielroe deleted the feat/all-optional branch October 7, 2022 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants