prismicio / prismic-vue

Vue plugin, components, and composables to fetch and present Prismic content
https://prismic.io/docs/technologies/vuejs
Apache License 2.0
65 stars 16 forks source link

fix: augment `vue` rather than `@vue/runtime-core` #71

Closed StevenPewsey closed 1 month ago

StevenPewsey commented 1 month ago

Types of changes

Description

For a while, in the Vue ecosystem we've been augmenting @vue/runtime-core to add custom properties and more to vue. However, this inadvertently breaks the types for projects that augment vue - which is (now?) the officially recommended in the docs way to augment these interfaces (for example, ComponentCustomProperties, GlobalComponents and so on).

This means all libraries must update their code (or it will break the types of the libraries that augment vue instead).

Here's an example of how the augmented types end up broken.

This PR is a small effort to ensure the ecosystem is consistent. For context, you can see that vue-router has https://github.com/vuejs/router/pull/2295, as well as https://github.com/nuxt/nuxt/pull/28542.

Checklist:

lihbr commented 1 month ago

Thank you so much! We'll release that soon ☺️

StevenPewsey commented 1 month ago

Hey @lihbr, thanks for merging! Do you know when this is going to be released?

This is preventing us from upgrading to the latest version of nuxt πŸ˜”

lihbr commented 1 month ago

Hi @StevenPewsey, thanks for pinging me! I was hoping #72 would get in faster but the other teams aren't there yet.

Anyway, just released a patch with your PR πŸŽ‰ 4.2.3 is out~!

StevenPewsey commented 1 month ago

@lihbr legend, thank you so much! ⭐