Skip to content

Commit

Permalink
Version Packages (next)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 11, 2023
1 parent 6580bf1 commit 0a18c24
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,10 @@
"initialVersions": {
"@vintl/vintl": "4.2.0"
},
"changesets": []
"changesets": [
"happy-clocks-hug",
"new-turkeys-pump",
"olive-bugs-visit",
"tender-zoos-shop"
]
}
53 changes: 53 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 0a18c24

Please sign in to comment.