Skip to content

Commit 9f1eb35

Browse files
committed
TRE-167: Upgrade node to 18.16
1 parent 97d8f01 commit 9f1eb35

File tree

18 files changed

+13201
-18681
lines changed

18 files changed

+13201
-18681
lines changed

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v14.0.0
1+
v18.16

package-lock.json

+13,012-18,492
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+47-46
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "widget-builder",
3-
"version": "0.0.1",
3+
"version": "1.0.0",
44
"main": "src/server/index.ts",
55
"repository": {
66
"type": "git",
@@ -30,78 +30,79 @@
3030
"ajv": "^6.12.3",
3131
"axios": "^0.24.0",
3232
"babel-polyfill": "^6.26.0",
33-
"better-ajv-errors": "^1.1.0",
33+
"better-ajv-errors": "^1.2.0",
3434
"chalk": "^2.4.2",
35-
"chokidar": "^3.5.2",
35+
"chokidar": "^3.5.3",
3636
"commander": "^7.2.0",
3737
"dotenv": "^9.0.2",
38-
"express": "^4.16.3",
38+
"express": "^4.18.2",
3939
"inquirer": "^8.2.4",
4040
"lodash": "^4.17.21",
4141
"open": "^7.4.2",
4242
"react": "^16.9.0",
4343
"react-dom": "^16.9.0",
4444
"react-redux": "^5.0.7",
45-
"redux": "^4.1.2",
45+
"redux": "^4.2.1",
4646
"redux-logger": "^3.0.6",
47-
"redux-thunk": "^2.3.0",
48-
"socket.io": "^4.5.3",
49-
"socket.io-client": "^4.3.2",
50-
"styled-components": "^4.3.2"
47+
"redux-thunk": "^2.4.2",
48+
"socket.io": "^4.6.1",
49+
"socket.io-client": "^4.6.1",
50+
"styled-components": "^5.3.10"
5151
},
5252
"devDependencies": {
53-
"@babel/core": "^7.16.0",
54-
"@babel/plugin-proposal-class-properties": "^7.5.5",
55-
"@babel/preset-env": "^7.0.0",
56-
"@babel/preset-react": "^7.0.0",
57-
"@babel/preset-typescript": "^7.6.0",
53+
"@babel/core": "^7.21.4",
54+
"@babel/plugin-proposal-class-properties": "^7.18.6",
55+
"@babel/preset-env": "^7.21.4",
56+
"@babel/preset-react": "^7.18.6",
57+
"@babel/preset-typescript": "^7.21.4",
5858
"@types/ajv": "^1.0.0",
5959
"@types/chalk": "^2.2.0",
6060
"@types/commander": "^2.12.2",
6161
"@types/dotenv": "^8.2.0",
62-
"@types/enzyme": "^3.1.10",
63-
"@types/enzyme-adapter-react-16": "^1.0.3",
64-
"@types/express": "^4.17.1",
65-
"@types/inquirer": "^7.3.1",
66-
"@types/jest": "^22.2.3",
67-
"@types/lodash": "^4.14.149",
68-
"@types/node": "^15.6.1",
69-
"@types/react": "^16.9.2",
70-
"@types/react-dom": "^16.9.0",
71-
"@types/react-redux": "^6.0.0",
72-
"@types/redux-logger": "^3.0.7",
73-
"@types/redux-mock-store": "^1.0.1",
74-
"@types/styled-components": "^4.1.18",
75-
"@types/uuid": "^3.4.5",
62+
"@types/enzyme": "^3.10.13",
63+
"@types/enzyme-adapter-react-16": "^1.0.6",
64+
"@types/express": "^4.17.17",
65+
"@types/inquirer": "^9.0.3",
66+
"@types/jest": "^29.5.1",
67+
"@types/lodash": "^4.14.194",
68+
"@types/node": "^18.16.0",
69+
"@types/react": "^18.2.0",
70+
"@types/react-dom": "^18.2.0",
71+
"@types/react-redux": "^7.1.25",
72+
"@types/redux-logger": "^3.0.9",
73+
"@types/redux-mock-store": "^1.0.3",
74+
"@types/styled-components": "^5.1.26",
75+
"@types/uuid": "^9.0.1",
7676
"@typescript-eslint/eslint-plugin": "^2.0.0",
7777
"@typescript-eslint/parser": "^2.0.0",
78-
"axios-mock-adapter": "^1.17.0",
78+
"axios-mock-adapter": "^1.21.4",
7979
"babel-eslint": "^10.0.0",
80-
"babel-jest": "^27.3.1",
80+
"babel-jest": "^29.5.0",
8181
"babel-loader": "^8.0.0",
8282
"clean-webpack-plugin": "^1.0.0",
8383
"concurrently": "^6.3.0",
8484
"css-loader": "^4.0.0",
85-
"enzyme": "^3.10.0",
86-
"enzyme-adapter-react-16": "^1.14.0",
85+
"enzyme": "^3.11.0",
86+
"enzyme-adapter-react-16": "^1.15.7",
8787
"eslint": "^5.16.0",
8888
"eslint-config-airbnb": "^17.0.0",
89-
"eslint-plugin-import": "^2.18.2",
90-
"eslint-plugin-jsx-a11y": "^6.0.3",
91-
"eslint-plugin-react": "^7.7.0",
92-
"html-webpack-plugin": "^5.5.0",
93-
"jest": "^27.3.1",
94-
"jest-transform-css": "^6.0.0",
95-
"nodemon": "^2.0.20",
89+
"eslint-plugin-import": "^2.27.5",
90+
"eslint-plugin-jsx-a11y": "^6.7.1",
91+
"eslint-plugin-react": "^7.32.2",
92+
"html-webpack-plugin": "^5.5.1",
93+
"jest": "^29.5.0",
94+
"jest-environment-jsdom": "^29.5.0",
95+
"jest-transform-css": "^6.0.1",
96+
"nodemon": "^2.0.22",
9697
"process": "^0.11.10",
97-
"redux-mock-store": "^1.5.3",
98+
"redux-mock-store": "^1.5.4",
9899
"style-loader": "^0.23.0",
99-
"ts-jest": "^27.0.7",
100-
"ts-loader": "^9.2.5",
101-
"typescript": "^3.8.0",
102-
"uuid": "^3.3.3",
103-
"webpack": "^5.20.0",
100+
"ts-jest": "^29.1.0",
101+
"ts-loader": "^9.4.2",
102+
"typescript": "^4.9.4",
103+
"uuid": "^9.0.0",
104+
"webpack": "^5.80.0",
104105
"webpack-cli": "^4.9.1",
105-
"webpack-dev-server": "^4.11.1"
106+
"webpack-dev-server": "^4.13.3"
106107
}
107108
}

src/client/components/App/__snapshots__/App.test.tsx.snap

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports['mountWidget correctly mounts a widget 1'] = `
3+
exports[`mountWidget correctly mounts a widget 1`] = `
44
<div>
55
<div
6-
class="styled__StyledFlex-hcvk8l-0 gzvNmR styled__StyledBox-sj5f1m-0 dWCHjG"
6+
class="styled__StyledBox-sc-sj5f1m-0 cUPsHs styled__StyledFlex-sc-hcvk8l-0 ejKwoZ"
77
>
88
<img
99
height="34"
1010
src="favicon.ico"
1111
/>
1212
   
1313
<h1
14-
class="styled__StyledH1-tqnj75-1 exiPoU"
14+
class="styled__StyledH1-sc-tqnj75-1 dLeOTJ"
1515
>
1616
Widget Builder
1717
</h1>
@@ -24,18 +24,18 @@ exports['mountWidget correctly mounts a widget 1'] = `
2424
</div>
2525
`;
2626

27-
exports['renders 1'] = `
27+
exports[`renders 1`] = `
2828
<div>
2929
<div
30-
class="styled__StyledFlex-hcvk8l-0 gzvNmR styled__StyledBox-sj5f1m-0 dWCHjG"
30+
class="styled__StyledBox-sc-sj5f1m-0 cUPsHs styled__StyledFlex-sc-hcvk8l-0 ejKwoZ"
3131
>
3232
<img
3333
height="34"
3434
src="favicon.ico"
3535
/>
3636
   
3737
<h1
38-
class="styled__StyledH1-tqnj75-1 exiPoU"
38+
class="styled__StyledH1-sc-tqnj75-1 dLeOTJ"
3939
>
4040
Widget Builder
4141
</h1>

src/services/query/generateQueryParams.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import QueryParamFactory from './queryParamsWriter/queryParamFactory';
88
import queryParamsWriter from './queryParamsWriter/queryParamsWriter';
99

1010
export default function generateQueryParams(directory: string) {
11-
return new Promise((resolve) => {
11+
return new Promise<void>((resolve) => {
1212
Promise.all([
1313
queryLoader(directory),
1414
queryParamsBuilderLoader(directory),

src/services/query/queryLoader/__snapshots__/queryLoader.test.ts.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports['queryLoader correctly loads query 1'] = `
4-
Object {
3+
exports[`queryLoader correctly loads query 1`] = `
4+
{
55
"data": "query ProductList($productIds: [Int!]) {
66
site {
77
settings {

src/services/query/queryParamsBuilderLoader/__snapshots__/queryParamsBuilderLoader.test.ts.snap

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`queryParamsBuilderLoader correctly loads queryParamsBuilder 1`] = `
4-
Object {
4+
{
55
"data": "{
6-
\\"productIds\\": {
7-
\\"reads\\": \\"products.*.productId\\",
8-
\\"type\\": \\"Int!\\"
6+
"productIds": {
7+
"reads": "products.*.productId",
8+
"type": "Int!"
99
},
10-
\\"productId\\": {
11-
\\"reads\\": \\"productId\\",
12-
\\"type\\": \\"Int!\\"
10+
"productId": {
11+
"reads": "productId",
12+
"type": "Int!"
1313
},
14-
\\"name\\": {
15-
\\"reads\\": \\"name\\",
16-
\\"type\\": \\"String!\\"
14+
"name": {
15+
"reads": "name",
16+
"type": "String!"
1717
}
1818
}
1919
",

src/services/query/queryParamsLoader/__snapshots__/queryParamsLoader.test.ts.snap

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`queryParamsLoader correctly loads query params 1`] = `
4-
Object {
4+
{
55
"data": "{
6-
\\"productIds\\": [1, 2],
7-
\\"product\\": 1,
8-
\\"name\\": \\"Fred\\"
6+
"productIds": [1, 2],
7+
"product": 1,
8+
"name": "Fred"
99
}
1010
",
1111
"type": "queryParams.json",

src/services/query/queryParamsWriter/__snapshots__/queryParamFactory.test.ts.snap

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports['queryParamFactory correctly loads query params 1'] = `
4-
Object {
3+
exports[`queryParamFactory correctly loads query params 1`] = `
4+
{
55
"name": "Fred",
66
"productId": 5,
7-
"productIds": Array [
7+
"productIds": [
88
1,
99
],
1010
}

src/services/query/queryParamsWriter/queryParamFactory.ts

+11-11
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default class QueryParamFactory {
3131
}
3232

3333
build(): StorefrontApiQueryParams {
34-
const result = {};
34+
const result: any = {};
3535
Object.keys(this.queryParamBuilder).forEach((query) => {
3636
const data = this.queryParamBuilder[query];
3737
const dataToRead = data.reads;
@@ -99,16 +99,16 @@ export default class QueryParamFactory {
9999
}
100100

101101
switch (pureDataType) {
102-
case 'Boolean':
103-
return !!dataToRead;
104-
case 'Float':
105-
return parseFloat(dataToRead);
106-
case 'Int':
107-
return parseInt(dataToRead, 10);
108-
case 'String':
109-
return typeof dataToRead === 'string' ? dataToRead : JSON.stringify(dataToRead);
110-
default:
111-
return dataToRead;
102+
case 'Boolean':
103+
return !!dataToRead;
104+
case 'Float':
105+
return parseFloat(dataToRead);
106+
case 'Int':
107+
return parseInt(dataToRead, 10);
108+
case 'String':
109+
return typeof dataToRead === 'string' ? dataToRead : JSON.stringify(dataToRead);
110+
default:
111+
return dataToRead;
112112
}
113113
}
114114

src/services/schema/schemaParser/__snapshots__/schemaParser.test.ts.snap

+19-19
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`generateWidgetConfiguration correctly generates a widget configuration 1`] = `
4-
Object {
4+
{
55
"animationDuration": "400",
66
"buttonActionType": "addToCart",
77
"buttonBorderColor": "rgba(102,102,102,1);",
@@ -25,41 +25,41 @@ Object {
2525
"easingMethod": "ease",
2626
"productCardBackgroundColor": "rgba(255,255,255,1)",
2727
"productCardBorderColor": "#D9DCE9",
28-
"productCardContentAlignment": Object {
28+
"productCardContentAlignment": {
2929
"horizontal": "center",
3030
},
31-
"productCardMargin": Object {
32-
"bottom": Object {
31+
"productCardMargin": {
32+
"bottom": {
3333
"type": "px",
3434
"value": "0",
3535
},
36-
"left": Object {
36+
"left": {
3737
"type": "px",
3838
"value": "10.5",
3939
},
40-
"right": Object {
40+
"right": {
4141
"type": "px",
4242
"value": "10.5",
4343
},
44-
"top": Object {
44+
"top": {
4545
"type": "px",
4646
"value": "0",
4747
},
4848
},
49-
"productCardPadding": Object {
50-
"bottom": Object {
49+
"productCardPadding": {
50+
"bottom": {
5151
"type": "px",
5252
"value": "16",
5353
},
54-
"left": Object {
54+
"left": {
5555
"type": "px",
5656
"value": "0",
5757
},
58-
"right": Object {
58+
"right": {
5959
"type": "px",
6060
"value": "0",
6161
},
62-
"top": Object {
62+
"top": {
6363
"type": "px",
6464
"value": "0",
6565
},
@@ -87,23 +87,23 @@ Object {
8787
"productRatingStarColorEmpty": "#D9DCE9",
8888
"productRatingStarColorFull": "#80000B",
8989
"productRatingsTextColor": "#8C93AD",
90-
"products": Array [
91-
Object {
92-
"productImageAlignment": Object {
90+
"products": [
91+
{
92+
"productImageAlignment": {
9393
"horizontal": "center",
9494
"vertical": "middle",
9595
},
9696
"productImageFit": "fit",
9797
},
98-
Object {
99-
"productImageAlignment": Object {
98+
{
99+
"productImageAlignment": {
100100
"horizontal": "center",
101101
"vertical": "middle",
102102
},
103103
"productImageFit": "fit",
104104
},
105-
Object {
106-
"productImageAlignment": Object {
105+
{
106+
"productImageAlignment": {
107107
"horizontal": "center",
108108
"vertical": "middle",
109109
},

0 commit comments

Comments
 (0)