next-intl 3.5.3 → 3.5.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.
@@ -10,7 +10,7 @@ var constants = require('../../shared/constants.js');
10
10
  * See https://github.com/amannn/next-intl/issues/786.
11
11
  */
12
12
  function syncLocaleCookie(pathname, locale, nextLocale) {
13
- const isSwitchingLocale = nextLocale !== locale;
13
+ const isSwitchingLocale = nextLocale !== locale && nextLocale != null;
14
14
  if (!isSwitchingLocale ||
15
15
  // Theoretical case, we always have a pathname in a real app,
16
16
  // only not when running e.g. in a simulated test environment
@@ -1 +1 @@
1
- import{COOKIE_LOCALE_NAME as t,COOKIE_MAX_AGE as a,COOKIE_SAME_SITE as c}from"../../shared/constants.js";function o(o,n,e){if(!(e!==n)||!o)return;const i=window.location.pathname.replace(o,""),r=""!==i?i:"/";document.cookie="".concat(t,"=").concat(e,"; path=").concat(r,"; max-age=").concat(a,"; sameSite=").concat(c)}export{o as default};
1
+ import{COOKIE_LOCALE_NAME as t,COOKIE_MAX_AGE as a,COOKIE_SAME_SITE as c}from"../../shared/constants.js";function o(o,n,e){if(!(e!==n&&null!=e)||!o)return;const i=window.location.pathname.replace(o,""),r=""!==i?i:"/";document.cookie="".concat(t,"=").concat(e,"; path=").concat(r,"; max-age=").concat(a,"; sameSite=").concat(c)}export{o as default};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../shared/constants.js");exports.default=function(t,c,a){if(!(a!==c)||!t)return;const o=window.location.pathname.replace(t,""),n=""!==o?o:"/";document.cookie="".concat(e.COOKIE_LOCALE_NAME,"=").concat(a,"; path=").concat(n,"; max-age=").concat(e.COOKIE_MAX_AGE,"; sameSite=").concat(e.COOKIE_SAME_SITE)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../shared/constants.js");exports.default=function(t,c,a){if(!(a!==c&&null!=a)||!t)return;const o=window.location.pathname.replace(t,""),n=""!==o?o:"/";document.cookie="".concat(e.COOKIE_LOCALE_NAME,"=").concat(a,"; path=").concat(n,"; max-age=").concat(e.COOKIE_MAX_AGE,"; sameSite=").concat(e.COOKIE_SAME_SITE)};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-intl",
3
- "version": "3.5.3",
3
+ "version": "3.5.4",
4
4
  "sideEffects": false,
5
5
  "author": "Jan Amann <jan@amann.work>",
6
6
  "funding": [
@@ -82,7 +82,7 @@
82
82
  "dependencies": {
83
83
  "@formatjs/intl-localematcher": "^0.2.32",
84
84
  "negotiator": "^0.6.3",
85
- "use-intl": "^3.5.3"
85
+ "use-intl": "^3.5.4"
86
86
  },
87
87
  "peerDependencies": {
88
88
  "next": "^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0",
@@ -122,11 +122,11 @@
122
122
  },
123
123
  {
124
124
  "path": "dist/production/navigation.react-client.js",
125
- "limit": "2.83 KB"
125
+ "limit": "2.84 KB"
126
126
  },
127
127
  {
128
128
  "path": "dist/production/navigation.react-server.js",
129
- "limit": "2.94 KB"
129
+ "limit": "2.95 KB"
130
130
  },
131
131
  {
132
132
  "path": "dist/production/server.react-client.js",
@@ -141,5 +141,5 @@
141
141
  "limit": "5.81 KB"
142
142
  }
143
143
  ],
144
- "gitHead": "899552bf5629b29db88353fbc58a8397c086b285"
144
+ "gitHead": "94fb953d13b883eff3e1b2f5fd2b0e08823be2a2"
145
145
  }