next-i18next 5.0.0-beta.4 → 5.0.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/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  # next-i18next
2
2
  [![npm version](https://badge.fury.io/js/next-i18next.svg)](https://badge.fury.io/js/next-i18next)
3
3
  [![CircleCI](https://circleci.com/gh/isaachinman/next-i18next.svg?style=shield)](https://circleci.com/gh/isaachinman/next-i18next)
4
- [![dependencies Status](https://david-dm.org/isaachinman/next-i18next/status.svg)](https://david-dm.org/isaachinman/next-i18next)
5
4
  [![Package Quality](https://npm.packagequality.com/shield/next-i18next.svg)](https://packagequality.com/#?package=next-i18next)
6
5
 
7
6
  **The easiest way to translate your NextJs apps.**
package/babel.config.json CHANGED
@@ -37,7 +37,7 @@
37
37
  "helpers": true,
38
38
  "regenerator": true,
39
39
  "useESModules": false
40
- },
40
+ }
41
41
  }
42
42
  ]
43
43
  ],
@@ -76,6 +76,6 @@
76
76
  }
77
77
  ]
78
78
  ]
79
- },
79
+ }
80
80
  }
81
81
  }
@@ -52,10 +52,6 @@ var NextI18Next = function NextI18Next(userConfig) {
52
52
  this.consoleMessage = _utils.consoleMessage.bind(this);
53
53
  /* Validation */
54
54
 
55
- if (this.config.otherLanguages.length <= 0) {
56
- throw new Error('To properly initialise a next-i18next instance you must provide one or more locale codes in config.otherLanguages.');
57
- }
58
-
59
55
  this.withNamespaces = function () {
60
56
  throw new Error('next-i18next has upgraded to react-i18next v10 - please rename withNamespaces to withTranslation.');
61
57
  };
package/dist/es/index.js CHANGED
@@ -13,10 +13,6 @@ export default class NextI18Next {
13
13
  this.consoleMessage = consoleMessage.bind(this);
14
14
  /* Validation */
15
15
 
16
- if (this.config.otherLanguages.length <= 0) {
17
- throw new Error('To properly initialise a next-i18next instance you must provide one or more locale codes in config.otherLanguages.');
18
- }
19
-
20
16
  this.withNamespaces = () => {
21
17
  throw new Error('next-i18next has upgraded to react-i18next v10 - please rename withNamespaces to withTranslation.');
22
18
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-i18next",
3
- "version": "5.0.0-beta.4",
3
+ "version": "5.0.0",
4
4
  "repository": "git@github.com:isaachinman/next-i18next.git",
5
5
  "author": "Isaac Hinman <isaac@isaachinman.com>",
6
6
  "funding": {
@@ -50,15 +50,15 @@
50
50
  "bundlesize": [
51
51
  {
52
52
  "path": "./examples/simple/.next/static/chunks/commons*.js",
53
- "maxSize": "62 kB"
53
+ "maxSize": "65 kB"
54
54
  },
55
55
  {
56
- "path": "./examples/simple/.next/static/runtime/main*.js",
57
- "maxSize": "6 kB"
56
+ "path": "./examples/simple/.next/static/chunks/main*.js",
57
+ "maxSize": "7 kB"
58
58
  },
59
59
  {
60
- "path": "./examples/simple/.next/static/runtime/webpack*.js",
61
- "maxSize": "750 B"
60
+ "path": "./examples/simple/.next/static/chunks/webpack*.js",
61
+ "maxSize": "760 B"
62
62
  }
63
63
  ],
64
64
  "devDependencies": {
@@ -69,7 +69,6 @@
69
69
  "@babel/preset-env": "^7.10.4",
70
70
  "@babel/preset-react": "^7.10.4",
71
71
  "@babel/preset-typescript": "^7.10.4",
72
- "@types/express": "^4.16.1",
73
72
  "@types/jest": "^24.0.16",
74
73
  "@types/jest-environment-puppeteer": "^4.0.0",
75
74
  "@types/react": "^16.8.4",
@@ -100,6 +99,7 @@
100
99
  "typescript": "^3.5.3"
101
100
  },
102
101
  "dependencies": {
102
+ "@types/express": "^4.16.1",
103
103
  "core-js": "^3",
104
104
  "detect-node": "^2.0.4",
105
105
  "hoist-non-react-statics": "^3.2.0",
@@ -114,7 +114,7 @@
114
114
  "url": "^0.11.0"
115
115
  },
116
116
  "peerDependencies": {
117
- "next": ">= 9.3.0",
117
+ "next": ">= 9.5.0",
118
118
  "react": ">= 16.8.0"
119
119
  }
120
- }
120
+ }
package/types.d.ts CHANGED
@@ -18,6 +18,7 @@ export type InitConfig = {
18
18
  strictMode?: boolean;
19
19
  defaultLanguage: string;
20
20
  ignoreRoutes?: string[];
21
+ localeExtension?: string;
21
22
  localePath?: string;
22
23
  localeStructure?: string;
23
24
  otherLanguages: string[];