Skip to content

Commit

Permalink
Improve changelog entries
Browse files Browse the repository at this point in the history
  • Loading branch information
brawaru committed Dec 13, 2023
1 parent 798c451 commit 2092f3e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions .changeset/happy-clocks-hug.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
'@vintl/vintl': minor
---

Add more formatting components similar to `react-intl`
Add more formatting components similar to ones found in `react-intl`:

- `FormattedDate`, `FormattedDateParts`
- `FormattedTime`, `FormattedTimeParts`
- `FormattedDateTimeRange`
- `FormattedRelativeTime` (static, unlike `react-intl`)
- `FormattedRelativeTime` (doesn't update live like `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).
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.
14 changes: 7 additions & 7 deletions .changeset/new-turkeys-pump.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@
'@vintl/vintl': major
---

Remove deprecated composables
Removed 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.
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.

Migration steps:
Here's how you migrate:

- Use `useVIntl` everywhere you used `useI18n`, the latter was just an alias for `useVIntl` in previous versions.
- 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
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
const { formats } = useVIntl()
```

It is reactively updated object and also safe to use on its own.
It is a reactively updated object and is also safe to use on its own.
4 changes: 2 additions & 2 deletions .changeset/olive-bugs-visit.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
'@vintl/vintl': major
---

Bump Vue version to 3.3.4
Bumped 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.
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.
4 changes: 2 additions & 2 deletions .changeset/tender-zoos-shop.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
'@vintl/vintl': minor
---

Add `useMessages` composable
Added `useMessages` composable

v5 introduces a new API that allows you to create messages more effectively.
`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.

0 comments on commit 2092f3e

Please sign in to comment.