From 1351d0cc9ea5e40a6950a2a4833837d4c3472ae5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 23 Feb 2024 18:10:49 +0000 Subject: [PATCH] Version Packages (next) --- .changeset/pre.json | 7 +++++- CHANGELOG.md | 55 ++++++++++++++++++++++++++++++++++++++++++++- package.json | 2 +- 3 files changed, 61 insertions(+), 3 deletions(-) diff --git a/.changeset/pre.json b/.changeset/pre.json index 1b116ae..8c3bd74 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -4,5 +4,10 @@ "initialVersions": { "@vintl/vintl": "4.2.0" }, - "changesets": [] + "changesets": [ + "happy-clocks-hug", + "new-turkeys-pump", + "olive-bugs-visit", + "tender-zoos-shop" + ] } diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ba6bf3..2921808 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,58 @@ # @vintl/vintl +## 5.0.0-next.0 + +### Major Changes + +- 997402a: Removed deprecated composables + + Composables like `useI18n`, `useTranslate` and `useFormatters` were previously deprecated with the warning that they will be removed in the next major version. They now get removed as scheduled. + + Here's how you migrate: + + - Replace all uses of `useI18n` with `useVIntl`, the former was just an alias for `useVIntl` in the previous versions. + - To retrieve translate function previously returned by `useTranslate`, destructure `formatMessage` function from the controller: + + ```js + const { formatMessage } = useVIntl(); + ``` + + It is bound to the controller and as such is safe to use on its own. + + - To retrieve formatters previously returned by `useFormatters`, destructure `formats` property from the controller: + + ```js + const { formats } = useVIntl(); + ``` + + It is a reactively updated object and is also safe to use on its own. + +- c2c6cb6: Bumped Vue version to 3.3.4 + + We now require a newer Vue version because we are relying on functionality added in Vue 3.3, such as generic components. Since this is not compatible with the previous versions of Vue, this is marked as a breaking change. + +### Minor Changes + +- 5e746fa: Add more formatting components similar to ones found in `react-intl`: + + - `FormattedDate`, `FormattedDateParts` + - `FormattedTime`, `FormattedTimeParts` + - `FormattedDateTimeRange` + - `FormattedRelativeTime` (doesn't update live like `react-intl`) + - `FormattedNumber`, `FormattedNumberParts` + - `FormattedPlural` + - `FormattedList`, `FormattedListParts` + - `FormattedDisplayName` + - `FormattedMessage` + + Slots can be used to receive the formatted values instead of being formatted as is. + + `FormattedMessage` is very similar to `IntlFormatted`, but accepts descriptor properties and does not allow to format raw messages. + +- b194662: Added `useMessages` composable + + `useMessages` is the new composable that allows you to pass in an object with the extended message descriptors, and returns back a reactive object with the current messages. Extended message descriptors can contain values or formatters that will be used when interpreting the message. This allows you to create messages in a very inefferctive manner. + ## 4.4.1 ### Patch Changes @@ -20,7 +73,7 @@ declare global { namespace VueIntlController { interface Options { - globalMixin: false + globalMixin: false; } } } diff --git a/package.json b/package.json index eb7840a..61e01c1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@vintl/vintl", - "version": "4.4.1", + "version": "5.0.0-next.0", "description": "Integrate @formatjs/intl into your Vue apps for easier internationalisation", "keywords": [ "i18n",