@bigcommerce/stencil-cli 9.0.0 → 9.0.2

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/README.md CHANGED
@@ -8,7 +8,7 @@ The BigCommerce server emulator for local theme development.
8
8
  ## Install
9
9
 
10
10
  Note: Stencil requires the Node.js runtime environment,
11
- versions 20.x are supported.
11
+ versions 20.x, 22.x are supported.
12
12
 
13
13
  Run `npm install -g @bigcommerce/stencil-cli`.
14
14
 
@@ -74,15 +74,19 @@ utils.mergeThemeConfiguration = async (options) => {
74
74
  continue;
75
75
  }
76
76
  const defaultVal = localConfig.settings[key];
77
+ // Compare against the variation override (when present) so stale ones get cleared.
78
+ const effectiveLocalVal = _.has(variation.settings, key)
79
+ ? variation.settings[key]
80
+ : defaultVal;
77
81
  // Check for different types, and throw an error if they are found
78
- if (typeof defaultVal !== typeof remoteVal) {
82
+ if (typeof effectiveLocalVal !== typeof remoteVal) {
79
83
  throw new Error(
80
84
  `Theme configuration key "${key}" cannot be merged because it is not of the same type. ` +
81
- `Remote configuration is of type ${typeof remoteVal} while local configuration is of type ${typeof defaultVal}.`,
85
+ `Remote configuration is of type ${typeof remoteVal} while local configuration is of type ${typeof effectiveLocalVal}.`,
82
86
  );
83
87
  }
84
88
  // If a different value is found, overwrite the local config
85
- if (!_.isEqual(defaultVal, remoteVal)) {
89
+ if (!_.isEqual(effectiveLocalVal, remoteVal)) {
86
90
  if (!variation.settings) {
87
91
  variation.settings = {};
88
92
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigcommerce/stencil-cli",
3
- "version": "9.0.0",
3
+ "version": "9.0.2",
4
4
  "type": "module",
5
5
  "description": "CLI tool to run BigCommerce Stores locally for theme development.",
6
6
  "main": "index.js",
@@ -50,7 +50,7 @@
50
50
  "package-lock.json"
51
51
  ],
52
52
  "dependencies": {
53
- "@bigcommerce/stencil-paper": "5.3.0",
53
+ "@bigcommerce/stencil-paper": "5.4.1",
54
54
  "@bigcommerce/stencil-styles": "6.2.6",
55
55
  "@hapi/boom": "^10.0.1",
56
56
  "@hapi/glue": "^9.0.1",