@akinon/next 2.0.104-rc.1 → 2.0.104-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,13 @@
1
1
  # @akinon/next
2
2
 
3
+ ## 2.0.104-rc.2
4
+
5
+ ### Patch Changes
6
+
7
+ - dca1281: ZERO-4879: Repair sync-merge corruption in getWidgetData's payload optimization
8
+
9
+ The same sync-merge corruption ZERO-4879 fixed in category.ts, list.ts and special-page.ts was also present in widget.ts but was missed at the time: `getWidgetData` returned `Cache.wrap(...)` directly instead of awaiting it into `result`, and its `settings`/`optimizeWidgetResponse`/`logger` imports were gone, leaving unreachable dead code that referenced undefined names and failed TypeScript's build-time type check. Restored the awaited `result` binding, the missing imports, and the payload optimization behavior to match the other data loaders.
10
+
3
11
  ## 2.0.104-rc.1
4
12
 
5
13
  ### Patch Changes
@@ -10,6 +10,9 @@ import {
10
10
  isValidPreviewId,
11
11
  previewSlug
12
12
  } from '../../utils/preview';
13
+ import { optimizeWidgetResponse } from '../../utils/payload-optimizer';
14
+ import logger from '../../utils/log';
15
+ import settings from 'settings';
13
16
 
14
17
  /**
15
18
  * Widget preview (draft mode): the theme editor keeps any number of NAMED
@@ -277,7 +280,7 @@ export const getWidgetData = async <T>({
277
280
  }
278
281
  }
279
282
 
280
- return Cache.wrap(
283
+ const result = await Cache.wrap(
281
284
  CacheKey.Widget(slug),
282
285
  locale,
283
286
  getWidgetDataHandler(slug, locale, currency, headers),
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.104-rc.1",
4
+ "version": "2.0.104-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.104-rc.1",
39
+ "@akinon/eslint-plugin-projectzero": "2.0.104-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",