@adobe/helix-config 5.0.0 → 5.1.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 CHANGED
@@ -1,3 +1,10 @@
1
+ # [5.1.0](https://github.com/adobe/helix-config/compare/v5.0.0...v5.1.0) (2025-04-04)
2
+
3
+
4
+ ### Features
5
+
6
+ * support group references w/o .json ([#257](https://github.com/adobe/helix-config/issues/257)) ([013cb2a](https://github.com/adobe/helix-config/commit/013cb2a6f11cf8881966f97470c2a8eaeee81eb4)), closes [#256](https://github.com/adobe/helix-config/issues/256)
7
+
1
8
  # [5.0.0](https://github.com/adobe/helix-config/compare/v4.14.4...v5.0.0) (2025-04-03)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-config",
3
- "version": "5.0.0",
3
+ "version": "5.1.0",
4
4
  "description": "Helix Config",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -406,15 +406,21 @@ function computeSiteAdminRoles(admin, orgConfig, configGroups = {}) {
406
406
  for (const /* @type string */ entry of role) {
407
407
  if (entry.indexOf('@') > 0) {
408
408
  users.add(entry);
409
- } else if (entry.startsWith('groups/') && entry.endsWith('.json')) {
409
+ } else if (entry.startsWith('groups/')) {
410
410
  // keep entry in list so that admin can auto-migrate updates to the groups json
411
411
  // TODO: remove after v4 EOL
412
412
  users.add(entry);
413
- for (const email of resolveGroup(configGroups, entry.substring(7, entry.length - 5))) {
413
+ const reference = entry.endsWith('.json')
414
+ ? entry.substring(7, entry.length - 5)
415
+ : entry;
416
+ for (const email of resolveGroup(configGroups, reference)) {
414
417
  users.add(email);
415
418
  }
416
419
  } else if (entry.startsWith('/groups/')) {
417
- for (const email of resolveGroup(orgGroups, entry.substring(8, entry.length - 5))) {
420
+ const reference = entry.endsWith('.json')
421
+ ? entry.substring(8, entry.length - 5)
422
+ : entry;
423
+ for (const email of resolveGroup(orgGroups, reference)) {
418
424
  users.add(email);
419
425
  }
420
426
  }