@adobe/helix-config-storage 2.2.12 → 2.2.13
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-store.js +6 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [2.2.13](https://github.com/adobe/helix-config-storage/compare/v2.2.12...v2.2.13) (2025-06-18)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* ensure that purge receives empty old config ([#143](https://github.com/adobe/helix-config-storage/issues/143)) ([77bab30](https://github.com/adobe/helix-config-storage/commit/77bab30a36aa8a817f1d45307447ec62e1ee39ae))
|
|
7
|
+
|
|
1
8
|
## [2.2.12](https://github.com/adobe/helix-config-storage/compare/v2.2.11...v2.2.12) (2025-06-18)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
package/src/config-store.js
CHANGED
|
@@ -732,21 +732,19 @@ export class ConfigStore {
|
|
|
732
732
|
config.created = oldConfig?.created;
|
|
733
733
|
this.#updateTimeStamps(config);
|
|
734
734
|
let newConfig = config;
|
|
735
|
+
let purgeConfig = oldConfig;
|
|
735
736
|
if (this.type === 'sites') {
|
|
736
|
-
// apply profile
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
oldConfig = { extends: newConfig.extends };
|
|
741
|
-
}
|
|
742
|
-
oldConfig = await this.getAggregatedConfig(ctx, oldConfig);
|
|
737
|
+
// apply profile: for a new site using a profile, we get the aggregate of the same profile.
|
|
738
|
+
// this allows to validate the protected properties like features and limits.
|
|
739
|
+
oldConfig = await this.getAggregatedConfig(ctx, oldConfig ?? { extends: newConfig.extends });
|
|
740
|
+
purgeConfig = await this.getAggregatedConfig(ctx, purgeConfig);
|
|
743
741
|
newConfig = await this.getAggregatedConfig(ctx, newConfig);
|
|
744
742
|
}
|
|
745
743
|
|
|
746
744
|
await this.validate(ctx, newConfig);
|
|
747
745
|
await this.validatePermissions(ctx, oldConfig, newConfig);
|
|
748
746
|
await storage.put(this.key, JSON.stringify(config), 'application/json');
|
|
749
|
-
await this.purge(ctx,
|
|
747
|
+
await this.purge(ctx, purgeConfig, newConfig);
|
|
750
748
|
return ret ?? redact(data, frag);
|
|
751
749
|
}
|
|
752
750
|
|