@adobe/helix-config 5.10.0 → 5.10.1
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/package.json +1 -1
- package/src/config-view.js +10 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [5.10.1](https://github.com/adobe/helix-config/compare/v5.10.0...v5.10.1) (2026-03-16)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* catch JSON parsing error in sidekick/config.json ([#366](https://github.com/adobe/helix-config/issues/366)) ([e30bb4f](https://github.com/adobe/helix-config/commit/e30bb4fd781157830b1edac391392cee2c4557c2))
|
|
7
|
+
|
|
1
8
|
# [5.10.0](https://github.com/adobe/helix-config/compare/v5.9.4...v5.10.0) (2026-03-10)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
package/src/config-view.js
CHANGED
|
@@ -254,12 +254,19 @@ async function loadHeadHtml(ctx, config, ref) {
|
|
|
254
254
|
return {};
|
|
255
255
|
}
|
|
256
256
|
|
|
257
|
-
async function loadSidekickConfig(ctx, config) {
|
|
257
|
+
async function loadSidekickConfig(ctx, rso, config) {
|
|
258
258
|
const key = `${config.code.owner}/${config.code.repo}/main/tools/sidekick/config.json`;
|
|
259
259
|
const res = await ctx.loader.getObject(HELIX_CODE_BUS, key);
|
|
260
260
|
if (res.body) {
|
|
261
261
|
const sidekick = new ConfigObject();
|
|
262
|
-
|
|
262
|
+
try {
|
|
263
|
+
sidekick.data = JSON.parse(res.body);
|
|
264
|
+
} catch (e) {
|
|
265
|
+
ctx.log.warn(`[${rso.org}/${rso.site}] JSON error in ${key}: ${e.message}`);
|
|
266
|
+
sidekick.data = {
|
|
267
|
+
error: e.message,
|
|
268
|
+
};
|
|
269
|
+
}
|
|
263
270
|
sidekick.updateLastModified(res.headers);
|
|
264
271
|
// remove deprecated properties
|
|
265
272
|
delete sidekick.data.extends;
|
|
@@ -370,7 +377,7 @@ async function resolveConfig(ctx, rso, scope) {
|
|
|
370
377
|
if (scope === SCOPE_ADMIN || scope === SCOPE_RAW) {
|
|
371
378
|
// although not used in raw, in order to set correct last-modified
|
|
372
379
|
ctx.timer?.update('sidekick.json');
|
|
373
|
-
site.sidekick = await loadSidekickConfig(ctx, config);
|
|
380
|
+
site.sidekick = await loadSidekickConfig(ctx, rso, config);
|
|
374
381
|
}
|
|
375
382
|
|
|
376
383
|
return site;
|