Skip to content

Commit

Permalink
Merge pull request #6 from Space48/TRE-167-node18-upgrade
Browse files Browse the repository at this point in the history
TRE-167: Upgrade node to 18.16
  • Loading branch information
darrenbelding authored Apr 28, 2023
2 parents 97d8f01 + 9f1eb35 commit a45d1ff
Show file tree
Hide file tree
Showing 18 changed files with 13,201 additions and 18,681 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v14.0.0
v18.16
31,504 changes: 13,012 additions & 18,492 deletions package-lock.json

Large diffs are not rendered by default.

93 changes: 47 additions & 46 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "widget-builder",
"version": "0.0.1",
"version": "1.0.0",
"main": "src/server/index.ts",
"repository": {
"type": "git",
Expand Down Expand Up @@ -30,78 +30,79 @@
"ajv": "^6.12.3",
"axios": "^0.24.0",
"babel-polyfill": "^6.26.0",
"better-ajv-errors": "^1.1.0",
"better-ajv-errors": "^1.2.0",
"chalk": "^2.4.2",
"chokidar": "^3.5.2",
"chokidar": "^3.5.3",
"commander": "^7.2.0",
"dotenv": "^9.0.2",
"express": "^4.16.3",
"express": "^4.18.2",
"inquirer": "^8.2.4",
"lodash": "^4.17.21",
"open": "^7.4.2",
"react": "^16.9.0",
"react-dom": "^16.9.0",
"react-redux": "^5.0.7",
"redux": "^4.1.2",
"redux": "^4.2.1",
"redux-logger": "^3.0.6",
"redux-thunk": "^2.3.0",
"socket.io": "^4.5.3",
"socket.io-client": "^4.3.2",
"styled-components": "^4.3.2"
"redux-thunk": "^2.4.2",
"socket.io": "^4.6.1",
"socket.io-client": "^4.6.1",
"styled-components": "^5.3.10"
},
"devDependencies": {
"@babel/core": "^7.16.0",
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/preset-env": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@babel/preset-typescript": "^7.6.0",
"@babel/core": "^7.21.4",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/preset-env": "^7.21.4",
"@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.21.4",
"@types/ajv": "^1.0.0",
"@types/chalk": "^2.2.0",
"@types/commander": "^2.12.2",
"@types/dotenv": "^8.2.0",
"@types/enzyme": "^3.1.10",
"@types/enzyme-adapter-react-16": "^1.0.3",
"@types/express": "^4.17.1",
"@types/inquirer": "^7.3.1",
"@types/jest": "^22.2.3",
"@types/lodash": "^4.14.149",
"@types/node": "^15.6.1",
"@types/react": "^16.9.2",
"@types/react-dom": "^16.9.0",
"@types/react-redux": "^6.0.0",
"@types/redux-logger": "^3.0.7",
"@types/redux-mock-store": "^1.0.1",
"@types/styled-components": "^4.1.18",
"@types/uuid": "^3.4.5",
"@types/enzyme": "^3.10.13",
"@types/enzyme-adapter-react-16": "^1.0.6",
"@types/express": "^4.17.17",
"@types/inquirer": "^9.0.3",
"@types/jest": "^29.5.1",
"@types/lodash": "^4.14.194",
"@types/node": "^18.16.0",
"@types/react": "^18.2.0",
"@types/react-dom": "^18.2.0",
"@types/react-redux": "^7.1.25",
"@types/redux-logger": "^3.0.9",
"@types/redux-mock-store": "^1.0.3",
"@types/styled-components": "^5.1.26",
"@types/uuid": "^9.0.1",
"@typescript-eslint/eslint-plugin": "^2.0.0",
"@typescript-eslint/parser": "^2.0.0",
"axios-mock-adapter": "^1.17.0",
"axios-mock-adapter": "^1.21.4",
"babel-eslint": "^10.0.0",
"babel-jest": "^27.3.1",
"babel-jest": "^29.5.0",
"babel-loader": "^8.0.0",
"clean-webpack-plugin": "^1.0.0",
"concurrently": "^6.3.0",
"css-loader": "^4.0.0",
"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.14.0",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.7",
"eslint": "^5.16.0",
"eslint-config-airbnb": "^17.0.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-react": "^7.7.0",
"html-webpack-plugin": "^5.5.0",
"jest": "^27.3.1",
"jest-transform-css": "^6.0.0",
"nodemon": "^2.0.20",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-react": "^7.32.2",
"html-webpack-plugin": "^5.5.1",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"jest-transform-css": "^6.0.1",
"nodemon": "^2.0.22",
"process": "^0.11.10",
"redux-mock-store": "^1.5.3",
"redux-mock-store": "^1.5.4",
"style-loader": "^0.23.0",
"ts-jest": "^27.0.7",
"ts-loader": "^9.2.5",
"typescript": "^3.8.0",
"uuid": "^3.3.3",
"webpack": "^5.20.0",
"ts-jest": "^29.1.0",
"ts-loader": "^9.4.2",
"typescript": "^4.9.4",
"uuid": "^9.0.0",
"webpack": "^5.80.0",
"webpack-cli": "^4.9.1",
"webpack-dev-server": "^4.11.1"
"webpack-dev-server": "^4.13.3"
}
}
12 changes: 6 additions & 6 deletions src/client/components/App/__snapshots__/App.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports['mountWidget correctly mounts a widget 1'] = `
exports[`mountWidget correctly mounts a widget 1`] = `
<div>
<div
class="styled__StyledFlex-hcvk8l-0 gzvNmR styled__StyledBox-sj5f1m-0 dWCHjG"
class="styled__StyledBox-sc-sj5f1m-0 cUPsHs styled__StyledFlex-sc-hcvk8l-0 ejKwoZ"
>
<img
height="34"
src="favicon.ico"
/>
   
<h1
class="styled__StyledH1-tqnj75-1 exiPoU"
class="styled__StyledH1-sc-tqnj75-1 dLeOTJ"
>
Widget Builder
</h1>
Expand All @@ -24,18 +24,18 @@ exports['mountWidget correctly mounts a widget 1'] = `
</div>
`;

exports['renders 1'] = `
exports[`renders 1`] = `
<div>
<div
class="styled__StyledFlex-hcvk8l-0 gzvNmR styled__StyledBox-sj5f1m-0 dWCHjG"
class="styled__StyledBox-sc-sj5f1m-0 cUPsHs styled__StyledFlex-sc-hcvk8l-0 ejKwoZ"
>
<img
height="34"
src="favicon.ico"
/>
   
<h1
class="styled__StyledH1-tqnj75-1 exiPoU"
class="styled__StyledH1-sc-tqnj75-1 dLeOTJ"
>
Widget Builder
</h1>
Expand Down
2 changes: 1 addition & 1 deletion src/services/query/generateQueryParams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import QueryParamFactory from './queryParamsWriter/queryParamFactory';
import queryParamsWriter from './queryParamsWriter/queryParamsWriter';

export default function generateQueryParams(directory: string) {
return new Promise((resolve) => {
return new Promise<void>((resolve) => {
Promise.all([
queryLoader(directory),
queryParamsBuilderLoader(directory),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports['queryLoader correctly loads query 1'] = `
Object {
exports[`queryLoader correctly loads query 1`] = `
{
"data": "query ProductList($productIds: [Int!]) {
site {
settings {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`queryParamsBuilderLoader correctly loads queryParamsBuilder 1`] = `
Object {
{
"data": "{
\\"productIds\\": {
\\"reads\\": \\"products.*.productId\\",
\\"type\\": \\"Int!\\"
"productIds": {
"reads": "products.*.productId",
"type": "Int!"
},
\\"productId\\": {
\\"reads\\": \\"productId\\",
\\"type\\": \\"Int!\\"
"productId": {
"reads": "productId",
"type": "Int!"
},
\\"name\\": {
\\"reads\\": \\"name\\",
\\"type\\": \\"String!\\"
"name": {
"reads": "name",
"type": "String!"
}
}
",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`queryParamsLoader correctly loads query params 1`] = `
Object {
{
"data": "{
\\"productIds\\": [1, 2],
\\"product\\": 1,
\\"name\\": \\"Fred\\"
"productIds": [1, 2],
"product": 1,
"name": "Fred"
}
",
"type": "queryParams.json",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports['queryParamFactory correctly loads query params 1'] = `
Object {
exports[`queryParamFactory correctly loads query params 1`] = `
{
"name": "Fred",
"productId": 5,
"productIds": Array [
"productIds": [
1,
],
}
Expand Down
22 changes: 11 additions & 11 deletions src/services/query/queryParamsWriter/queryParamFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default class QueryParamFactory {
}

build(): StorefrontApiQueryParams {
const result = {};
const result: any = {};
Object.keys(this.queryParamBuilder).forEach((query) => {
const data = this.queryParamBuilder[query];
const dataToRead = data.reads;
Expand Down Expand Up @@ -99,16 +99,16 @@ export default class QueryParamFactory {
}

switch (pureDataType) {
case 'Boolean':
return !!dataToRead;
case 'Float':
return parseFloat(dataToRead);
case 'Int':
return parseInt(dataToRead, 10);
case 'String':
return typeof dataToRead === 'string' ? dataToRead : JSON.stringify(dataToRead);
default:
return dataToRead;
case 'Boolean':
return !!dataToRead;
case 'Float':
return parseFloat(dataToRead);
case 'Int':
return parseInt(dataToRead, 10);
case 'String':
return typeof dataToRead === 'string' ? dataToRead : JSON.stringify(dataToRead);
default:
return dataToRead;
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`generateWidgetConfiguration correctly generates a widget configuration 1`] = `
Object {
{
"animationDuration": "400",
"buttonActionType": "addToCart",
"buttonBorderColor": "rgba(102,102,102,1);",
Expand All @@ -25,41 +25,41 @@ Object {
"easingMethod": "ease",
"productCardBackgroundColor": "rgba(255,255,255,1)",
"productCardBorderColor": "#D9DCE9",
"productCardContentAlignment": Object {
"productCardContentAlignment": {
"horizontal": "center",
},
"productCardMargin": Object {
"bottom": Object {
"productCardMargin": {
"bottom": {
"type": "px",
"value": "0",
},
"left": Object {
"left": {
"type": "px",
"value": "10.5",
},
"right": Object {
"right": {
"type": "px",
"value": "10.5",
},
"top": Object {
"top": {
"type": "px",
"value": "0",
},
},
"productCardPadding": Object {
"bottom": Object {
"productCardPadding": {
"bottom": {
"type": "px",
"value": "16",
},
"left": Object {
"left": {
"type": "px",
"value": "0",
},
"right": Object {
"right": {
"type": "px",
"value": "0",
},
"top": Object {
"top": {
"type": "px",
"value": "0",
},
Expand Down Expand Up @@ -87,23 +87,23 @@ Object {
"productRatingStarColorEmpty": "#D9DCE9",
"productRatingStarColorFull": "#80000B",
"productRatingsTextColor": "#8C93AD",
"products": Array [
Object {
"productImageAlignment": Object {
"products": [
{
"productImageAlignment": {
"horizontal": "center",
"vertical": "middle",
},
"productImageFit": "fit",
},
Object {
"productImageAlignment": Object {
{
"productImageAlignment": {
"horizontal": "center",
"vertical": "middle",
},
"productImageFit": "fit",
},
Object {
"productImageAlignment": Object {
{
"productImageAlignment": {
"horizontal": "center",
"vertical": "middle",
},
Expand Down
Loading

0 comments on commit a45d1ff

Please sign in to comment.