@commercetools/sync-actions 8.2.0 → 8.2.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
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @commercetools/sync-actions
|
|
2
2
|
|
|
3
|
+
## 8.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#49](https://github.com/commercetools/typescript-dev-utilities/pull/49) [`41a6524`](https://github.com/commercetools/typescript-dev-utilities/commit/41a65244b2affccd304c739216fa8754d37128b2) Thanks [@kafis](https://github.com/kafis)! - fix addAsset action generation for product-tailoring when more than one asset is added to a previously undefined asset array
|
|
8
|
+
|
|
3
9
|
## 8.2.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
@@ -43771,6 +43771,12 @@ function _buildVariantChangeAssetOrderAction2(diffAssets, oldVariant, newVariant
|
|
|
43771
43771
|
];
|
|
43772
43772
|
}
|
|
43773
43773
|
function _buildVariantAssetsActions2(diffAssets, oldVariant, newVariant) {
|
|
43774
|
+
if (Array.isArray(diffAssets) && diffAssets.length === 1 && Array.isArray(diffAssets[0])) {
|
|
43775
|
+
return diffAssets[0].map((asset) => __spreadValues({
|
|
43776
|
+
action: "addAsset",
|
|
43777
|
+
asset
|
|
43778
|
+
}, toVariantIdentifier2(newVariant)));
|
|
43779
|
+
}
|
|
43774
43780
|
const assetActions = [];
|
|
43775
43781
|
const matchingAssetPairs = findMatchingPairs(
|
|
43776
43782
|
diffAssets,
|
|
@@ -3701,6 +3701,13 @@ function _buildVariantChangeAssetOrderAction2(diffAssets, oldVariant, newVariant
|
|
|
3701
3701
|
];
|
|
3702
3702
|
}
|
|
3703
3703
|
function _buildVariantAssetsActions2(diffAssets, oldVariant, newVariant) {
|
|
3704
|
+
if (Array.isArray(diffAssets) && diffAssets.length === 1 && Array.isArray(diffAssets[0])) {
|
|
3705
|
+
return diffAssets[0].map((asset) => ({
|
|
3706
|
+
action: "addAsset",
|
|
3707
|
+
asset,
|
|
3708
|
+
...toVariantIdentifier2(newVariant)
|
|
3709
|
+
}));
|
|
3710
|
+
}
|
|
3704
3711
|
const assetActions = [];
|
|
3705
3712
|
const matchingAssetPairs = findMatchingPairs(
|
|
3706
3713
|
diffAssets,
|