Skip to content

Commit

Permalink
Update VIntl to v4.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
brawaru committed Oct 30, 2023
1 parent ec67447 commit 6479891
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 83 deletions.
21 changes: 21 additions & 0 deletions .changeset/wet-terms-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
'@vintl/nuxt': patch
---

VIntl updated to the latest version

Latest version of VIntl fixes missing type declarations for global properties, like `$t`, `$fmt` and `$i18n`.

We might add automatic handling for disabling of `controllerOpts.globalMixin` in the future releases. You can follow the status update in [#74](https://github.com/vintl-dev/nuxt/issues/74).

For now, if you disable global mixin, use the below augmentation to disable these unusable properties:

```ts
declare global {
namespace VueIntlController {
interface Options {
globalMixin: false
}
}
}
```
5 changes: 2 additions & 3 deletions apps/playground/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const messages = defineMessages({
},
brokenMessage: {
id: 'broken-message',
defaultMessage: 'This is {broken, }'
defaultMessage: 'This is {broken, }',
},
} as const)
Expand Down Expand Up @@ -89,10 +89,9 @@ const useAutomatic = computed({
id="language-select"
v-model="currentLocale"
:disabled="vintl.automatic"
@change="onLocaleChange"
>
<option
v-for="locale in [...$nuxt.$i18n.$locales.value.keys()]"
v-for="locale in [...$i18n.$locales.value.keys()]"
:key="locale.tag"
:value="locale.tag"
>
Expand Down
2 changes: 1 addition & 1 deletion packages/vintl-nuxt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"@formatjs/intl-localematcher": "^0.4.2",
"@nuxt/kit": "^3.8.0",
"@vintl/unplugin": "^1.5.1",
"@vintl/vintl": "^4.3.0",
"@vintl/vintl": "^4.4.1",
"astring": "^1.8.6",
"consola": "^3.2.3",
"hash-sum": "^2.0.0",
Expand Down
114 changes: 35 additions & 79 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6479891

Please sign in to comment.