@akinon/next 2.0.98 → 2.0.99-beta.0
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 +7 -0
- package/data/server/widget.ts +12 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @akinon/next
|
|
2
2
|
|
|
3
|
+
## 2.0.99-beta.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- cbbbfd757: ZERO-4376: Bootstrap beta cycle (next-main pre-release motor)
|
|
8
|
+
- 216fe8c8: Accept every preview snapshot version the editor writes, not only the first one. A newer blob was silently unrenderable and fell back to the live page.
|
|
9
|
+
|
|
3
10
|
## 2.0.98
|
|
4
11
|
|
|
5
12
|
## 2.0.97
|
package/data/server/widget.ts
CHANGED
|
@@ -171,7 +171,18 @@ export const getPreviewSnapshot = async ({
|
|
|
171
171
|
|
|
172
172
|
try {
|
|
173
173
|
const parsed = JSON.parse(rawValue);
|
|
174
|
-
|
|
174
|
+
// Any version the editor has shipped so far, not just the first one. The
|
|
175
|
+
// fields this reader uses (`sections`, `themeSettings`, `dataSources`)
|
|
176
|
+
// have been present since v1 and later versions only ADD keys it ignores
|
|
177
|
+
// — v2 carries the editor's own brand-config pieces (custom pages, style
|
|
178
|
+
// presets, section templates) so a theme applied into a working copy is
|
|
179
|
+
// not lost. Pinning the check to one number meant a blob the editor could
|
|
180
|
+
// write was silently unrenderable here, falling back to the LIVE page.
|
|
181
|
+
if (
|
|
182
|
+
typeof parsed?.version === 'number' &&
|
|
183
|
+
parsed.version >= 1 &&
|
|
184
|
+
Array.isArray(parsed.sections)
|
|
185
|
+
) {
|
|
175
186
|
return parsed as PreviewSnapshot;
|
|
176
187
|
}
|
|
177
188
|
} catch {
|
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.
|
|
4
|
+
"version": "2.0.99-beta.0",
|
|
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.
|
|
39
|
+
"@akinon/eslint-plugin-projectzero": "2.0.99-beta.0",
|
|
40
40
|
"@babel/core": "7.26.10",
|
|
41
41
|
"@babel/preset-env": "7.26.9",
|
|
42
42
|
"@babel/preset-typescript": "7.27.0",
|