react-i18next 11.3.5 → 11.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 11.4.0
2
+
3
+ - Add sideEffects false to package json to allow tree shaking [1097](https://github.com/i18next/react-i18next/pull/1097)
4
+
1
5
  ### 11.3.5
2
6
 
3
7
  - fix returning defaultValue for Trans component [1092](https://github.com/i18next/react-i18next/pull/1092)
@@ -996,7 +996,7 @@ define(['exports', 'react'], function (exports, React) { 'use strict';
996
996
  var _ref = getHasUsedI18nextProvider() ? ReactI18nContext || {} : {},
997
997
  i18nFromContext = _ref.i18n;
998
998
 
999
- var i18n = i18nFromProps || i18nFromContext || getI18n(); // opt out if is a cloned instance, eg. created by i18next-express-middleware on request
999
+ var i18n = i18nFromProps || i18nFromContext || getI18n(); // opt out if is a cloned instance, eg. created by i18next-http-middleware on request
1000
1000
  // -> do not set initial stuff on server side
1001
1001
 
1002
1002
  if (i18n.options && i18n.options.isClone) return; // nextjs / SSR: getting data from next.js or other ssr stack
@@ -17,7 +17,7 @@ function useSSR(initialI18nStore, initialLanguage) {
17
17
  var _ref = (0, _context.getHasUsedI18nextProvider)() ? ReactI18nContext || {} : {},
18
18
  i18nFromContext = _ref.i18n;
19
19
 
20
- var i18n = i18nFromProps || i18nFromContext || (0, _context.getI18n)(); // opt out if is a cloned instance, eg. created by i18next-express-middleware on request
20
+ var i18n = i18nFromProps || i18nFromContext || (0, _context.getI18n)(); // opt out if is a cloned instance, eg. created by i18next-http-middleware on request
21
21
  // -> do not set initial stuff on server side
22
22
 
23
23
  if (i18n.options && i18n.options.isClone) return; // nextjs / SSR: getting data from next.js or other ssr stack
package/dist/es/useSSR.js CHANGED
@@ -8,7 +8,7 @@ export function useSSR(initialI18nStore, initialLanguage) {
8
8
  var _ref = getHasUsedI18nextProvider() ? ReactI18nContext || {} : {},
9
9
  i18nFromContext = _ref.i18n;
10
10
 
11
- var i18n = i18nFromProps || i18nFromContext || getI18n(); // opt out if is a cloned instance, eg. created by i18next-express-middleware on request
11
+ var i18n = i18nFromProps || i18nFromContext || getI18n(); // opt out if is a cloned instance, eg. created by i18next-http-middleware on request
12
12
  // -> do not set initial stuff on server side
13
13
 
14
14
  if (i18n.options && i18n.options.isClone) return; // nextjs / SSR: getting data from next.js or other ssr stack
@@ -1000,7 +1000,7 @@
1000
1000
  var _ref = getHasUsedI18nextProvider() ? ReactI18nContext || {} : {},
1001
1001
  i18nFromContext = _ref.i18n;
1002
1002
 
1003
- var i18n = i18nFromProps || i18nFromContext || getI18n(); // opt out if is a cloned instance, eg. created by i18next-express-middleware on request
1003
+ var i18n = i18nFromProps || i18nFromContext || getI18n(); // opt out if is a cloned instance, eg. created by i18next-http-middleware on request
1004
1004
  // -> do not set initial stuff on server side
1005
1005
 
1006
1006
  if (i18n.options && i18n.options.isClone) return; // nextjs / SSR: getting data from next.js or other ssr stack
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-i18next",
3
- "version": "11.3.5",
3
+ "version": "11.4.0",
4
4
  "description": "Internationalization for react done right. Using the i18next i18n ecosystem.",
5
5
  "main": "dist/commonjs/index.js",
6
6
  "types": "src/index.d.ts",
@@ -147,5 +147,6 @@
147
147
  "**/react-i18next.min.js"
148
148
  ]
149
149
  },
150
- "lock": false
150
+ "lock": false,
151
+ "sideEffects": false
151
152
  }
package/react-i18next.js CHANGED
@@ -1000,7 +1000,7 @@
1000
1000
  var _ref = getHasUsedI18nextProvider() ? ReactI18nContext || {} : {},
1001
1001
  i18nFromContext = _ref.i18n;
1002
1002
 
1003
- var i18n = i18nFromProps || i18nFromContext || getI18n(); // opt out if is a cloned instance, eg. created by i18next-express-middleware on request
1003
+ var i18n = i18nFromProps || i18nFromContext || getI18n(); // opt out if is a cloned instance, eg. created by i18next-http-middleware on request
1004
1004
  // -> do not set initial stuff on server side
1005
1005
 
1006
1006
  if (i18n.options && i18n.options.isClone) return; // nextjs / SSR: getting data from next.js or other ssr stack
package/src/useSSR.js CHANGED
@@ -7,7 +7,7 @@ export function useSSR(initialI18nStore, initialLanguage, props = {}) {
7
7
  const { i18n: i18nFromContext } = getHasUsedI18nextProvider() ? ReactI18nContext || {} : {};
8
8
  const i18n = i18nFromProps || i18nFromContext || getI18n();
9
9
 
10
- // opt out if is a cloned instance, eg. created by i18next-express-middleware on request
10
+ // opt out if is a cloned instance, eg. created by i18next-http-middleware on request
11
11
  // -> do not set initial stuff on server side
12
12
  if (i18n.options && i18n.options.isClone) return;
13
13