@akinon/next 2.0.78-rc.1 → 2.0.78-rc.2

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,5 +1,11 @@
1
1
  # @akinon/next
2
2
 
3
+ ## 2.0.78-rc.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 86187b1c: ZERO-4879: Repair sync-merge corruption in default middleware and server data loaders — remove a duplicated block that left an unbalanced brace, and restore the awaited `result` binding the payload optimization reads
8
+
3
9
  ## 2.0.78-rc.1
4
10
 
5
11
  ## 2.0.78-rc.0
@@ -98,7 +98,7 @@ export const getCategoryData = async ({
98
98
  }) => {
99
99
  searchParams = normalizeSearchParams(searchParams);
100
100
 
101
- return Cache.wrap(
101
+ const result = await Cache.wrap(
102
102
  CacheKey.Category(pk, searchParams, headers),
103
103
  locale,
104
104
  getCategoryDataHandler(pk, locale, currency, searchParams, headers),
@@ -71,7 +71,7 @@ export const getListData = async ({
71
71
  }) => {
72
72
  searchParams = normalizeSearchParams(searchParams);
73
73
 
74
- return Cache.wrap(
74
+ const result = await Cache.wrap(
75
75
  CacheKey.List(searchParams, headers),
76
76
  locale,
77
77
  getListDataHandler(locale, currency, searchParams, headers),
@@ -51,7 +51,7 @@ export const getSpecialPageData = async ({
51
51
  }) => {
52
52
  searchParams = normalizeSearchParams(searchParams);
53
53
 
54
- return Cache.wrap(
54
+ const result = await Cache.wrap(
55
55
  CacheKey.SpecialPage(pk, searchParams, headers),
56
56
  locale,
57
57
  getSpecialPageDataHandler(pk, locale, currency, searchParams, headers),
@@ -561,46 +561,6 @@ const withPzDefault =
561
561
  }
562
562
  );
563
563
 
564
- middlewareResult.cookies.set(
565
- 'pz-currency',
566
- currency,
567
- {
568
- domain: rootHostname,
569
- sameSite: 'none',
570
- secure: true,
571
- expires: new Date(
572
- Date.now() + 1000 * 60 * 60 * 24 * 7
573
- ) // 7 days
574
- }
575
- );
576
-
577
- if (
578
- req.cookies.get('pz-locale') &&
579
- req.cookies.get('pz-locale').value !==
580
- locale
581
- ) {
582
- logger.debug('Locale changed', {
583
- locale,
584
- oldLocale:
585
- req.cookies.get('pz-locale')?.value,
586
- ip
587
- });
588
- }
589
-
590
- middlewareResult.headers.set(
591
- 'pz-url',
592
- req.nextUrl.toString()
593
- );
594
-
595
- if (req.cookies.get('pz-set-currency')) {
596
- middlewareResult.cookies.delete(
597
- 'pz-set-currency'
598
- );
599
- }
600
-
601
- if (
602
- req.cookies.get('pz-post-checkout-flow')
603
- ) {
604
564
  if (
605
565
  req.cookies.get('pz-locale') &&
606
566
  req.cookies.get('pz-locale').value !==
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": "2.0.78-rc.1",
4
+ "version": "2.0.78-rc.2",
5
5
  "private": false,
6
6
  "license": "MIT",
7
7
  "bin": {
@@ -36,7 +36,7 @@
36
36
  "set-cookie-parser": "2.6.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@akinon/eslint-plugin-projectzero": "2.0.78-rc.1",
39
+ "@akinon/eslint-plugin-projectzero": "2.0.78-rc.2",
40
40
  "@babel/core": "7.26.10",
41
41
  "@babel/preset-env": "7.26.9",
42
42
  "@babel/preset-typescript": "7.27.0",