Skip to content

Latest commit

 

History

History
1235 lines (468 loc) · 44.9 KB

CHANGELOG.md

File metadata and controls

1235 lines (468 loc) · 44.9 KB

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

5.8.6 (2020-10-10)

Note: Version bump only for package react-intl

5.8.5 (2020-10-08)

Note: Version bump only for package react-intl

5.8.4 (2020-10-01)

Note: Version bump only for package react-intl

5.8.3 (2020-09-25)

Note: Version bump only for package react-intl

5.8.2 (2020-09-18)

Bug Fixes

  • @formatjs/intl-displaynames: follow ES2021 spec and make type option required (#2103) (3e00688)

5.8.1 (2020-09-09)

Bug Fixes

  • react-intl: add typescript as peerDependency, fix #2066 (#2067) (c2fac57)
  • react-intl: fix TS typing entry point path (f01ab86)

5.8.0 (2020-08-30)

Features

  • react-intl: upgrade TS to 4.0 (15fe44e)

5.7.2 (2020-08-28)

Note: Version bump only for package react-intl

5.7.1 (2020-08-25)

Note: Version bump only for package react-intl

5.7.0 (2020-08-23)

Features

5.6.10 (2020-08-22)

Note: Version bump only for package react-intl

5.6.9 (2020-08-21)

Note: Version bump only for package react-intl

5.6.8 (2020-08-20)

Bug Fixes

  • bump intl-messageformat-parser (8bbfa04)

5.6.7 (2020-08-19)

Note: Version bump only for package react-intl

5.6.6 (2020-08-19)

Note: Version bump only for package react-intl

5.6.5 (2020-08-18)

Note: Version bump only for package react-intl

5.6.4 (2020-08-17)

Note: Version bump only for package react-intl

5.6.3 (2020-08-15)

Bug Fixes

  • react-intl: fix err message conditions for defaultRichTextElements, fix #1972 (7e6f311)

5.6.2 (2020-08-15)

Note: Version bump only for package react-intl

5.6.1 (2020-08-14)

Note: Version bump only for package react-intl

5.6.0 (2020-08-14)

Features

  • react-intl: expose react-intl-no-parser.umd.js that does not contain intl-messageformat-parser, fix #1945 (5330073)

5.5.0 (2020-08-14)

Features

  • react-intl: add support for default rich text elements with defaultRichTextElements, fix #1752 (f18c6d3)
  • react-intl: tweak MessageDescriptor defaultMessage type to be AST as well (d110f8e)

5.4.8 (2020-08-13)

Note: Version bump only for package react-intl

5.4.7 (2020-08-11)

Note: Version bump only for package react-intl

5.4.6 (2020-08-06)

Bug Fixes

  • react-intl: fix Object.create(null) case for messages, fix #1914 (4a0f555)
  • react-intl: just use Object.prototype.hasOwnProperty.call instead (269adc4)

5.4.5 (2020-07-30)

Note: Version bump only for package react-intl

5.4.4 (2020-07-30)

Bug Fixes

  • react-intl: fix UMD build, re-enable functional tests (8257db7)

5.4.3 (2020-07-29)

Bug Fixes

  • react-intl: fix crash when message id is proto, fix #1885 (a42cdec)

5.4.2 (2020-07-25)

Bug Fixes

  • react-intl: hot path literal AST message rendering (1d726de)

5.4.1 (2020-07-24)

Note: Version bump only for package react-intl

5.4.0 (2020-07-21)

Features

  • @formatjs/intl-datetimeformat: adding implementation of tc39/proposal-intl-datetime-style (#1859) (e3c329e), closes #1847

5.3.2 (2020-07-17)

Bug Fixes

  • react-intl: add back react-intl.umd.js (ac4b435)

5.3.1 (2020-07-16)

Bug Fixes

  • react-intl: drop TS req to 3.8 (140dd37)

Reverts

  • Revert "feat(@formatjs/intl-utils): remove custom LDMLPluralRuleType and use TS3.9 type" (1a6eeac)

5.3.0 (2020-07-15)

Features

  • react-intl: add Enum support to defineMessages, fix #1677 (177420b)

5.2.2 (2020-07-14)

Bug Fixes

  • react-intl: fix rollup'ed type def file (bddb88e)

5.2.1 (2020-07-14)

Bug Fixes

  • react-intl: fix rollup'ed type def file (bddb88e)

5.2.0 (2020-07-14)

Bug Fixes

  • @formatjs/intl-displaynames: rm files restriction from package.json (b89a780)

Features

  • @formatjs/intl-utils: remove custom LDMLPluralRuleType and use TS3.9 type (8e433d5)

5.1.0 (2020-07-14)

Bug Fixes

  • react-intl: add original exception message to stack (b4e3f55)
  • react-intl: fix type issue for TS3.9 (97ef395)

Features

5.0.3 (2020-07-09)

Note: Version bump only for package react-intl

5.0.2 (2020-07-03)

Note: Version bump only for package react-intl

5.0.1 (2020-07-03)

Note: Version bump only for package react-intl

5.0.0 (2020-07-03)

Features

  • intl-messageformat: make FormatXMLElementFn non-variadic (f2963bf)
  • react-intl: fail fast when intl Provider is missing (42fa3c1)
  • react-intl: merge chunks in FormatXMLElementFn (1b5892f), closes #1623

BREAKING CHANGES

  • react-intl: This also comes from Dropbox internal developer feedback. FormattedMessage has a default English renderer that masks Provider setup issues which causes them to not be handled during testing phase.
  • intl-messageformat: This effectively change the signature for formatter function from (...chunks) => any to (chunks) => any. This solves a couple of issues:
  1. We received user feedback that variadic function is not as ergonomic
  2. Right now there's not way to distinguish between 2 chunks that have the same tag, e.g <b>on</b> and <b>on</b>. The function would receive 2 chunks that are identical. By consoliding to the 1st param we can reserve additional params to provide mode metadata in the future
  • react-intl: This turns rich text formatting callback function to non-variadic. So (...chunks) => React.ReactNode becomes (chunks) => React.ReactNode. This solves a couple of issues:
  1. We receive feedback that variadic callback fn is not ergonomic
  2. This solves the missing key issue when we render rich text
  3. This allows us to utilize extra param to distinguish when 2 React element are exactly the same except for their indices, e.g <b>one</b> and <b>one</b> and you want to render them differently

4.7.6 (2020-07-01)

Note: Version bump only for package react-intl

4.7.5 (2020-06-26)

Note: Version bump only for package react-intl

4.7.4 (2020-06-26)

Note: Version bump only for package react-intl

4.7.3 (2020-06-26)

Bug Fixes

4.7.2 (2020-06-23)

Note: Version bump only for package react-intl

4.7.1 (2020-06-23)

Note: Version bump only for package react-intl

4.7.0 (2020-06-23)

Features

  • @formatjs/intl-datetimeformat: generate rolluped d.ts (c6c9b19), closes #1739

4.6.10 (2020-06-20)

Bug Fixes

  • react-intl: add children prop type to IntlProvider (#1717) (94db34b)
  • react-intl: add children typing to injectIntl (#1716) (90fbd5f)
  • react-intl: Remove values: {} from FormattedMessage defaultProps (f80648c), closes #1706

4.6.9 (2020-06-06)

Note: Version bump only for package react-intl

4.6.8 (2020-06-06)

Note: Version bump only for package react-intl

4.6.7 (2020-06-06)

Bug Fixes

  • react-intl: Allow ES2020 options for DateTimeFormat, fix #1695 (27d02ee)

4.6.6 (2020-06-04)

Note: Version bump only for package react-intl

4.6.5 (2020-06-04)

Note: Version bump only for package react-intl

4.6.4 (2020-06-03)

Note: Version bump only for package react-intl

4.6.3 (2020-05-28)

Note: Version bump only for package react-intl

4.6.2 (2020-05-28)

Bug Fixes

  • react-intl: export all errors, fix types (0920323)

4.6.1 (2020-05-27)

Bug Fixes

  • react-intl: Fix formatMessage types when format function returns a string (3de8077)

4.6.0 (2020-05-27)

Bug Fixes

  • website: editorial fixes of Intl.NumberFormat links (#1690) (1b4a248)

Features

  • formatjs-extract-cldr-data: rm this package (62bdd32)

4.5.12 (2020-05-25)

Note: Version bump only for package react-intl

4.5.11 (2020-05-23)

Note: Version bump only for package react-intl

4.5.10 (2020-05-23)

Note: Version bump only for package react-intl

4.5.9 (2020-05-22)

Bug Fixes

  • eslint-plugin-formatjs: add no-id to index (8e5c0af)

4.5.8 (2020-05-21)

Bug Fixes

  • react-intl: hot path message lookup without values (1e58679)

4.5.7 (2020-05-21)

Note: Version bump only for package react-intl

4.5.6 (2020-05-21)

Bug Fixes

  • @formatjs/intl-numberformat: rename intl-unified-numberformat to intl-numberformat (8f183d3)

4.5.5 (2020-05-18)

Bug Fixes

  • react-intl: reduce onError chattiness (42d0ac4)

4.5.4 (2020-05-16)

Note: Version bump only for package react-intl

4.5.3 (2020-05-06)

Note: Version bump only for package react-intl

4.5.2 (2020-05-05)

Bug Fixes

  • react-intl: envify dist/react-intl.js so we do not leak process.env (43a54d6)

4.5.1 (2020-04-28)

Note: Version bump only for package react-intl

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

4.5.0 (2020-04-20)

Features

  • upgrade intl-messageformat & parser (cbbd6cf)

4.4.0 (2020-04-14)

Features

  • add defineMessage macro to tag single message (8bd9ad8)

4.3.1 (2020-03-28)

Bug Fixes

  • tweak FormatXMLElementFn (a914dc0)

4.3.0 (2020-03-26)

Features

  • react-intl: store original message descriptor in the error (22531bd)

4.2.2 (2020-03-21)

Bug Fixes

  • turn on preserveConstEnums so we export ReactIntlErrorCode (8e00610)

4.2.1 (2020-03-21)

Bug Fixes

  • include intl-displaynames types in bundled react-intl.d.ts (77ef36c)

4.2.0 (2020-03-21)

Features

  • add wrapRichTextChunksInFragment option (7864e1c)

4.1.1 (2020-03-06)

Bug Fixes

  • dont warn if locale is the same as defaultLocale (c8b178b), closes #1594

4.1.0 (2020-03-05)

Features

  • Introduce ReactIntlErrorCode so we can distinguish and log things differently (5b2b034)

4.0.0 (2020-03-05)

⚠ BREAKING CHANGES

  • This release contains subtle changes to the way we handle embedded HTML Message:
  1. 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> })
  1. We don't allow formatting self-closing tags because we already use ICU {placeholder} syntax for that.
  2. XML/HTML tags are escaped using apostrophe just like other ICU constructs.
  3. Remove dependency on DOMParser and restrictions on void element like <link>. This effectively means you don't need to polyfill DOMParser in Node anymore.
  4. FormattedHTMLMessage & intl.formatHTMLMessage have been removed since FormattedMessage 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 that FormattedMessage 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.

Features

  • Upgrade intl-messageformat & intl-messageformat-parser, remove FormattedHTMLMessage (fae69e9)

3.12.1 (2020-03-04)

Bug Fixes

3.12.0 (2020-02-04)

Features

3.11.0 (2020-01-09)

Features

Bug Fixes

  • add a parser for chunks emitted from formatHTMLMessage (#1550) (8c3c5c7)
  • update formatjs deps (1745c21)

3.10.0 (2019-12-26)

Features

  • Upgrade intl-unified-numberformat & TypeScript (ddf411a)

3.9.2 (2019-12-10)

Bug Fixes

  • add type overload for formatList, fix #1537 (6629899)
  • fix list formatter generation types (0e5f205)

3.9.1 (2019-12-02)

Bug Fixes

  • Add src to packaged tar for sourcemap (bce9bc7)

3.9.0 (2019-12-02)

Features

  • Upgrade intl-messageformat-parser with support for unit-width in skeleton (4b8f09f)

3.8.0 (2019-12-01)

Features

  • 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)

Features

  • 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)

Bug Fixes

  • fix main types file path in package.json (14048bb)

3.6.1 (2019-11-19)

Bug Fixes

  • make id optional in MessageDescriptor (15ca429)
  • use files instead of .npmignore, update contributors (b0c0fdb)

3.6.0 (2019-11-12)

Bug Fixes

  • remove babel.config.js from npm package (5c1f1ed), closes #1512

3.5.0 (2019-11-10)

Features

  • add formatList & FormattedList (#1494) (f5eacbf)
  • alias defineMessages to @formatjs/macro and deprecate our own (f6ab2f1)

3.4.0 (2019-10-23)

Bug Fixes

Features

  • add support for unified numberformat new options, fix #1501 (ff2629b)

3.3.2 (2019-09-27)

Bug Fixes

  • merge timeZone into formats when formatting message (aea3f56), closes #1219
  • remove custom unescaping of static message (aefb68b)

3.3.1 (2019-09-26)

Bug Fixes

  • properly override timeZone in formats/defaultFormats (f2b93e6), closes #1219

3.3.0 (2019-09-19)

Bug Fixes

Features

  • mark react-intl as side effect free (704a964)

3.2.4 (2019-09-19)

Bug Fixes

3.2.3 (2019-09-18)

Bug Fixes

  • check PluralRules & RelativeTimeFormat lazily instead (3ed95fe), closes #1487

3.2.2 (2019-09-17)

3.2.1 (2019-09-09)

Bug Fixes

  • upgrade intl-messageformat (40aa758)

3.2.0 (2019-09-04)

3.2.0-rc.2 (2019-08-29)

Bug Fixes

  • fix tests & add corresponding formatToParts fns (855e272)

Features

3.2.0-rc.1 (2019-08-29)

3.2.0-rc.0 (2019-08-29)

Features

3.1.13 (2019-08-28)

Bug Fixes

  • handle relative time when it hits 0 (3b9df15), closes #1455

3.1.12 (2019-08-26)

Bug Fixes

3.1.11 (2019-08-21)

Bug Fixes

3.1.10 (2019-08-20)

Bug Fixes

3.1.9 (2019-08-16)

Bug Fixes

3.1.8 (2019-08-13)

Bug Fixes

3.1.7 (2019-08-13)

Bug Fixes

3.1.6 (2019-08-12)

Bug Fixes

3.1.5 (2019-08-11)

Bug Fixes

  • drop @types/react version to 16.0 (1669f0e)

3.1.4 (2019-08-11)

Bug Fixes

3.1.3 (2019-08-09)

Bug Fixes

  • 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)

Bug Fixes

  • allow string in formatDate & formatTime (aed8c68), closes #1396
  • formatRelativeTime type def unit param (cb7da58)
  • remove contextType usage (660a546)

3.1.1 (2019-08-02)

Bug Fixes

  • only createIntl from filteredProps (d665f31)

3.1.0 (2019-08-06)

Bug Fixes

Features

  • generate .mjs instead of lib (5fd070d)

3.0.0 (2019-08-06)

Bug Fixes

  • 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)

Features

3.0.0-beta.22 (2019-07-29)

Bug Fixes

  • rm componentWillReceiveProps from relative (964159b)

Features

  • upgrade intl-messageformat with new apostrophe escape (f59607e)

3.0.0-beta.21 (2019-07-28)

Bug Fixes

  • fix doc for rich text formatting (00cbf80)
  • FormattedRelativeTime with high seconds values (#1385) (a7f1dfa)

3.0.0-beta.20 (2019-07-25)

Bug Fixes

  • upgrade intl-messageformat and tests (1dfe7fd)

3.0.0-beta.19 (2019-07-25)

Features

  • 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)

Bug Fixes

  • types: Change type to allow autocompletion and existence checking (#1368) (20d39e6)

Features

3.0.0-beta.17 (2019-07-11)

Bug Fixes

3.0.0-beta.16 (2019-07-09)

Features

3.0.0-beta.15 (2019-06-28)

Bug Fixes

Features

3.0.0-beta.14 (2019-07-03)

Bug Fixes

  • deps: move @formatjs/intl-relativetimeformat to deps (#1349) (310bb62)

3.0.0-beta.13 (2019-07-03)

Bug Fixes