@adobe/helix-shared-config 10.0.0 → 10.0.1
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/ModifiersConfig.js +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [@adobe/helix-shared-config-v10.0.1](https://github.com/adobe/helix-shared/compare/@adobe/helix-shared-config-v10.0.0...@adobe/helix-shared-config-v10.0.1) (2023-02-22)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* prevent prototype pollution ([#765](https://github.com/adobe/helix-shared/issues/765)) ([b6d1677](https://github.com/adobe/helix-shared/commit/b6d16776b9e838c5b5fd856070de893d1546219a))
|
|
7
|
+
|
|
1
8
|
# [@adobe/helix-shared-config-v10.0.0](https://github.com/adobe/helix-shared/compare/@adobe/helix-shared-config-v9.1.4...@adobe/helix-shared-config-v10.0.0) (2023-01-31)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
package/src/ModifiersConfig.js
CHANGED
|
@@ -48,7 +48,7 @@ export class ModifiersConfig {
|
|
|
48
48
|
// eslint-disable-next-line no-param-reassign
|
|
49
49
|
prev[key.toLowerCase()] = obj[key];
|
|
50
50
|
return prev;
|
|
51
|
-
},
|
|
51
|
+
}, Object.create(null));
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
/**
|
|
@@ -88,7 +88,7 @@ export class ModifiersConfig {
|
|
|
88
88
|
*/
|
|
89
89
|
static parseModifierSheet(sheet, keyFilter = () => true) {
|
|
90
90
|
/** @type ModifierMap */
|
|
91
|
-
const res =
|
|
91
|
+
const res = Object.create(null);
|
|
92
92
|
for (let row of sheet) {
|
|
93
93
|
row = ModifiersConfig.toLowerKeys(row);
|
|
94
94
|
const {
|
|
@@ -158,9 +158,9 @@ export class ModifiersConfig {
|
|
|
158
158
|
*/
|
|
159
159
|
getModifiers(path) {
|
|
160
160
|
if (!this.modifiers) {
|
|
161
|
-
return
|
|
161
|
+
return Object.create(null);
|
|
162
162
|
}
|
|
163
|
-
const modifiers =
|
|
163
|
+
const modifiers = Object.create(null);
|
|
164
164
|
for (const { pat, mods } of this.modifiers) {
|
|
165
165
|
if (pat === path || (pat instanceof RegExp && pat.test(path))) {
|
|
166
166
|
for (const { key, value } of mods) {
|