diff --git a/packages/editor/CHANGELOG.md b/packages/editor/CHANGELOG.md index 06151fae584..db4c39185e9 100644 --- a/packages/editor/CHANGELOG.md +++ b/packages/editor/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.0.75](https://github.com/formatjs/formatjs/compare/@formatjs/editor@2.0.74...@formatjs/editor@2.0.75) (2025-03-24) + +**Note:** Version bump only for package @formatjs/editor + ## [2.0.74](https://github.com/formatjs/formatjs/compare/@formatjs/editor@2.0.73...@formatjs/editor@2.0.74) (2025-03-24) **Note:** Version bump only for package @formatjs/editor diff --git a/packages/editor/package.json b/packages/editor/package.json index d23cd489476..1ddcc4b4b86 100644 --- a/packages/editor/package.json +++ b/packages/editor/package.json @@ -1,6 +1,6 @@ { "name": "@formatjs/editor", - "version": "2.0.74", + "version": "2.0.75", "description": "A ICU MessageFormat Editor UI", "keywords": [ "intl", diff --git a/packages/react-intl/CHANGELOG.md b/packages/react-intl/CHANGELOG.md index 357bd4696ab..5f37246d337 100644 --- a/packages/react-intl/CHANGELOG.md +++ b/packages/react-intl/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [7.1.9](https://github.com/formatjs/formatjs/compare/react-intl@7.1.8...react-intl@7.1.9) (2025-03-24) + +### Bug Fixes + +* **react-intl:** only keyed if value is array, fix [#4915](https://github.com/formatjs/formatjs/issues/4915) ([404f5d9](https://github.com/formatjs/formatjs/commit/404f5d9473d65cbf9137e0e43f1e757d3c13f0f1)) - by @longlho + ## [7.1.8](https://github.com/formatjs/formatjs/compare/react-intl@7.1.7...react-intl@7.1.8) (2025-03-24) ### Bug Fixes diff --git a/packages/react-intl/package.json b/packages/react-intl/package.json index ba4b76b2ea0..a9cb1d24b0b 100644 --- a/packages/react-intl/package.json +++ b/packages/react-intl/package.json @@ -1,7 +1,7 @@ { "name": "react-intl", "description": "Internationalize React apps. This library provides React components and an API to format dates, numbers, and strings, including pluralization and handling translations.", - "version": "7.1.8", + "version": "7.1.9", "license": "BSD-3-Clause", "author": "Eric Ferraiuolo ", "sideEffects": false, diff --git a/packages/react-intl/src/components/createIntl.ts b/packages/react-intl/src/components/createIntl.ts index 0f6740b08eb..232df155978 100644 --- a/packages/react-intl/src/components/createIntl.ts +++ b/packages/react-intl/src/components/createIntl.ts @@ -63,7 +63,10 @@ const formatMessage: FormatMessageFn = ( values as any, ...rest ) - return toKeyedReactNodeArray(chunks) + if (Array.isArray(chunks)) { + return toKeyedReactNodeArray(chunks) + } + return chunks } /** diff --git a/packages/react-intl/tests/unit/components/message.test.tsx b/packages/react-intl/tests/unit/components/message.test.tsx index 0827b45f3a8..0f4bc757e08 100644 --- a/packages/react-intl/tests/unit/components/message.test.tsx +++ b/packages/react-intl/tests/unit/components/message.test.tsx @@ -104,6 +104,7 @@ describe('', () => { expect(getByTestId('comp')).toHaveTextContent( intl.formatMessage(descriptor, values) ) + expect(intl.formatMessage(descriptor, values)).toBe('Hello, Jest!') }) it('accepts string as `tagName` prop', () => { pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy