Releases: vintl-dev/nuxt
@vintl/[email protected]
Patch Changes
-
4244794: Add missing prepack script
1.9.1 contained no files because during the switch I've forgotten the
prepackscript. This fixes that and brings back the files 💀
@vintl/[email protected]
Patch Changes
-
a26c360: Switch to the official Nuxt module template
This should resolve any issues with our Nuxt-specific imports, e.g., breakage of the Nuxt injections (added through
provides in plugins) due to the invalidPlugintype specified by our package (sorry for that!).
@vintl/[email protected]
Minor Changes
-
efdcdb9: Replaced Zod validation with a much simpler normalization and assertion 🚀
This brings a huge TypeScript performance boost for both maintainers and users of the module.
Developers using the module will also be happy to discover that each option is now documented (they always were, but documentation was erased from Zod inferred types by TypeScript) and each type used in options can be exported if you need to programatically extend the options.
Better yet? Common mistakes are still checked and pretty printed!
See the full explanation for decision to switch from Zod in the commit message.
🐞 If you stumble upon a bug caused by this switch, please report them on issue tracker.
Patch Changes
- 9e42c63: Fixed a typo in message about message that cannot be parsed
@vintl/[email protected]
Patch Changes
- 114d04a: Switched to a slightly more compatible
#appaugmentation
@vintl/[email protected]
Minor Changes
-
9d939c1: Switched to using module ID markers
Previously VIntl for Nuxt kept track of files that were used as locale messages and matched module IDs based on them. This, however, was very unreliable in certain environments.
With this change VIntl for Nuxt now uses ‘markers’, URL parameters added to the end of imported module IDs. This allows it to very quickly test whether a specific module is imported through a message file and should be processed by the VIntl unplugin.
@vintl/[email protected]
Patch Changes
-
6479891: VIntl updated to the latest version
Latest version of VIntl fixes missing type declarations for global properties, like
$t,$fmtand$i18n.We might add automatic handling for disabling of
controllerOpts.globalMixinin the future releases. You can follow the status update in #74.For now, if you disable global mixin, use the below augmentation to disable these unusable properties:
declare global { namespace VueIntlController { interface Options { globalMixin: false } } }
@vintl/[email protected]
Minor Changes
-
a9fdc59: Add support for parsing the messages in the error handlers
With update to
@vintl/unplugin, it's now possible to useparseMessagefrom the error handler's context to parse custom messages or re-parse the current message with any modified options.
@vintl/[email protected]
Minor Changes
-
81c23b0: Support for parsing error handling
@vintl/nuxtcan now handle errors when parsing message files containing broken messages in a configurable manner.You can configure how errors are handled using
onParseErrormodule option, which can either be a name of the built-in strategy, or a function that takes in context and optionally provides fallback message AST.Check out documentation for more information.
Patch Changes
-
2b5a59b: Unpin FormatJS dependencies
We proveviously had
@formatjs/intlpinned because of the broken ESM migration, however this has been fixed for quite some time already, so the pinned version has been to changed to a range, which ensures that@formatjs/intlcan be updated with latest bug fixes and improvements until the next major version.
@vintl/[email protected]
Minor Changes
-
979f2bd: Add more SEO options
Two options have been added to the SEO configuration:
-
defaultLocaleHasParameterallows to disable the host language parameter for the default locale.This is not recommended and not correct, because lack of the host language parameter instructs VIntl to use user's language (either the one they've used before or browser's one). However, it may be useful in some cases.
-
xDefaultHreflangallows to disable thex-defaulthreflang in case it's not useful to have (e.g. you disable the automatic language detection), although this is quite rare.
-
@vintl/[email protected]
Minor Changes
-
e1c501c: Improve alternate links generation
Generation of
alternatehreflanglinks has been improved to properly use absolute URLs.Since there's no good way to know the URL of the site, there's now also
seo.baseURLoption which allows to set site's proper domain.hostLanguageParamoption has been deperecated in favour ofseo.hostLanguageParameter, which functions almost the same way, except it does not acceptnull. If you want to disable generation of such tags or handle them yourself, you can setseo.enabledtofalse.See Configuration documentation page for more details.