@commercetools/sync-actions 7.0.0-rc.1 → 7.0.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/CHANGELOG.md +221 -0
- package/dist/sync-actions.cjs.js +5 -1
- package/dist/sync-actions.es.js +5 -1
- package/dist/sync-actions.umd.js +5 -1
- package/dist/sync-actions.umd.min.js +1 -1
- package/package.json +1 -1
- package/lib/cart-discounts-actions.js +0 -31
- package/lib/cart-discounts.js +0 -70
- package/lib/categories.js +0 -106
- package/lib/category-actions.js +0 -117
- package/lib/channels.js +0 -0
- package/lib/customer-actions.js +0 -125
- package/lib/customer-group-actions.js +0 -23
- package/lib/customer-group.js +0 -70
- package/lib/customers.js +0 -95
- package/lib/discount-codes-actions.js +0 -31
- package/lib/discount-codes.js +0 -80
- package/lib/index.js +0 -90
- package/lib/inventories.js +0 -89
- package/lib/inventory-actions.js +0 -42
- package/lib/order-actions.js +0 -71
- package/lib/orders.js +0 -89
- package/lib/product-actions.js +0 -779
- package/lib/product-discounts-actions.js +0 -27
- package/lib/product-discounts.js +0 -71
- package/lib/products.js +0 -208
- package/lib/utils/clone.js +0 -9
- package/lib/utils/common-actions.js +0 -157
- package/lib/utils/create-build-actions.js +0 -74
- package/lib/utils/create-build-array-actions.js +0 -146
- package/lib/utils/create-map-action-group.js +0 -35
- package/lib/utils/diffpatcher.js +0 -93
- package/lib/utils/find-matching-pairs.js +0 -67
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
# @commercetools/sync-actions
|
|
2
|
+
|
|
3
|
+
## 7.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#1930](https://github.com/commercetools/nodejs/pull/1930) [`5a56792`](https://github.com/commercetools/nodejs/commit/5a5679256a4a7e4b90bc47b945b12acb4f70b411) Thanks [@tdeekens](https://github.com/tdeekens)! - # Requires Node.js v18 or later
|
|
8
|
+
|
|
9
|
+
This releases migrates packages to require Node.js v18 or later. Ideally you should be already using Node.js v20 or later. According to [Node.js Releases](https://nodejs.org/en/about/previous-releases) Node.js v18 will be in maintenance and reach End of Life by the end of April.
|
|
10
|
+
|
|
11
|
+
Other than requiring Node.js v18 packages with this releases do not contain any internal breaking changes.
|
|
12
|
+
|
|
13
|
+
## 6.1.1
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#1927](https://github.com/commercetools/nodejs/pull/1927) [`a4705c19`](https://github.com/commercetools/nodejs/commit/a4705c19af234cccde74cb52bfff912bf380c6ba) Thanks [@CarlosCortizasCT](https://github.com/CarlosCortizasCT)! - We found an issue in the way the `jsondiffpatch` was used that made this package not usable in a browser environment.
|
|
18
|
+
|
|
19
|
+
In this version we adjust the way that package is imported and we pin a transitive dependency (`chalk`) to fix the error.
|
|
20
|
+
|
|
21
|
+
## 6.1.0
|
|
22
|
+
|
|
23
|
+
### Minor Changes
|
|
24
|
+
|
|
25
|
+
- [#1921](https://github.com/commercetools/nodejs/pull/1921) [`c9d23e86`](https://github.com/commercetools/nodejs/commit/c9d23e86a6013aafb6a3c296121e1c5995d9eab6) Thanks [@kafis](https://github.com/kafis)! - Introducing configuration to control the behaviour regarding generation of UpdateActions in respect to unsetting fields
|
|
26
|
+
|
|
27
|
+
## 6.0.0
|
|
28
|
+
|
|
29
|
+
### Major Changes
|
|
30
|
+
|
|
31
|
+
- [#1919](https://github.com/commercetools/nodejs/pull/1919) [`1c867e02`](https://github.com/commercetools/nodejs/commit/1c867e02285f5030d5ef7aebef46ea27e5e8521b) Thanks [@CarlosCortizasCT](https://github.com/CarlosCortizasCT)! - Update the way we import the `jsondiffpath` dependency to use `import` instead of `require`.
|
|
32
|
+
|
|
33
|
+
## 5.19.2
|
|
34
|
+
|
|
35
|
+
### Patch Changes
|
|
36
|
+
|
|
37
|
+
- [#1914](https://github.com/commercetools/nodejs/pull/1914) [`6e1195ed`](https://github.com/commercetools/nodejs/commit/6e1195ed05cc3338eac94e47f439f10b7b0e6e75) Thanks [@antoniolodias](https://github.com/antoniolodias)! - fix: filter out unchanged taxrates from changed list
|
|
38
|
+
|
|
39
|
+
## 5.19.1
|
|
40
|
+
|
|
41
|
+
### Patch Changes
|
|
42
|
+
|
|
43
|
+
- [#1912](https://github.com/commercetools/nodejs/pull/1912) [`06866537`](https://github.com/commercetools/nodejs/commit/06866537feb04eaf26521d43b654cbc2920bab0d) Thanks [@markus-azer](https://github.com/markus-azer)! - Fix product action groups category order hints
|
|
44
|
+
|
|
45
|
+
## 5.19.0
|
|
46
|
+
|
|
47
|
+
### Minor Changes
|
|
48
|
+
|
|
49
|
+
- [#1908](https://github.com/commercetools/nodejs/pull/1908) [`df373a1a`](https://github.com/commercetools/nodejs/commit/df373a1adbcaa2340b0af0656fd0dbab055329f8) Thanks [@ChristianMoll](https://github.com/ChristianMoll)! - Fix action keys for changeMyBusinessUnitStatusOnCreation, setMyBusinessUnitAssociateRoleOnCreation and changeCustomerSearchStatus
|
|
50
|
+
|
|
51
|
+
## 5.18.0
|
|
52
|
+
|
|
53
|
+
### Minor Changes
|
|
54
|
+
|
|
55
|
+
- [#1903](https://github.com/commercetools/nodejs/pull/1903) [`164f1ce7`](https://github.com/commercetools/nodejs/commit/164f1ce7526bb15a16f531572518cbb6ddd61098) Thanks [@ChristianMoll](https://github.com/ChristianMoll)! - Add sync actions changeMyBusinessUnitStatusOnCreation, setMyBusinessUnitAssociateRoleOnCreation and changeCustomerSearchStatus
|
|
56
|
+
|
|
57
|
+
## 5.17.0
|
|
58
|
+
|
|
59
|
+
### Minor Changes
|
|
60
|
+
|
|
61
|
+
- [#1897](https://github.com/commercetools/nodejs/pull/1897) [`940dd70b`](https://github.com/commercetools/nodejs/commit/940dd70ba53c51e0fb74849aadb688db6add764d) Thanks [@antoniolodias](https://github.com/antoniolodias)! - add changeActive to shipping methods base actions
|
|
62
|
+
|
|
63
|
+
## 5.16.0
|
|
64
|
+
|
|
65
|
+
### Minor Changes
|
|
66
|
+
|
|
67
|
+
- [#1892](https://github.com/commercetools/nodejs/pull/1892) [`fb03b746`](https://github.com/commercetools/nodejs/commit/fb03b7463a990934d2b11fd17b784af104431cc4) Thanks [@ragafus](https://github.com/ragafus)! - Add support for DiscountCodes `setKey` action.
|
|
68
|
+
|
|
69
|
+
## 5.15.0
|
|
70
|
+
|
|
71
|
+
### Minor Changes
|
|
72
|
+
|
|
73
|
+
- [#1885](https://github.com/commercetools/nodejs/pull/1885) [`d6cb2740`](https://github.com/commercetools/nodejs/commit/d6cb27401279cb42a49366f32802f8ca8c7f01a3) Thanks [@kafis](https://github.com/kafis)! - Add support for 'changeAssetOrder' in (ProductVariants)[https://docs.commercetools.com/api/projects/products#change-asset-order].
|
|
74
|
+
|
|
75
|
+
## 5.14.0
|
|
76
|
+
|
|
77
|
+
### Minor Changes
|
|
78
|
+
|
|
79
|
+
- [#1876](https://github.com/commercetools/nodejs/pull/1876) [`27f0d2b6`](https://github.com/commercetools/nodejs/commit/27f0d2b66fefbe082b6a27e7fa940b09e7e6088c) Thanks [@jaikumar-tj](https://github.com/jaikumar-tj)! - Add support for attribute groups `changeName`, `setKey`, `setDescription`, `addAttribute` and `removeAttribute` actions.
|
|
80
|
+
|
|
81
|
+
## 5.13.0
|
|
82
|
+
|
|
83
|
+
### Minor Changes
|
|
84
|
+
|
|
85
|
+
- [#1874](https://github.com/commercetools/nodejs/pull/1874) [`69f4501d`](https://github.com/commercetools/nodejs/commit/69f4501dc5401ab2b44f4d3096a978094e402c9f) Thanks [@taylor-knapp](https://github.com/taylor-knapp)! - Handle long text values performantly
|
|
86
|
+
|
|
87
|
+
## 5.12.2
|
|
88
|
+
|
|
89
|
+
### Patch Changes
|
|
90
|
+
|
|
91
|
+
- [#1871](https://github.com/commercetools/nodejs/pull/1871) [`4f8ea39b`](https://github.com/commercetools/nodejs/commit/4f8ea39b66ddd5014ac8f923ed980584bd96290c) Thanks [@ARRIOLALEO](https://github.com/ARRIOLALEO)! - rollback setPriceTiers name change
|
|
92
|
+
|
|
93
|
+
## 5.12.1
|
|
94
|
+
|
|
95
|
+
### Patch Changes
|
|
96
|
+
|
|
97
|
+
- [#1869](https://github.com/commercetools/nodejs/pull/1869) [`7285a9fb`](https://github.com/commercetools/nodejs/commit/7285a9fbcbcfca6a9460e36ba7b58bb30f34fac6) Thanks [@ARRIOLALEO](https://github.com/ARRIOLALEO)! - Add support for StandalonePrice `setPriceTier`
|
|
98
|
+
|
|
99
|
+
## 5.12.0
|
|
100
|
+
|
|
101
|
+
### Minor Changes
|
|
102
|
+
|
|
103
|
+
- [#1863](https://github.com/commercetools/nodejs/pull/1863) [`7ed7a663`](https://github.com/commercetools/nodejs/commit/7ed7a663c1cb3aa87bfb4b4c2c008949a66a62e0) Thanks [@ragafus](https://github.com/ragafus)! - Add support for StandalonePrice `setKey`, `setValidFrom`, `setValidUntil`, `setValidFromAndUntil` and `changeActive` actions.
|
|
104
|
+
|
|
105
|
+
## 5.11.0
|
|
106
|
+
|
|
107
|
+
### Minor Changes
|
|
108
|
+
|
|
109
|
+
- [#1864](https://github.com/commercetools/nodejs/pull/1864) [`91f6b617`](https://github.com/commercetools/nodejs/commit/91f6b61794e7d66766097965e452e14c85e40f14) Thanks [@ARRIOLALEO](https://github.com/ARRIOLALEO)! - Add support for StandalonePrice `setPriceTiers`
|
|
110
|
+
|
|
111
|
+
## 5.10.0
|
|
112
|
+
|
|
113
|
+
### Minor Changes
|
|
114
|
+
|
|
115
|
+
- [#1856](https://github.com/commercetools/nodejs/pull/1856) [`9a3e3711`](https://github.com/commercetools/nodejs/commit/9a3e3711bf6594deafb5d54a9ce9e32450f9c4d6) Thanks [@qmateub](https://github.com/qmateub)! - orders sync-actions: support action on delivery items `setDeliveryItems`
|
|
116
|
+
|
|
117
|
+
## 5.9.0
|
|
118
|
+
|
|
119
|
+
### Minor Changes
|
|
120
|
+
|
|
121
|
+
- [#1853](https://github.com/commercetools/nodejs/pull/1853) [`4bb8f979`](https://github.com/commercetools/nodejs/commit/4bb8f979c317bbce1654ca0f1abc9b4717fdda0b) Thanks [@markus-azer](https://github.com/markus-azer)! - types sync-actions: support the following actions `changeInputHint`, `changeEnumValueLabel`, `changeLocalizedEnumValueLabel`.
|
|
122
|
+
|
|
123
|
+
## 5.8.0
|
|
124
|
+
|
|
125
|
+
### Minor Changes
|
|
126
|
+
|
|
127
|
+
- [#1852](https://github.com/commercetools/nodejs/pull/1852) [`94a376c8`](https://github.com/commercetools/nodejs/commit/94a376c89525b7cee58b710154ddf7cb146cd16c) Thanks [@markus-azer](https://github.com/markus-azer)! - types sync-actions: fix action structure for changeFieldDefinitionOrder
|
|
128
|
+
fix internal type sync error by adding optional chaining
|
|
129
|
+
|
|
130
|
+
## 5.7.0
|
|
131
|
+
|
|
132
|
+
### Minor Changes
|
|
133
|
+
|
|
134
|
+
- [#1850](https://github.com/commercetools/nodejs/pull/1850) [`330cd9a9`](https://github.com/commercetools/nodejs/commit/330cd9a9b4fca045d479d2d220d2a2a2b966b1f4) Thanks [@markus-azer](https://github.com/markus-azer)! - types sync-actions: fix action structure for changeLocalizedEnumValueOrder, changeEnumValueOrder
|
|
135
|
+
|
|
136
|
+
## 5.6.0
|
|
137
|
+
|
|
138
|
+
### Minor Changes
|
|
139
|
+
|
|
140
|
+
- [#1844](https://github.com/commercetools/nodejs/pull/1844) [`23f0529b`](https://github.com/commercetools/nodejs/commit/23f0529bbf359a11500dbf87bdc9e59cb759c89a) Thanks [@markus-azer](https://github.com/markus-azer)! - Add localizedName action to shipping methods
|
|
141
|
+
|
|
142
|
+
## 5.5.0
|
|
143
|
+
|
|
144
|
+
### Minor Changes
|
|
145
|
+
|
|
146
|
+
- [#1841](https://github.com/commercetools/nodejs/pull/1841) [`b90c7238`](https://github.com/commercetools/nodejs/commit/b90c7238f0d3d892e1066fd2883cff062b099e66) Thanks [@Rombelirk](https://github.com/Rombelirk)! - Add Custom Fields to Shipping Methods.
|
|
147
|
+
|
|
148
|
+
## 5.4.1
|
|
149
|
+
|
|
150
|
+
### Patch Changes
|
|
151
|
+
|
|
152
|
+
- [#1839](https://github.com/commercetools/nodejs/pull/1839) [`d6cadcbc`](https://github.com/commercetools/nodejs/commit/d6cadcbc4b850fa6f438b65c3b63b294a32a58ee) Thanks [@tdeekens](https://github.com/tdeekens)! - Fix failing to sync froozen arrays for prices
|
|
153
|
+
|
|
154
|
+
## 5.4.0
|
|
155
|
+
|
|
156
|
+
### Minor Changes
|
|
157
|
+
|
|
158
|
+
- [#1836](https://github.com/commercetools/nodejs/pull/1836) [`ad34d030`](https://github.com/commercetools/nodejs/commit/ad34d03041e7e6b8284da6224dc968fde537a85a) Thanks [@nicolasnieto92](https://github.com/nicolasnieto92)! - Add setAuthenticationMode sync action
|
|
159
|
+
|
|
160
|
+
## 5.3.1
|
|
161
|
+
|
|
162
|
+
### Patch Changes
|
|
163
|
+
|
|
164
|
+
- [#1818](https://github.com/commercetools/nodejs/pull/1818) [`856929e3`](https://github.com/commercetools/nodejs/commit/856929e3bc176021a9b52e1ff9c888e51c83cccd) Thanks [@qmateub](https://github.com/qmateub)! - fix(sync-actions/orders): adjust diff calculation of returnInfo items
|
|
165
|
+
|
|
166
|
+
## 5.3.0
|
|
167
|
+
|
|
168
|
+
### Minor Changes
|
|
169
|
+
|
|
170
|
+
- [#1820](https://github.com/commercetools/nodejs/pull/1820) [`c3964026`](https://github.com/commercetools/nodejs/commit/c3964026b401cb1c8ae8b581a3fcc4ea692ed3b4) Thanks [@danrleyt](https://github.com/danrleyt)! - Adding support to quote requests and staged quotes
|
|
171
|
+
|
|
172
|
+
## 5.2.0
|
|
173
|
+
|
|
174
|
+
### Minor Changes
|
|
175
|
+
|
|
176
|
+
- [`cad54c42`](https://github.com/commercetools/nodejs/commit/cad54c421e18464ae03fb283a30f2ba2f3f6e46a) Thanks [@qmateub](https://github.com/qmateub)! - feat(sync-actions): improve performance for large arrays comparisons"
|
|
177
|
+
|
|
178
|
+
## 5.1.0
|
|
179
|
+
|
|
180
|
+
### Minor Changes
|
|
181
|
+
|
|
182
|
+
- [#1803](https://github.com/commercetools/nodejs/pull/1803) [`823985ae`](https://github.com/commercetools/nodejs/commit/823985ae67465673c26f296b68681f255230d571) Thanks [@nicolasnieto92](https://github.com/nicolasnieto92)! - Add createSyncStandalonePrices export to index for supporting prices sync actions
|
|
183
|
+
|
|
184
|
+
## 5.0.0
|
|
185
|
+
|
|
186
|
+
### Major Changes
|
|
187
|
+
|
|
188
|
+
- [#1775](https://github.com/commercetools/nodejs/pull/1775) [`35669f30`](https://github.com/commercetools/nodejs/commit/35669f30dbc4b24d59ec3df3f38417b1f2a77837) Thanks [@ajimae](https://github.com/ajimae)! - Drop support for Node `v10` and `v12`. Supported versions now are `v14`, `v16` and `v18`.
|
|
189
|
+
|
|
190
|
+
## 4.13.0
|
|
191
|
+
|
|
192
|
+
### Minor Changes
|
|
193
|
+
|
|
194
|
+
- [#1798](https://github.com/commercetools/nodejs/pull/1798) [`850325d0`](https://github.com/commercetools/nodejs/commit/850325d08603764787c387b2341e4009d0c4f788) Thanks [@markus-azer](https://github.com/markus-azer)! - support standalone prices
|
|
195
|
+
|
|
196
|
+
## 4.12.0
|
|
197
|
+
|
|
198
|
+
### Minor Changes
|
|
199
|
+
|
|
200
|
+
- [#1796](https://github.com/commercetools/nodejs/pull/1796) [`7aaf91cd`](https://github.com/commercetools/nodejs/commit/7aaf91cdecb7c844943369fc137a5356becdba36) Thanks [@VineetKumarKushwaha](https://github.com/VineetKumarKushwaha)! - Fix custom types sync actions to detect addEnumValue action correctly
|
|
201
|
+
|
|
202
|
+
## 4.11.0
|
|
203
|
+
|
|
204
|
+
### Minor Changes
|
|
205
|
+
|
|
206
|
+
- [#1788](https://github.com/commercetools/nodejs/pull/1788) [`f1acfb67`](https://github.com/commercetools/nodejs/commit/f1acfb67708d8253f551481fd65097add48c6686) Thanks [@nicolasnieto92](https://github.com/nicolasnieto92)! - Add setPriceMode sync action for commercetools-importer project
|
|
207
|
+
|
|
208
|
+
## 4.10.1
|
|
209
|
+
|
|
210
|
+
### Patch Changes
|
|
211
|
+
|
|
212
|
+
- [#1770](https://github.com/commercetools/nodejs/pull/1770) [`381d1e1f`](https://github.com/commercetools/nodejs/commit/381d1e1f07cc2705962973e3a48934bf7884e309) Thanks [@mohib0306](https://github.com/mohib0306)! - Fix product selection's name update action. `setName` => `changeName`
|
|
213
|
+
Expose `createSyncProductSelections` from `sync-actions` package
|
|
214
|
+
|
|
215
|
+
## 4.10.0
|
|
216
|
+
|
|
217
|
+
### Minor Changes
|
|
218
|
+
|
|
219
|
+
- [#1767](https://github.com/commercetools/nodejs/pull/1767) [`1aef3423`](https://github.com/commercetools/nodejs/commit/1aef3423e96da7f5df20fd5f66ec29146cacee83) Thanks [@mohib0306](https://github.com/mohib0306)! - feat(sync-actions/product-selections): add sync action support for product selections
|
|
220
|
+
|
|
221
|
+
As product selections are available via the API, the sync-actions package is updated to support generating update actions for product selections.
|
package/dist/sync-actions.cjs.js
CHANGED
|
@@ -1508,11 +1508,15 @@ var DiffPatcher = /*#__PURE__*/function () {
|
|
|
1508
1508
|
}]);
|
|
1509
1509
|
}();
|
|
1510
1510
|
|
|
1511
|
+
function create(options) {
|
|
1512
|
+
return new DiffPatcher(options);
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1511
1515
|
function objectHash(obj, index) {
|
|
1512
1516
|
var objIndex = "$$index:".concat(index);
|
|
1513
1517
|
return _typeof(obj) === 'object' && obj !== null ? obj.id || obj.name || obj.url || objIndex : objIndex;
|
|
1514
1518
|
}
|
|
1515
|
-
var diffpatcher =
|
|
1519
|
+
var diffpatcher = create({
|
|
1516
1520
|
objectHash: objectHash,
|
|
1517
1521
|
arrays: {
|
|
1518
1522
|
// detect items moved inside the array
|
package/dist/sync-actions.es.js
CHANGED
|
@@ -1506,11 +1506,15 @@ var DiffPatcher = /*#__PURE__*/function () {
|
|
|
1506
1506
|
}]);
|
|
1507
1507
|
}();
|
|
1508
1508
|
|
|
1509
|
+
function create(options) {
|
|
1510
|
+
return new DiffPatcher(options);
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1509
1513
|
function objectHash(obj, index) {
|
|
1510
1514
|
var objIndex = "$$index:".concat(index);
|
|
1511
1515
|
return _typeof(obj) === 'object' && obj !== null ? obj.id || obj.name || obj.url || objIndex : objIndex;
|
|
1512
1516
|
}
|
|
1513
|
-
var diffpatcher =
|
|
1517
|
+
var diffpatcher = create({
|
|
1514
1518
|
objectHash: objectHash,
|
|
1515
1519
|
arrays: {
|
|
1516
1520
|
// detect items moved inside the array
|
package/dist/sync-actions.umd.js
CHANGED
|
@@ -1503,11 +1503,15 @@
|
|
|
1503
1503
|
}]);
|
|
1504
1504
|
}();
|
|
1505
1505
|
|
|
1506
|
+
function create(options) {
|
|
1507
|
+
return new DiffPatcher(options);
|
|
1508
|
+
}
|
|
1509
|
+
|
|
1506
1510
|
function objectHash(obj, index) {
|
|
1507
1511
|
var objIndex = "$$index:".concat(index);
|
|
1508
1512
|
return _typeof(obj) === 'object' && obj !== null ? obj.id || obj.name || obj.url || objIndex : objIndex;
|
|
1509
1513
|
}
|
|
1510
|
-
var diffpatcher =
|
|
1514
|
+
var diffpatcher = create({
|
|
1511
1515
|
objectHash: objectHash,
|
|
1512
1516
|
arrays: {
|
|
1513
1517
|
// detect items moved inside the array
|