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..64fb6a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,58 @@ # @vintl/vintl +## 5.0.0-next.0 + +### Major Changes + +- 997402a: Remove deprecated composables + + Composables, such as `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. + + Migration steps: + + - Use `useVIntl` everywhere you used `useI18n`, the latter was just an alias for `useVIntl` in 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 reactively updated object and also safe to use on its own. + +- c2c6cb6: Bump Vue version to 3.3.4 + + We're now requiring a newer Vue version because we are relying on functionality added in Vue 3.3, such as generic components. Since it's not compatible with previous versions of Vue, this is marked as a breaking change. + +### Minor Changes + +- 5e746fa: Add more formatting components similar to `react-intl` + + - `FormattedDate`, `FormattedDateParts` + - `FormattedTime`, `FormattedTimeParts` + - `FormattedDateTimeRange` + - `FormattedRelativeTime` (static, unlike `react-intl`) + - `FormattedNumber`, `FormattedNumberParts` + - `FormattedPlural` + - `FormattedList`, `FormattedListParts` + - `FormattedDisplayName` + - `FormattedMessage` + + Since this is a Vue library, they use slots to pass formatted values (otherwise rendering them as is). + + `FormattedMessage` is very similar to `IntlFormatted`, but accepts descriptor properties and does not allow to format raw messages. + +- b194662: Add `useMessages` composable + + v5 introduces a new API that allows you to create messages more effectively. + ## 4.4.1 ### Patch Changes diff --git a/package.json b/package.json index aefe611..113c455 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",