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

feat: backport extended media API response #58

Merged
merged 1 commit into from
May 24, 2024

Conversation

lihbr
Copy link
Member

@lihbr lihbr commented May 23, 2024

Types of changes

  • Chore (a non-breaking change which is related to package maintenance)
  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Related: https://github.com/prismicio/prismic-web/pull/134

@prismicio/react still relies on @prismicio/richtext which relies on @prismicio/types. This makes types expected from @prismicio/react inconsistent with types generated from @prismicio/client. This PR backports new media API response types for types to match (which perhaps also solves other problems)

In the near future I think we'll need a plan to update @prismicio/react not to use @prismicio/richtext anymore but @prismicio/client/richtext instead (which was my plan first, but I wasn't sure how you wanted to handle the peer dependency of @prismicio/client then as I don't think it can be promoted to a regular dependency there? (that's how it's done with Vue.js though 🤷‍♀️)

Checklist:

  • My change requires an update to the official documentation.
  • All TSDoc comments are up-to-date and new ones have been added where necessary.
  • All new and existing tests are passing.

@lihbr lihbr requested a review from angeloashmore May 23, 2024 15:30
@angeloashmore
Copy link
Member

angeloashmore commented May 24, 2024

Let's go with this fix for now. The long-term fix is what you described: update @prismicio/react (and others, maybe) to use @prismicio/client/richtext. That will probably be best done in a major version—something we won't do until at least next quarter.

@angeloashmore angeloashmore merged commit ef1d286 into master May 24, 2024
1 check passed
@angeloashmore angeloashmore deleted the lh/backport-extended-media-types branch May 24, 2024 01:28
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.

2 participants