All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.
4.5.3 (2020-05-06)
Note: Version bump only for package react-intl
4.5.2 (2020-05-05)
- react-intl: envify dist/react-intl.js so we do not leak process.env (43a54d6)
Note: Version bump only for package react-intl
All notable changes to this project will be documented in this file. See standard-version for commit guidelines.
4.5.0 (2020-04-20)
- upgrade intl-messageformat & parser (cbbd6cf)
4.4.0 (2020-04-14)
- add
defineMessage
macro to tag single message (8bd9ad8)
4.3.1 (2020-03-28)
- tweak FormatXMLElementFn (a914dc0)
4.3.0 (2020-03-26)
- react-intl: store original message descriptor in the error (22531bd)
4.2.2 (2020-03-21)
- turn on preserveConstEnums so we export ReactIntlErrorCode (8e00610)
4.2.1 (2020-03-21)
- include intl-displaynames types in bundled react-intl.d.ts (77ef36c)
4.2.0 (2020-03-21)
- add wrapRichTextChunksInFragment option (7864e1c)
4.1.1 (2020-03-06)
4.1.0 (2020-03-05)
- Introduce ReactIntlErrorCode so we can distinguish and log things differently (5b2b034)
4.0.0 (2020-03-05)
- This release contains subtle changes to the way we handle embedded HTML Message:
- All tags specified must have corresponding values and will throw error if it's missing, e.g:
new IntlMessageFormat("a<b>strong</b>").format({ b: (...chunks) => <strong>chunks</strong> })
- We don't allow formatting self-closing tags because we already use ICU
{placeholder}
syntax for that. - XML/HTML tags are escaped using apostrophe just like other ICU constructs.
- Remove dependency on DOMParser and restrictions on void element like
<link>
. This effectively means you don't need to polyfill DOMParser in Node anymore. FormattedHTMLMessage
&intl.formatHTMLMessage
have been removed sinceFormattedMessage
now fully supports embedded HTML tag.
Why are we doing those changes?
FormattedHTMLMessage
&intl.formatHTMLMessage
were originally created when React was fairly new. These components helped ease migration over from raw HTML to JSX. Given that current popularity of React right now and the fact thatFormattedMessage
allow rendering embedded HTML tag, this is no longer needed.- Initially during the 1st iteration of embedded HTML support, we allow any tag that doesn’t have a corresponding formatter to be rendered as raw HTML. We’ve received feedbacks internally that allowing embedded HTML tag to be rendered as-is without sanitization is a XSS security risk. Therefore, in order to allow raw HTML tag you have to opt-in by escaping them using apostrophe. We will update our linter to check for this as well.
- Upgrade intl-messageformat & intl-messageformat-parser, remove FormattedHTMLMessage (fae69e9)
3.12.1 (2020-03-04)
3.12.0 (2020-02-04)
3.11.0 (2020-01-09)
- add a parser for chunks emitted from formatHTMLMessage (#1550) (8c3c5c7)
- update formatjs deps (1745c21)
3.10.0 (2019-12-26)
- Upgrade intl-unified-numberformat & TypeScript (ddf411a)
3.9.2 (2019-12-10)
3.9.1 (2019-12-02)
- Add src to packaged tar for sourcemap (bce9bc7)
3.9.0 (2019-12-02)
- Upgrade intl-messageformat-parser with support for unit-width in skeleton (4b8f09f)
3.8.0 (2019-12-01)
- Upgrade intl-messageformat-parser (c12c99d)
Following our previous release with preliminary DateTimeFormat's skeleton parser, this release comes with a subset of ICU NumberFormat's skeleton parser. The full feature set can be found here.
This, in combination with intl-unified-numberformat allows you to write shorthand
NumberFormat in your messages like {amount, number, ::currency/CAD .00}
3.7.0 (2019-11-25)
- Introduce support for DateTime skeleton (568d013)
This bumps the version of intl-messageformat
, thus introducing a
subset of
DateTime Skeleton
to react-intl.
The skeleton syntax per ICU is today is {ts, time, ::yyyyMMdd}
.
Further documentation can be read at
http://userguide.icu-project.org/formatparse/datetime.
3.6.2 (2019-11-21)
- fix main types file path in package.json (14048bb)
3.6.1 (2019-11-19)
- make
id
optional in MessageDescriptor (15ca429) - use
files
instead of .npmignore, update contributors (b0c0fdb)
3.6.0 (2019-11-12)
3.5.0 (2019-11-10)
- add
formatList
&FormattedList
(#1494) (f5eacbf) - alias
defineMessages
to@formatjs/macro
and deprecate our own (f6ab2f1)
3.4.0 (2019-10-23)
3.3.2 (2019-09-27)
- merge timeZone into formats when formatting message (aea3f56), closes #1219
- remove custom unescaping of static message (aefb68b)
3.3.1 (2019-09-26)
3.3.0 (2019-09-19)
- mark react-intl as side effect free (704a964)
3.2.4 (2019-09-19)
3.2.3 (2019-09-18)
3.2.2 (2019-09-17)
3.2.1 (2019-09-09)
- upgrade intl-messageformat (40aa758)
3.2.0 (2019-09-04)
3.2.0-rc.2 (2019-08-29)
- fix tests & add corresponding formatToParts fns (855e272)
3.2.0-rc.1 (2019-08-29)
3.2.0-rc.0 (2019-08-29)
3.1.13 (2019-08-28)
3.1.12 (2019-08-26)
- type def for forwardRef in injectIntl, fix #1444 (45887bf)
- update intl-messageformat (d1271b6), closes #1451 #1442
3.1.11 (2019-08-21)
3.1.10 (2019-08-20)
3.1.9 (2019-08-16)
- fix UMD build (ad78e3f), closes #1423
- move react & @types/react to devDep, fixes #1389 (0133241), closes /github.com/yarnpkg/yarn/issues/3951#issuecomment-316424639
3.1.8 (2019-08-13)
3.1.7 (2019-08-13)
- avoid wrapping components with injectIntl (#1413), fixes #1412 (ce560e7)
- fix state typo, fixes #1411 (46ad1c8)
3.1.6 (2019-08-12)
3.1.5 (2019-08-11)
- drop @types/react version to 16.0 (1669f0e)
3.1.4 (2019-08-11)
- Fix broken links in Getting Started (fix #1403) (#1405) (57f0748)
- generate lib instead of mjs (99f9257), closes #1395 #1407
3.1.3 (2019-08-09)
- allow string in formatDate & formatTime (aed8c68), closes #1396
- create initial intl for Provider (4306275)
- formatRelativeTime type def unit param (cb7da58)
- remove contextType usage (660a546)
3.1.2 (2019-08-09)
- allow string in formatDate & formatTime (aed8c68), closes #1396
- formatRelativeTime type def unit param (cb7da58)
- remove contextType usage (660a546)
3.1.1 (2019-08-02)
- only createIntl from filteredProps (d665f31)
3.1.0 (2019-08-06)
- add "types" property to package.json (#1394) (a82ddd0)
- add createIntlCache to top level index, fixes #1393 (19398d7)
- generate .mjs instead of lib (5fd070d)
3.0.0 (2019-08-06)
- rm core pkg for now (223d2cf)
- rm rollup for core, reduce @types/react version (336d365)
- type definitions and make behavior match spec more (2030bdd)
3.0.0-beta.23 (2019-08-02)
3.0.0-beta.22 (2019-07-29)
- rm componentWillReceiveProps from relative (964159b)
- upgrade intl-messageformat with new apostrophe escape (f59607e)
3.0.0-beta.21 (2019-07-28)
- fix doc for rich text formatting (00cbf80)
- FormattedRelativeTime with high seconds values (#1385) (a7f1dfa)
3.0.0-beta.20 (2019-07-25)
- upgrade intl-messageformat and tests (1dfe7fd)
3.0.0-beta.19 (2019-07-25)
- allow formatDate and formatTime to take string type (#1369) (d110548)
- Allow formatting embedded XML (#1379) (61d3c1b)
- Upgrade guide implementing RelativeTime behavior (#1374) (f8ddcd0)
3.0.0-beta.18 (2019-07-12)
3.0.0-beta.17 (2019-07-11)
3.0.0-beta.16 (2019-07-09)
- expose a core bundle w/o parser (#1358) (0a6ca3f)
- support textComponent="", fixes #1330 (#1354) (3f27902)
- upgrade formatjs dev (#1357) (61b536b)
3.0.0-beta.15 (2019-06-28)
- escape defaultMessage properly, fixes #1158 (#1345) (96e9bae)
- reduce TS version to 3.3 (#1348) (6dfef2b)
- deps: move @formatjs/intl-relativetimeformat to deps (#1349) (310bb62)
- add standard-version (b656847)
- pass in formatters to IntlMessageFormat for perf (#1343) (303a4ea)
- switch to npm (#1334) (0eab294)
- Use React.Fragment as default textComponent (#1326) (6e03fa3)
- types: export WithIntlProps (#1350) (16d7ed9)
- types: export WrappedComponentProps (#1351) (af650b4)