@adobe/helix-config 3.9.1 → 3.9.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,3 +1,10 @@
1
+ ## [3.9.2](https://github.com/adobe/helix-config/compare/v3.9.1...v3.9.2) (2024-07-22)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * always load default profile ([01597e1](https://github.com/adobe/helix-config/commit/01597e1fefd09bac056123fb43f43b713e91044a)), closes [#138](https://github.com/adobe/helix-config/issues/138)
7
+
1
8
  ## [3.9.1](https://github.com/adobe/helix-config/compare/v3.9.0...v3.9.1) (2024-07-19)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-config",
3
- "version": "3.9.1",
3
+ "version": "3.9.2",
4
4
  "description": "Helix Config",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -43,11 +43,11 @@
43
43
  "@semantic-release/npm": "12.0.1",
44
44
  "c8": "10.1.2",
45
45
  "eslint": "8.57.0",
46
- "husky": "9.0.11",
47
- "json-schema-to-typescript": "14.1.0",
46
+ "husky": "9.1.1",
47
+ "json-schema-to-typescript": "15.0.0",
48
48
  "junit-report-builder": "3.2.1",
49
49
  "lint-staged": "15.2.7",
50
- "mocha": "10.6.0",
50
+ "mocha": "10.7.0",
51
51
  "mocha-multi-reporters": "1.5.1",
52
52
  "mocha-suppress-logs": "0.5.1",
53
53
  "nock": "13.5.4",
@@ -231,12 +231,16 @@ async function resolveConfig(ctx, rso, scope) {
231
231
  const site = res.json();
232
232
  let profile;
233
233
 
234
- if (site.extends?.profile) {
235
- const profileKey = `orgs/${rso.org}/profiles/${site.extends.profile}.json`;
236
- res = await ctx.loader.getObject(HELIX_CONFIG_BUS, profileKey);
237
- if (res.body) {
238
- profile = res.json();
239
- }
234
+ // always load default profile if available
235
+ if (!site.extends?.profile) {
236
+ site.extends = {
237
+ profile: 'default',
238
+ };
239
+ }
240
+ const profileKey = `orgs/${rso.org}/profiles/${site.extends.profile}.json`;
241
+ res = await ctx.loader.getObject(HELIX_CONFIG_BUS, profileKey);
242
+ if (res.body) {
243
+ profile = res.json();
240
244
  }
241
245
  const config = getMergedConfig(site, profile);
242
246
  if (scope === SCOPE_PIPELINE) {