@bigcommerce/stencil-cli 9.0.1 → 9.0.3
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/lib/archiveManager.js
CHANGED
|
@@ -44,6 +44,10 @@ async function extractZipFiles({ zipPath, fileToExtract, exclude = [], outputNam
|
|
|
44
44
|
resolve();
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
47
|
+
// Windows: yield a tick so the previous entry's read stream (zlib
|
|
48
|
+
// inflate + fd) fully tears down before requesting the next one,
|
|
49
|
+
// otherwise readEntry() can stall (observed on windows-latest/Node 24 CI).
|
|
50
|
+
await new Promise(setImmediate);
|
|
47
51
|
zipFile.readEntry();
|
|
48
52
|
} catch (err) {
|
|
49
53
|
reject(err);
|
|
@@ -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
|
|
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
|
|
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(
|
|
89
|
+
if (!_.isEqual(effectiveLocalVal, remoteVal)) {
|
|
86
90
|
if (!variation.settings) {
|
|
87
91
|
variation.settings = {};
|
|
88
92
|
}
|