next-intl 3.23.2 → 3.23.4
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/dist/development/navigation/react-server/createNavigation.js +2 -2
- package/dist/development/navigation/react-server/getServerLocale.js +16 -0
- package/dist/esm/navigation/react-server/createNavigation.js +1 -1
- package/dist/esm/navigation/react-server/getServerLocale.js +1 -0
- package/dist/production/navigation/react-server/createNavigation.js +1 -1
- package/dist/production/navigation/react-server/getServerLocale.js +1 -0
- package/dist/types/src/navigation/react-server/getServerLocale.d.ts +5 -0
- package/package.json +4 -4
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var RequestLocale = require('../../server/react-server/RequestLocale.js');
|
|
6
5
|
var createSharedNavigationFns = require('../shared/createSharedNavigationFns.js');
|
|
6
|
+
var getServerLocale = require('./getServerLocale.js');
|
|
7
7
|
|
|
8
8
|
function createNavigation(routing) {
|
|
9
9
|
function getLocale() {
|
|
10
|
-
return
|
|
10
|
+
return getServerLocale.default();
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var getConfig = require('../../server/react-server/getConfig.js');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* This is only moved to a separate module for easier mocking in
|
|
9
|
+
* `../createNavigatoin.test.tsx` in order to avoid suspending.
|
|
10
|
+
*/
|
|
11
|
+
async function getServerLocale() {
|
|
12
|
+
const config = await getConfig.default();
|
|
13
|
+
return config.locale;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
exports.default = getServerLocale;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"../shared/createSharedNavigationFns.js";import o from"./getServerLocale.js";function t(t){const{config:n,...r}=e((function(){return o()}),t);function u(e){return()=>{throw new Error("`".concat(e,"` is not supported in Server Components. You can use this hook if you convert the calling component to a Client Component."))}}return{...r,usePathname:u("usePathname"),useRouter:u("useRouter")}}export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"../../server/react-server/getConfig.js";async function r(){return(await e()).locale}export{r as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../shared/createSharedNavigationFns.js"),t=require("./getServerLocale.js");exports.default=function(r){const{config:n,...o}=e.default((function(){return t.default()}),r);function u(e){return()=>{throw new Error("`".concat(e,"` is not supported in Server Components. You can use this hook if you convert the calling component to a Client Component."))}}return{...o,usePathname:u("usePathname"),useRouter:u("useRouter")}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../server/react-server/getConfig.js");exports.default=async function(){return(await e.default()).locale};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "next-intl",
|
|
3
|
-
"version": "3.23.
|
|
3
|
+
"version": "3.23.4",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"author": "Jan Amann <jan@amann.work>",
|
|
6
6
|
"funding": [
|
|
@@ -87,12 +87,12 @@
|
|
|
87
87
|
],
|
|
88
88
|
"dependencies": {
|
|
89
89
|
"@formatjs/intl-localematcher": "^0.5.4",
|
|
90
|
-
"negotiator": "^0.
|
|
91
|
-
"use-intl": "^3.23.
|
|
90
|
+
"negotiator": "^1.0.0",
|
|
91
|
+
"use-intl": "^3.23.4"
|
|
92
92
|
},
|
|
93
93
|
"peerDependencies": {
|
|
94
94
|
"next": "^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0",
|
|
95
95
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
|
|
96
96
|
},
|
|
97
|
-
"gitHead": "
|
|
97
|
+
"gitHead": "af789e33c31d2e632d5db7eb6f6802543cfebbdb"
|
|
98
98
|
}
|