Skip to content

Commit c648f6f

Browse files
Version Packages (next)
1 parent fcd2196 commit c648f6f

3 files changed

Lines changed: 61 additions & 3 deletions

File tree

.changeset/pre.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,10 @@
44
"initialVersions": {
55
"@vintl/vintl": "4.2.0"
66
},
7-
"changesets": []
7+
"changesets": [
8+
"happy-clocks-hug",
9+
"new-turkeys-pump",
10+
"olive-bugs-visit",
11+
"tender-zoos-shop"
12+
]
813
}

CHANGELOG.md

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,58 @@
11
# @vintl/vintl
22

3+
## 5.0.0-next.0
4+
5+
### Major Changes
6+
7+
- 997402a: Removed deprecated composables
8+
9+
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.
10+
11+
Here's how you migrate:
12+
13+
- Replace all uses of `useI18n` with `useVIntl`, the former was just an alias for `useVIntl` in the previous versions.
14+
- To retrieve translate function previously returned by `useTranslate`, destructure `formatMessage` function from the controller:
15+
16+
```js
17+
const { formatMessage } = useVIntl();
18+
```
19+
20+
It is bound to the controller and as such is safe to use on its own.
21+
22+
- To retrieve formatters previously returned by `useFormatters`, destructure `formats` property from the controller:
23+
24+
```js
25+
const { formats } = useVIntl();
26+
```
27+
28+
It is a reactively updated object and is also safe to use on its own.
29+
30+
- c2c6cb6: Bumped Vue version to 3.3.4
31+
32+
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.
33+
34+
### Minor Changes
35+
36+
- 5e746fa: Add more formatting components similar to ones found in `react-intl`:
37+
38+
- `FormattedDate`, `FormattedDateParts`
39+
- `FormattedTime`, `FormattedTimeParts`
40+
- `FormattedDateTimeRange`
41+
- `FormattedRelativeTime` (doesn't update live like `react-intl`)
42+
- `FormattedNumber`, `FormattedNumberParts`
43+
- `FormattedPlural`
44+
- `FormattedList`, `FormattedListParts`
45+
- `FormattedDisplayName`
46+
- `FormattedMessage`
47+
48+
Slots can be used to receive the formatted values instead of being formatted as is.
49+
50+
`FormattedMessage` is very similar to `IntlFormatted`, but accepts descriptor properties and does not allow to format raw messages.
51+
52+
- b194662: Added `useMessages` composable
53+
54+
`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.
55+
356
## 4.4.1
457
558
### Patch Changes
@@ -20,7 +73,7 @@
2073
declare global {
2174
namespace VueIntlController {
2275
interface Options {
23-
globalMixin: false
76+
globalMixin: false;
2477
}
2578
}
2679
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vintl/vintl",
3-
"version": "4.4.1",
3+
"version": "5.0.0-next.0",
44
"description": "Integrate @formatjs/intl into your Vue apps for easier internationalisation",
55
"keywords": [
66
"i18n",

0 commit comments

Comments
 (0)