From 9c40e832cc72427f3b1fc1a7556db22eaedbb0f3 Mon Sep 17 00:00:00 2001 From: Adriano Raiano Date: Thu, 20 Oct 2022 18:09:39 +0200 Subject: [PATCH] release --- CHANGELOG.md | 4 ++++ package-lock.json | 9 ++++++--- src/withTranslation.js | 1 + 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c84b0faa3..a4056519e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +### 12.0.0 + +- Update t function types to rely on types coming from i18next [1501](https://github.com/i18next/react-i18next/pull/1501) + ### 11.18.6 - types: nsMode [1554](https://github.com/i18next/react-i18next/issues/1554) diff --git a/package-lock.json b/package-lock.json index 8fae17802..0aa97fde5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17698,7 +17698,8 @@ "version": "5.3.1", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", - "dev": true + "dev": true, + "requires": {} }, "acorn-walk": { "version": "6.2.0", @@ -18184,7 +18185,8 @@ "version": "7.0.0-bridge.0", "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-7.0.0-bridge.0.tgz", "integrity": "sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg==", - "dev": true + "dev": true, + "requires": {} }, "babel-eslint": { "version": "10.1.0", @@ -22969,7 +22971,8 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", - "dev": true + "dev": true, + "requires": {} }, "jest-regex-util": { "version": "24.9.0", diff --git a/src/withTranslation.js b/src/withTranslation.js index b6dcda7e9..0914cf0d7 100644 --- a/src/withTranslation.js +++ b/src/withTranslation.js @@ -28,6 +28,7 @@ export function withTranslation(ns, options = {}) { I18nextWithTranslation.WrappedComponent = WrappedComponent; const forwardRef = (props, ref) => + // eslint-disable-next-line prefer-object-spread createElement(I18nextWithTranslation, Object.assign({}, props, { forwardedRef: ref })); return options.withRef ? forwardRefReact(forwardRef) : I18nextWithTranslation;