@akinon/next 1.60.0-rc.13 → 1.60.0-rc.15
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 +12 -0
- package/middlewares/default.ts +5 -5
- package/package.json +2 -2
- package/redux/middlewares/checkout.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @akinon/next
|
|
2
2
|
|
|
3
|
+
## 1.60.0-rc.15
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- d9fb057: ZERO-2551: Fix trailing slash and search params
|
|
8
|
+
|
|
9
|
+
## 1.60.0-rc.14
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 97f6472: ZERO-2971: Fix initialSelectedOptions for preOrderMiddleware
|
|
14
|
+
|
|
3
15
|
## 1.60.0-rc.13
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/middlewares/default.ts
CHANGED
|
@@ -251,10 +251,8 @@ const withPzDefault =
|
|
|
251
251
|
const { defaultLocaleValue } =
|
|
252
252
|
Settings.localization;
|
|
253
253
|
const url = req.nextUrl.clone();
|
|
254
|
-
const pathnameWithoutLocale =
|
|
255
|
-
urlLocaleMatcherRegex,
|
|
256
|
-
''
|
|
257
|
-
);
|
|
254
|
+
const pathnameWithoutLocale =
|
|
255
|
+
url.pathname.replace(urlLocaleMatcherRegex, '');
|
|
258
256
|
|
|
259
257
|
middlewareResult = (await middleware(
|
|
260
258
|
req,
|
|
@@ -316,6 +314,7 @@ const withPzDefault =
|
|
|
316
314
|
) {
|
|
317
315
|
url.pathname =
|
|
318
316
|
url.pathname +
|
|
317
|
+
(/\/$/.test(url.pathname) ? '' : '/') +
|
|
319
318
|
`searchparams|${url.searchParams.toString()}`;
|
|
320
319
|
}
|
|
321
320
|
|
|
@@ -390,7 +389,8 @@ const withPzDefault =
|
|
|
390
389
|
) {
|
|
391
390
|
logger.debug('Locale changed', {
|
|
392
391
|
locale,
|
|
393
|
-
oldLocale:
|
|
392
|
+
oldLocale:
|
|
393
|
+
req.cookies.get('pz-locale')?.value,
|
|
394
394
|
ip
|
|
395
395
|
});
|
|
396
396
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akinon/next",
|
|
3
3
|
"description": "Core package for Project Zero Next",
|
|
4
|
-
"version": "1.60.0-rc.
|
|
4
|
+
"version": "1.60.0-rc.15",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"bin": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"set-cookie-parser": "2.6.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@akinon/eslint-plugin-projectzero": "1.60.0-rc.
|
|
33
|
+
"@akinon/eslint-plugin-projectzero": "1.60.0-rc.15",
|
|
34
34
|
"@types/react-redux": "7.1.30",
|
|
35
35
|
"@types/set-cookie-parser": "2.4.7",
|
|
36
36
|
"@typescript-eslint/eslint-plugin": "6.7.4",
|
|
@@ -154,7 +154,7 @@ export const preOrderMiddleware: Middleware = ({
|
|
|
154
154
|
const initialSelectedOptions: Record<string, number> = Object.fromEntries(
|
|
155
155
|
Object.entries(attributeBasedShippingOptions).map(([key, options]) => [
|
|
156
156
|
key,
|
|
157
|
-
options[0].pk
|
|
157
|
+
options.attribute_based_shipping_options[0].pk
|
|
158
158
|
])
|
|
159
159
|
);
|
|
160
160
|
|