Skip to content

Conversation

kazupon
Copy link
Member

@kazupon kazupon commented Jul 14, 2024

No description provided.

@kazupon kazupon added the Type: Improvement Includes backwards-compatible fixes label Jul 14, 2024
Copy link

Deploying vue-i18n-next with  Cloudflare Pages  Cloudflare Pages

Latest commit: d38633f
Status: ✅  Deploy successful!
Preview URL: https://48929470.vue-i18n-next.pages.dev
Branch Preview URL: https://fix-vue-type-definition-exte.vue-i18n-next.pages.dev

View logs

@kazupon kazupon merged commit c18144d into master Jul 14, 2024
@kazupon kazupon deleted the fix/vue-type-definition-extending branch July 14, 2024 08:41
@BobbieGoede
Copy link
Member

I think we will need a patch release for v9 to also change the type augmentations to use 'vue' 😥 (relevant nuxt/nuxt#28542)

Due to Vue Router changing its augmentation, Nuxt is doing so too, mixed augmentation will break projects with v9.

@BobbieGoede
Copy link
Member

@kazupon
I've created a v9 branch based on e37cba0 which includes this change as well as c07fbe3 here https://github.com/BobbieGoede/vue-i18n-next/tree/v9

@kazupon
Copy link
Member Author

kazupon commented Aug 16, 2024

@BobbieGoede
Thanks!
I've made v9 branch in vue-i18n.

You can open the PR on it!

kazupon added a commit that referenced this pull request Aug 16, 2024
* fix: vue-i18n type definition for vue package (#1888)

* fix: vue-i18n-bridge type definition for vue package

---------

Co-authored-by: kazuya kawaguchi <kawakazu80@gmail.com>
@hinogi
Copy link
Contributor

hinogi commented Oct 1, 2024

problem persists with v10.0.0 and vue 3.5

@BobbieGoede
Copy link
Member

@hinogi
Can you open a new issue and provide a minimal reproduction? 🙏

@hinogi
Copy link
Contributor

hinogi commented Oct 1, 2024

I guess I am unable to do that. But I use Quasar and vite and I get TS2339 Property $t does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<__VLS_PublicProps, { "update:modelValue": (modelValue: string) => any }>...>

@Narretz
Copy link

Narretz commented Mar 19, 2025

Why was this changed? This breaks the legacy API, at least in some cases, see #1403

The MR / commit is missing an explanation for this change, which makes it difficult to find out what/if users of this package need to change something, or if it's a bug.

@Narretz Narretz mentioned this pull request Mar 19, 2025
4 tasks
@Narretz
Copy link

Narretz commented Mar 19, 2025

Ok, so this happens when other packages augment @vue/runtime-core instead of vue. For me,this was my own app, vue-router, and vue/apollo-option.

Still, this change/info is missing from the changelogs, as far as I can see: https://github.com/intlify/vue-i18n/blob/v9/CHANGELOG.md and https://github.com/intlify/vue-i18n/blob/c580c3a5baa6cc3e60e962ff8f6e95ad2372b135/CHANGELOG.md

@BobbieGoede
Copy link
Member

@Narretz
We (and all the other packages that did this) should never have augmented @vue/runtime-core, this incorrect augmentation only worked so long as all other packages did the same thing.

At some point packages were moving to the correct augmentation, augmenting vue, which gradually broke projects that have mixed augmentation usage. This is only a breaking change if your project or dependencies were using the incorrect augmentation.

@Narretz
Copy link

Narretz commented Mar 19, 2025

@BobbieGoede thanks for the clarification, but I still think it should be mentioned in the changelogs, just not as a not a breaking change. It still affects users and looks like a bug/breaking change.

In the linked thread users report problems as little as 3 weeks ago, so this issue has not been documented well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Improvement Includes backwards-compatible fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants