@adobe/helix-shared-config 10.6.9 → 11.0.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 +12 -0
- package/package.json +1 -1
- package/src/IndexConfig.js +13 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# [@adobe/helix-shared-config-v11.0.0](https://github.com/adobe/helix-shared/compare/@adobe/helix-shared-config-v10.6.9...@adobe/helix-shared-config-v11.0.0) (2024-09-25)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* IndexConfig should not allow broken config ([#1001](https://github.com/adobe/helix-shared/issues/1001)) ([35f28d1](https://github.com/adobe/helix-shared/commit/35f28d1f16e501eebce848ca4b0d89701107f252))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### BREAKING CHANGES
|
|
10
|
+
|
|
11
|
+
* some indexing configurations will no longer be accepted
|
|
12
|
+
|
|
1
13
|
# [@adobe/helix-shared-config-v10.6.9](https://github.com/adobe/helix-shared/compare/@adobe/helix-shared-config-v10.6.8...@adobe/helix-shared-config-v10.6.9) (2024-09-24)
|
|
2
14
|
|
|
3
15
|
|
package/package.json
CHANGED
package/src/IndexConfig.js
CHANGED
|
@@ -193,4 +193,17 @@ export class IndexConfig extends SchemaDerivedConfig {
|
|
|
193
193
|
this._version = this._cfg.version;
|
|
194
194
|
return this;
|
|
195
195
|
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Validates the loaded configuration and coerces types and sets defaulst
|
|
199
|
+
*/
|
|
200
|
+
async validate() {
|
|
201
|
+
await super.validate();
|
|
202
|
+
|
|
203
|
+
if (this._document?.errors?.length) {
|
|
204
|
+
const detail = this._document.errors.map(({ message }) => (message)).join('\n');
|
|
205
|
+
throw new Error(`Invalid index configuration:
|
|
206
|
+
${detail}`);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
196
209
|
}
|