Skip to content
This repository has been archived by the owner on May 6, 2023. It is now read-only.

Migrate to sanity v3 #171

Closed
saiichihashimoto opened this issue Dec 18, 2022 · 6 comments · Fixed by #175
Closed

Migrate to sanity v3 #171

saiichihashimoto opened this issue Dec 18, 2022 · 6 comments · Fixed by #175
Labels

Comments

@saiichihashimoto
Copy link
Owner

Mainly, migrating @sanity/types to 3.x.x

@mckelveygreg
Copy link
Contributor

With v3's defineType, defineField, and defineArrayMember, will we be able to use those built in sanity functions, but perhaps use this library to extract the resolved types that would be ready for exporting?

@saiichihashimoto
Copy link
Owner Author

saiichihashimoto commented Jan 5, 2023

@miklschmidt I have no idea, I don't know what those are. From what I gather, they give typescript hints to define schemas. Theoretically, it narrows the types enough that we could derive those types directly from the schemas. If so, great news! We can easily make a library that does that and deprecate this library. That would be amazing, I would love to get as close to using the native schemas as possible.

Aside from that, this task is mostly to make sure this library as-is works with @sanity/types: "^3.0.0".

@mckelveygreg
Copy link
Contributor

Lolz, I think you got me mixed up again, regardless thanks for the update!

I'm not sure how to derive the types myself, so I have some learning to do then!

@saiichihashimoto
Copy link
Owner Author

Lol yes I did. Sorry to both of you for that!

@saiichihashimoto
Copy link
Owner Author

And if you find a way to derive the types yourself, please make that a package. I'd love to make it, but I'm doing this whenever I happen to have time (rarely) and the amount of people who would want it is probably... everyone.

saiichihashimoto added a commit that referenced this issue Jan 5, 2023
Closes #171

BREAKING CHANGE: Sanity v2 is no longer supported. Initially, it may
still work with v2, but will not support it going forward.
@kodiakhq kodiakhq bot closed this as completed in #175 Jan 5, 2023
@github-actions
Copy link

github-actions bot commented Jan 5, 2023

🎉 This issue has been resolved in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants