@adobe/helix-shared-config 2.1.0 → 2.1.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 CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.1.1](https://github.com/adobe/helix-shared/compare/@adobe/helix-shared-config@2.1.0...@adobe/helix-shared-config@2.1.1) (2022-05-23)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * proxy clone to not change original configuration ([#686](https://github.com/adobe/helix-shared/issues/686)) ([96f9ce7](https://github.com/adobe/helix-shared/commit/96f9ce7dc90cd97efc44ecd7a06151451dee9d3e))
12
+
13
+
14
+
15
+
16
+
6
17
  # [2.1.0](https://github.com/adobe/helix-shared/compare/@adobe/helix-shared-config@2.0.7...@adobe/helix-shared-config@2.1.0) (2022-05-20)
7
18
 
8
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-shared-config",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "Shared modules of the Helix Project - config",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -49,5 +49,5 @@
49
49
  "mocha": "10.0.0",
50
50
  "nock": "13.2.4"
51
51
  },
52
- "gitHead": "e77cc809f42f4b6b13e4274ddf106a6c84f8abfa"
52
+ "gitHead": "84e3915214c73e1078526b45c7d5116836a62a50"
53
53
  }
@@ -53,7 +53,6 @@ class IndexConfig extends SchemaDerivedConfig {
53
53
  throw new Error(`Unable to add index definition with existing name: ${name}`);
54
54
  }
55
55
  indices[name] = {
56
- name,
57
56
  include,
58
57
  exclude,
59
58
  target,
@@ -135,10 +135,11 @@ class SchemaDerivedConfig extends BaseConfig {
135
135
  await this.loadConfig();
136
136
  await this.validate();
137
137
 
138
- this._content = new Proxy(this._cfg, this.defaultHandler(''));
138
+ const cfg = JSON.parse(JSON.stringify(this._cfg));
139
+ this._content = new Proxy(cfg, this.defaultHandler(''));
139
140
 
140
141
  // redefine getters
141
- Object.keys(this._cfg).forEach((key) => {
142
+ Object.keys(cfg).forEach((key) => {
142
143
  if (!(key in this)) {
143
144
  this[key] = this._content[key];
144
145
  }