@adobe/helix-config-storage 1.7.0 → 1.7.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,17 @@
1
+ ## [1.7.2](https://github.com/adobe/helix-config-storage/compare/v1.7.1...v1.7.2) (2024-09-07)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **deps:** update adobe fixes ([#26](https://github.com/adobe/helix-config-storage/issues/26)) ([72826c4](https://github.com/adobe/helix-config-storage/commit/72826c4c9c2179a1dbf2b7f86a4147fdaf08bc4f))
7
+
8
+ ## [1.7.1](https://github.com/adobe/helix-config-storage/compare/v1.7.0...v1.7.1) (2024-09-07)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * ensure lowercase org/site/owner/repo ([#24](https://github.com/adobe/helix-config-storage/issues/24)) ([55e8269](https://github.com/adobe/helix-config-storage/commit/55e82699818a6abc372c886190cd4dc434ee4b9d)), closes [#23](https://github.com/adobe/helix-config-storage/issues/23)
14
+
1
15
  # [1.7.0](https://github.com/adobe/helix-config-storage/compare/v1.6.1...v1.7.0) (2024-09-05)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-config-storage",
3
- "version": "1.7.0",
3
+ "version": "1.7.2",
4
4
  "description": "Helix Config Storage",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -36,7 +36,7 @@
36
36
  "reporter-options": "configFile=.mocha-multi.json"
37
37
  },
38
38
  "devDependencies": {
39
- "@adobe/eslint-config-helix": "2.0.6",
39
+ "@adobe/eslint-config-helix": "2.0.7",
40
40
  "@semantic-release/changelog": "6.0.3",
41
41
  "@semantic-release/git": "10.0.1",
42
42
  "@semantic-release/npm": "12.0.1",
@@ -46,7 +46,7 @@
46
46
  "husky": "9.1.5",
47
47
  "json-schema-to-typescript": "15.0.2",
48
48
  "junit-report-builder": "5.0.0",
49
- "lint-staged": "15.2.9",
49
+ "lint-staged": "15.2.10",
50
50
  "mocha": "10.7.3",
51
51
  "mocha-multi-reporters": "1.5.1",
52
52
  "mocha-suppress-logs": "0.5.1",
@@ -60,8 +60,8 @@
60
60
  },
61
61
  "dependencies": {
62
62
  "@adobe/fetch": "4.1.8",
63
- "@adobe/helix-shared-config": "10.6.7",
64
- "@adobe/helix-shared-git": "3.0.13",
63
+ "@adobe/helix-shared-config": "10.6.8",
64
+ "@adobe/helix-shared-git": "3.0.14",
65
65
  "@adobe/helix-shared-storage": "1.0.6",
66
66
  "@adobe/helix-shared-utils": "3.0.2",
67
67
  "ajv": "8.17.1",
@@ -220,6 +220,12 @@ export class ConfigStore {
220
220
  if (org.includes('/') || type.includes('/') || name.includes('/')) {
221
221
  throw new Error('orgId, type and name must not contain slashes');
222
222
  }
223
+ if (org.toLowerCase() !== org) {
224
+ throw new Error('orgId must be lowercase');
225
+ }
226
+ if (type === 'sites' && name.toLowerCase() !== name) {
227
+ throw new Error('site must be lowercase');
228
+ }
223
229
  this.org = org;
224
230
  this.type = type;
225
231
  this.name = name;
package/src/utils.js CHANGED
@@ -74,15 +74,19 @@ export function updateCodeSource(ctx, code) {
74
74
  // recompute owner, repo and type
75
75
  code.source.type = 'github';
76
76
  const url = new GitUrl(code.source.url);
77
- if (url.owner !== code.owner) {
78
- code.owner = url.owner;
77
+ const owner = url.owner.toLowerCase();
78
+ const repo = url.repo.toLowerCase();
79
+ if (owner !== code.owner) {
80
+ code.owner = owner;
79
81
  modified = true;
80
82
  }
81
- if (url.repo !== code.repo) {
82
- code.repo = url.repo;
83
+ if (repo !== code.repo) {
84
+ code.repo = repo;
83
85
  modified ||= true;
84
86
  }
85
87
  } else if (code?.owner && code?.repo) {
88
+ code.owner = code.owner.toLowerCase();
89
+ code.repo = code.repo.toLowerCase();
86
90
  code.source = {
87
91
  type: 'github',
88
92
  url: `https://github.com/${code.owner}/${code.repo}`,