Skip to content

Commit e90edec

Browse files
author
vineet kumar
authored
Merge branch 'master' into 1639-remove-vulnerability
2 parents 0a50769 + 2379f14 commit e90edec

File tree

8 files changed

+208
-15
lines changed

8 files changed

+208
-15
lines changed

CHANGELOG.md

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,123 @@
1+
## @commercetools/sync-actions@4.9.0 (2020-11-19)
2+
3+
#### :rocket: New Feature
4+
5+
- `sync-actions`
6+
- [#1638](https://github.com/commercetools/nodejs/pull/1638) feat(sync-actions/stores): add support custom fields actions on store level ([@mohib0306](https://github.com/mohib0306))
7+
8+
#### :memo: Documentation
9+
10+
- [#1631](https://github.com/commercetools/nodejs/pull/1631) docs(typescript): update the docs for the typescript SDK ([@jenschude](https://github.com/jenschude))
11+
12+
#### :house: Maintenance
13+
14+
- Other
15+
- [#1635](https://github.com/commercetools/nodejs/pull/1635) 1634 Github Pages: add ip anonymization to the ga ([@VineetKumarKushwaha](https://github.com/VineetKumarKushwaha))
16+
- `typescript-sdk`
17+
- [#1630](https://github.com/commercetools/nodejs/pull/1630) chore(Packages): remove typescript SDK from repo ([@jenschude](https://github.com/jenschude))
18+
19+
#### Committers: 3
20+
21+
- Jens Schulze ([@jenschude](https://github.com/jenschude))
22+
- [@mohib0306](https://github.com/mohib0306)
23+
- vineet kumar ([@VineetKumarKushwaha](https://github.com/VineetKumarKushwaha))
24+
25+
## @commercetools/state-importer@3.0.31 (2020-11-19)
26+
27+
#### :rocket: New Feature
28+
29+
- `sync-actions`
30+
- [#1638](https://github.com/commercetools/nodejs/pull/1638) feat(sync-actions/stores): add support custom fields actions on store level ([@mohib0306](https://github.com/mohib0306))
31+
32+
#### :memo: Documentation
33+
34+
- [#1631](https://github.com/commercetools/nodejs/pull/1631) docs(typescript): update the docs for the typescript SDK ([@jenschude](https://github.com/jenschude))
35+
36+
#### :house: Maintenance
37+
38+
- Other
39+
- [#1635](https://github.com/commercetools/nodejs/pull/1635) 1634 Github Pages: add ip anonymization to the ga ([@VineetKumarKushwaha](https://github.com/VineetKumarKushwaha))
40+
- `typescript-sdk`
41+
- [#1630](https://github.com/commercetools/nodejs/pull/1630) chore(Packages): remove typescript SDK from repo ([@jenschude](https://github.com/jenschude))
42+
43+
#### Committers: 3
44+
45+
- Jens Schulze ([@jenschude](https://github.com/jenschude))
46+
- [@mohib0306](https://github.com/mohib0306)
47+
- vineet kumar ([@VineetKumarKushwaha](https://github.com/VineetKumarKushwaha))
48+
49+
## @commercetools/integration-tests@0.1.9 (2020-11-19)
50+
51+
#### :rocket: New Feature
52+
53+
- `sync-actions`
54+
- [#1638](https://github.com/commercetools/nodejs/pull/1638) feat(sync-actions/stores): add support custom fields actions on store level ([@mohib0306](https://github.com/mohib0306))
55+
56+
#### :memo: Documentation
57+
58+
- [#1631](https://github.com/commercetools/nodejs/pull/1631) docs(typescript): update the docs for the typescript SDK ([@jenschude](https://github.com/jenschude))
59+
60+
#### :house: Maintenance
61+
62+
- Other
63+
- [#1635](https://github.com/commercetools/nodejs/pull/1635) 1634 Github Pages: add ip anonymization to the ga ([@VineetKumarKushwaha](https://github.com/VineetKumarKushwaha))
64+
- `typescript-sdk`
65+
- [#1630](https://github.com/commercetools/nodejs/pull/1630) chore(Packages): remove typescript SDK from repo ([@jenschude](https://github.com/jenschude))
66+
67+
#### Committers: 3
68+
69+
- Jens Schulze ([@jenschude](https://github.com/jenschude))
70+
- [@mohib0306](https://github.com/mohib0306)
71+
- vineet kumar ([@VineetKumarKushwaha](https://github.com/VineetKumarKushwaha))
72+
73+
## @commercetools/discount-code-importer@3.0.30 (2020-11-19)
74+
75+
#### :rocket: New Feature
76+
77+
- `sync-actions`
78+
- [#1638](https://github.com/commercetools/nodejs/pull/1638) feat(sync-actions/stores): add support custom fields actions on store level ([@mohib0306](https://github.com/mohib0306))
79+
80+
#### :memo: Documentation
81+
82+
- [#1631](https://github.com/commercetools/nodejs/pull/1631) docs(typescript): update the docs for the typescript SDK ([@jenschude](https://github.com/jenschude))
83+
84+
#### :house: Maintenance
85+
86+
- Other
87+
- [#1635](https://github.com/commercetools/nodejs/pull/1635) 1634 Github Pages: add ip anonymization to the ga ([@VineetKumarKushwaha](https://github.com/VineetKumarKushwaha))
88+
- `typescript-sdk`
89+
- [#1630](https://github.com/commercetools/nodejs/pull/1630) chore(Packages): remove typescript SDK from repo ([@jenschude](https://github.com/jenschude))
90+
91+
#### Committers: 3
92+
93+
- Jens Schulze ([@jenschude](https://github.com/jenschude))
94+
- [@mohib0306](https://github.com/mohib0306)
95+
- vineet kumar ([@VineetKumarKushwaha](https://github.com/VineetKumarKushwaha))
96+
97+
## @commercetools/custom-objects-importer@3.0.31 (2020-11-19)
98+
99+
#### :rocket: New Feature
100+
101+
- `sync-actions`
102+
- [#1638](https://github.com/commercetools/nodejs/pull/1638) feat(sync-actions/stores): add support custom fields actions on store level ([@mohib0306](https://github.com/mohib0306))
103+
104+
#### :memo: Documentation
105+
106+
- [#1631](https://github.com/commercetools/nodejs/pull/1631) docs(typescript): update the docs for the typescript SDK ([@jenschude](https://github.com/jenschude))
107+
108+
#### :house: Maintenance
109+
110+
- Other
111+
- [#1635](https://github.com/commercetools/nodejs/pull/1635) 1634 Github Pages: add ip anonymization to the ga ([@VineetKumarKushwaha](https://github.com/VineetKumarKushwaha))
112+
- `typescript-sdk`
113+
- [#1630](https://github.com/commercetools/nodejs/pull/1630) chore(Packages): remove typescript SDK from repo ([@jenschude](https://github.com/jenschude))
114+
115+
#### Committers: 3
116+
117+
- Jens Schulze ([@jenschude](https://github.com/jenschude))
118+
- [@mohib0306](https://github.com/mohib0306)
119+
- vineet kumar ([@VineetKumarKushwaha](https://github.com/VineetKumarKushwaha))
120+
1121
## @commercetools/typescript-sdk@0.0.22 (2020-09-29)
2122

3123
#### :rocket: New Feature

integration-tests/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
33
"name": "@commercetools/integration-tests",
4-
"version": "0.1.8",
4+
"version": "0.1.9",
55
"dependencies": {
66
"@commercetools/api-request-builder": "^5.6.3",
77
"@commercetools/category-exporter": "^3.0.20",
@@ -10,11 +10,11 @@
1010
"@commercetools/csv-parser-price": "^4.0.21",
1111
"@commercetools/csv-parser-state": "^3.0.19",
1212
"@commercetools/custom-objects-exporter": "^3.0.20",
13-
"@commercetools/custom-objects-importer": "^3.0.30",
13+
"@commercetools/custom-objects-importer": "^3.0.31",
1414
"@commercetools/customer-groups-exporter": "^3.0.20",
1515
"@commercetools/discount-code-exporter": "^4.0.20",
1616
"@commercetools/discount-code-generator": "^2.0.9",
17-
"@commercetools/discount-code-importer": "^3.0.29",
17+
"@commercetools/discount-code-importer": "^3.0.30",
1818
"@commercetools/get-credentials": "^3.0.17",
1919
"@commercetools/http-user-agent": "2.x",
2020
"@commercetools/inventories-exporter": "^3.0.21",
@@ -31,8 +31,8 @@
3131
"@commercetools/sdk-middleware-logger": "2.x",
3232
"@commercetools/sdk-middleware-queue": "^2.1.4",
3333
"@commercetools/sdk-middleware-user-agent": "^2.1.5",
34-
"@commercetools/state-importer": "^3.0.30",
35-
"@commercetools/sync-actions": "^4.8.4",
34+
"@commercetools/state-importer": "^3.0.31",
35+
"@commercetools/sync-actions": "^4.9.0",
3636
"@commercetools/typescript-sdk": "^0.0.16",
3737
"bluebird": "^3.5.3",
3838
"common-tags": "^1.8.0",

packages/custom-objects-importer/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"access": "public"
55
},
66
"name": "@commercetools/custom-objects-importer",
7-
"version": "3.0.30",
7+
"version": "3.0.31",
88
"description": "Import custom objects to the commercetools platform",
99
"main": "lib/main.js",
1010
"scripts": {
@@ -37,7 +37,7 @@
3737
"@commercetools/sdk-middleware-auth": "^5.1.6",
3838
"@commercetools/sdk-middleware-http": "^6.0.9",
3939
"@commercetools/sdk-middleware-user-agent": "^2.1.5",
40-
"@commercetools/sync-actions": "^4.8.4",
40+
"@commercetools/sync-actions": "^4.9.0",
4141
"common-tags": "^1.8.0",
4242
"lodash.compact": "^3.0.1",
4343
"lodash.isequal": "^4.5.0",

packages/discount-code-importer/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"access": "public"
55
},
66
"name": "@commercetools/discount-code-importer",
7-
"version": "3.0.29",
7+
"version": "3.0.30",
88
"description": "Import discount codes to the commercetools platform.",
99
"keywords": [
1010
"commercetools",
@@ -39,7 +39,7 @@
3939
"@commercetools/sdk-middleware-http": "^6.0.9",
4040
"@commercetools/sdk-middleware-queue": "^2.1.4",
4141
"@commercetools/sdk-middleware-user-agent": "^2.1.5",
42-
"@commercetools/sync-actions": "^4.8.4",
42+
"@commercetools/sync-actions": "^4.9.0",
4343
"lodash": "^4.17.11",
4444
"node-fetch": "^2.3.0",
4545
"npmlog": "^4.1.2"

packages/state-importer/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"access": "public"
55
},
66
"name": "@commercetools/state-importer",
7-
"version": "3.0.30",
7+
"version": "3.0.31",
88
"description": "Import states to the commercetools platform",
99
"main": "lib/main.js",
1010
"files": [
@@ -39,7 +39,7 @@
3939
"@commercetools/sdk-middleware-auth": "^5.1.6",
4040
"@commercetools/sdk-middleware-http": "^6.0.9",
4141
"@commercetools/sdk-middleware-user-agent": "^2.1.5",
42-
"@commercetools/sync-actions": "^4.8.4",
42+
"@commercetools/sync-actions": "^4.9.0",
4343
"node-fetch": "^2.3.0"
4444
},
4545
"devDependencies": {

packages/sync-actions/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"access": "public"
55
},
66
"name": "@commercetools/sync-actions",
7-
"version": "4.8.4",
7+
"version": "4.9.0",
88
"description": "Build API update actions for the commercetools platform.",
99
"keywords": [
1010
"commercetools",

packages/sync-actions/src/stores.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import flatten from 'lodash.flatten'
33
import type { SyncAction, UpdateAction, ActionGroup } from 'types/sdk'
44
import createBuildActions from './utils/create-build-actions'
55
import createMapActionGroup from './utils/create-map-action-group'
6+
import actionsMapCustom from './utils/action-map-custom'
67
import * as storesActions from './stores-actions'
78
import * as diffpatcher from './utils/diffpatcher'
89

@@ -24,11 +25,19 @@ function createStoresMapActions(
2425
next: Object,
2526
previous: Object
2627
): Array<UpdateAction> {
27-
return flatten([
28+
const allActions = []
29+
allActions.push(
2830
mapActionGroup('base', (): Array<UpdateAction> =>
2931
storesActions.actionsMapBase(diff, previous, next)
30-
),
31-
])
32+
)
33+
)
34+
allActions.push(
35+
mapActionGroup('custom', (): Array<UpdateAction> =>
36+
actionsMapCustom(diff, next, previous)
37+
)
38+
)
39+
40+
return flatten(allActions)
3241
}
3342
}
3443

packages/sync-actions/test/stores-sync.spec.js

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,68 @@ describe('Actions', () => {
108108
},
109109
])
110110
})
111+
112+
describe('custom fields', () => {
113+
test('should build `setCustomType` action', () => {
114+
const before = {
115+
custom: {
116+
type: {
117+
typeId: 'type',
118+
id: 'customType1',
119+
},
120+
fields: {
121+
customField1: true,
122+
},
123+
},
124+
}
125+
const now = {
126+
custom: {
127+
type: {
128+
typeId: 'type',
129+
id: 'customType2',
130+
},
131+
fields: {
132+
customField1: true,
133+
},
134+
},
135+
}
136+
const actual = storesSync.buildActions(now, before)
137+
const expected = [{ action: 'setCustomType', ...now.custom }]
138+
expect(actual).toEqual(expected)
139+
})
140+
})
141+
142+
test('should build `setCustomField` action', () => {
143+
const before = {
144+
custom: {
145+
type: {
146+
typeId: 'type',
147+
id: 'customType1',
148+
},
149+
fields: {
150+
customField1: false,
151+
},
152+
},
153+
}
154+
const now = {
155+
custom: {
156+
type: {
157+
typeId: 'type',
158+
id: 'customType1',
159+
},
160+
fields: {
161+
customField1: true,
162+
},
163+
},
164+
}
165+
const actual = storesSync.buildActions(now, before)
166+
const expected = [
167+
{
168+
action: 'setCustomField',
169+
name: 'customField1',
170+
value: true,
171+
},
172+
]
173+
expect(actual).toEqual(expected)
174+
})
111175
})

0 commit comments

Comments
 (0)