@ignifx/particles 0.10.0 → 0.12.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/dist/index.js +13 -5
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/skills/particles/SKILL.md +2 -2
package/dist/index.js
CHANGED
|
@@ -2655,7 +2655,10 @@ function mergeDeep(base, overrides) {
|
|
|
2655
2655
|
return mergeRecords(base, overrides);
|
|
2656
2656
|
}
|
|
2657
2657
|
/**
|
|
2658
|
-
* Merges two plain records recursively: objects merge, everything else is replaced.
|
|
2658
|
+
* Merges two plain records recursively: objects merge, everything else is replaced. Only own keys
|
|
2659
|
+
* are read, and each result is defined rather than assigned, so an override key such as
|
|
2660
|
+
* `__proto__` (an own key in parsed JSON) stays a field that `defineParticles` then refuses,
|
|
2661
|
+
* instead of merging with `Object.prototype` and replacing the result's prototype.
|
|
2659
2662
|
*
|
|
2660
2663
|
* @param base - The record being overridden.
|
|
2661
2664
|
* @param overrides - The overrides.
|
|
@@ -2667,9 +2670,14 @@ function mergeRecords(base, overrides) {
|
|
|
2667
2670
|
for (const key of Object.keys(source)) {
|
|
2668
2671
|
const value = source[key];
|
|
2669
2672
|
if (value === void 0) continue;
|
|
2670
|
-
const existing = out[key];
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
+
const existing = Object.hasOwn(out, key) ? out[key] : void 0;
|
|
2674
|
+
const merged = isPlainRecord(value) && isPlainRecord(existing) ? mergeRecords(existing, value) : value;
|
|
2675
|
+
Object.defineProperty(out, key, {
|
|
2676
|
+
value: merged,
|
|
2677
|
+
enumerable: true,
|
|
2678
|
+
writable: true,
|
|
2679
|
+
configurable: true
|
|
2680
|
+
});
|
|
2673
2681
|
}
|
|
2674
2682
|
return out;
|
|
2675
2683
|
}
|
|
@@ -5717,7 +5725,7 @@ function particlesSettingsSchema() {
|
|
|
5717
5725
|
*
|
|
5718
5726
|
* @public
|
|
5719
5727
|
*/
|
|
5720
|
-
const VERSION = "0.
|
|
5728
|
+
const VERSION = "0.12.0";
|
|
5721
5729
|
//#endregion
|
|
5722
5730
|
//#region src/extension.ts
|
|
5723
5731
|
/**
|