@adobe/helix-config-storage 3.1.0 → 3.2.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 +7 -0
- package/package.json +5 -5
- package/src/config-store.js +18 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [3.2.0](https://github.com/adobe/helix-config-storage/compare/v3.1.0...v3.2.0) (2026-05-28)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* add withCreatedOverride() to allow caller-supplied created date ([#268](https://github.com/adobe/helix-config-storage/issues/268)) ([0da8b14](https://github.com/adobe/helix-config-storage/commit/0da8b14f15b4784df18a71c1016c303814c76906))
|
|
7
|
+
|
|
1
8
|
# [3.1.0](https://github.com/adobe/helix-config-storage/compare/v3.0.1...v3.1.0) (2026-05-19)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-config-storage",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "Helix Config Storage",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"reporter-options": "configFile=.mocha-multi.json"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@adobe/eslint-config-helix": "3.0.
|
|
40
|
-
"@eslint/config-helpers": "0.
|
|
39
|
+
"@adobe/eslint-config-helix": "3.0.28",
|
|
40
|
+
"@eslint/config-helpers": "0.6.0",
|
|
41
41
|
"@semantic-release/changelog": "6.0.3",
|
|
42
42
|
"@semantic-release/git": "10.0.1",
|
|
43
43
|
"@semantic-release/npm": "13.1.5",
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
"husky": "9.1.7",
|
|
48
48
|
"json-schema-to-typescript": "15.0.4",
|
|
49
49
|
"junit-report-builder": "5.1.2",
|
|
50
|
-
"lint-staged": "
|
|
50
|
+
"lint-staged": "17.0.4",
|
|
51
51
|
"mocha": "11.7.5",
|
|
52
52
|
"mocha-multi-reporters": "1.5.1",
|
|
53
53
|
"mocha-suppress-logs": "0.6.0",
|
|
54
|
-
"nock": "14.0.
|
|
54
|
+
"nock": "14.0.15",
|
|
55
55
|
"semantic-release": "25.0.3",
|
|
56
56
|
"xml2js": "0.6.2"
|
|
57
57
|
},
|
package/src/config-store.js
CHANGED
|
@@ -109,6 +109,12 @@ export class ConfigStore {
|
|
|
109
109
|
*/
|
|
110
110
|
#versioning;
|
|
111
111
|
|
|
112
|
+
/**
|
|
113
|
+
* indicates that update of the created date is allowed.
|
|
114
|
+
* @type {boolean}
|
|
115
|
+
*/
|
|
116
|
+
#createdOverride = false;
|
|
117
|
+
|
|
112
118
|
/**
|
|
113
119
|
* @param {string} org the org id
|
|
114
120
|
* @param {string} type store type (org, sites, profiles, secrets, users)
|
|
@@ -160,6 +166,16 @@ export class ConfigStore {
|
|
|
160
166
|
return this;
|
|
161
167
|
}
|
|
162
168
|
|
|
169
|
+
/**
|
|
170
|
+
* Allows the caller to supply a custom created date. used for migrations.
|
|
171
|
+
* @param {boolean} v
|
|
172
|
+
* @returns {ConfigStore}
|
|
173
|
+
*/
|
|
174
|
+
withCreatedOverride(v) {
|
|
175
|
+
this.#createdOverride = v;
|
|
176
|
+
return this;
|
|
177
|
+
}
|
|
178
|
+
|
|
163
179
|
/**
|
|
164
180
|
* Controls the details included in config list entries.
|
|
165
181
|
* When `true`, each entry includes the `content` and `code` fields from the config.
|
|
@@ -523,8 +539,8 @@ export class ConfigStore {
|
|
|
523
539
|
lastModified: 'ignore',
|
|
524
540
|
});
|
|
525
541
|
config.created = oldConfig.created;
|
|
526
|
-
} else if (!restoreVersion) {
|
|
527
|
-
delete config.created; // don't allow to set created on new config
|
|
542
|
+
} else if (!restoreVersion && !this.#createdOverride) {
|
|
543
|
+
delete config.created; // don't allow to set created on new config if not allowed
|
|
528
544
|
}
|
|
529
545
|
this.#updateTimeStamps(config);
|
|
530
546
|
let newConfig = config;
|