From 92ad56ed49b600be04c38105405e7f36b33562ac Mon Sep 17 00:00:00 2001 From: Sean Landsman Date: Wed, 27 Feb 2019 15:26:04 +0000 Subject: [PATCH 01/10] AG-2656 Allow equality checking for rowData to be configurable (ie use equality checking, deep checking and so on) --- src-trader-dashboard/components/TopMoversGrid.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-trader-dashboard/components/TopMoversGrid.jsx b/src-trader-dashboard/components/TopMoversGrid.jsx index 760e992..40108d0 100644 --- a/src-trader-dashboard/components/TopMoversGrid.jsx +++ b/src-trader-dashboard/components/TopMoversGrid.jsx @@ -89,4 +89,4 @@ export default connect( rowData: state ? state.fxTopMovers : null } } -)(TopMoversGrid); \ No newline at end of file +)(TopMoversGrid); From 3d7774e7c77d5c2db0e41dcc1c058b2f6b83770c Mon Sep 17 00:00:00 2001 From: Sean Landsman Date: Tue, 5 Mar 2019 14:57:53 +0000 Subject: [PATCH 02/10] AG-2656 Allow equality checking for rowData to be configurable (ie use equality checking, deep checking and so on) --- package.json | 12 ++++++++---- ts-tests/InvalidGridProperty.tsx | 4 ++++ ts-tests/SimpleFunctionalGrid.tsx | 4 ++++ ts-tests/runTsTests.sh | 26 ++++++++++++++++++++++++++ 4 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 ts-tests/InvalidGridProperty.tsx create mode 100644 ts-tests/SimpleFunctionalGrid.tsx create mode 100755 ts-tests/runTsTests.sh diff --git a/package.json b/package.json index b454493..ed2c5f4 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,8 @@ "build-dashboard": "webpack --config config/webpack.config.trader.js --progress --profile --bail", "build-all": "npm run build-examples && npm run build-dashboard", "build": "npm run clean && npm run mkdirs && npm run build-all && npm run copy", - "start": "npm run examples" + "start": "npm run examples", + "test" : "sh ./ts-tests/runTsTests.sh" }, "repository": { "type": "git", @@ -38,11 +39,13 @@ "homepage": "http://www.ag-grid.com/", "devDependencies": { "@babel/core": "7.3.3", - "babel-loader": "8.0.5", - "@babel/preset-env": "7.3.1", - "@babel/preset-react": "7.0.0", "@babel/plugin-proposal-class-properties": "7.3.3", "@babel/plugin-proposal-function-bind": "7.2.0", + "@babel/preset-env": "7.3.1", + "@babel/preset-react": "7.0.0", + "@types/react": "^16.8.6", + "@types/react-dom": "^16.8.2", + "babel-loader": "8.0.5", "css-loader": "2.1.0", "file-loader": "3.0.1", "gulp": "3.9.1", @@ -52,6 +55,7 @@ "prop-types": "15.7.2", "rimraf": "2.6.3", "style-loader": "0.23.1", + "typescript": "^3.3.3333", "webpack": "4.29.5", "webpack-cli": "3.2.3", "webpack-dev-server": "3.2.0" diff --git a/ts-tests/InvalidGridProperty.tsx b/ts-tests/InvalidGridProperty.tsx new file mode 100644 index 0000000..82dd282 --- /dev/null +++ b/ts-tests/InvalidGridProperty.tsx @@ -0,0 +1,4 @@ +import React from 'react'; +import {AgGridReact} from 'ag-grid-react'; + +export const App: React.FunctionComponent = () => ; diff --git a/ts-tests/SimpleFunctionalGrid.tsx b/ts-tests/SimpleFunctionalGrid.tsx new file mode 100644 index 0000000..e739f7f --- /dev/null +++ b/ts-tests/SimpleFunctionalGrid.tsx @@ -0,0 +1,4 @@ +import React from 'react'; +import {AgGridReact} from 'ag-grid-react'; + +export const App: React.FunctionComponent = () => ; diff --git a/ts-tests/runTsTests.sh b/ts-tests/runTsTests.sh new file mode 100755 index 0000000..5970611 --- /dev/null +++ b/ts-tests/runTsTests.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +# here as a quick ts test for use in the CI +# in time this will be removed the full battery of tests be moved to a centralised location + +error_found=false + +# has an invalid property - should complain +./node_modules/.bin/tsc --target "ES5" --module 'commonjs' --lib esnext,dom --allowSyntheticDefaultImports --jsx 'preserve' --noEmit --strict ts-tests/InvalidGridProperty.tsx &> /dev/null +if [ $? -ne 1 ]; then + echo "ag-grid-react grid with invalid property should throw a compiler error" + error_found=true +fi + +# a valid grid - no errors should be emitted +./node_modules/.bin/tsc --target "ES5" --module 'commonjs' --lib esnext,dom --allowSyntheticDefaultImports --jsx 'preserve' --noEmit --strict ts-tests/SimpleFunctionalGrid.tsx &> /dev/null +if [ $? -ne 0 ]; then + echo "valid ag-grid-react grid should compile" + error_found=true +fi + +if [ "$error_found" = true ]; then + exit 1 +fi + +exit 0 From ec4f7dea2769c8e3a0096de790c8a8c1bfcb16ef Mon Sep 17 00:00:00 2001 From: Sean Landsman Date: Wed, 6 Mar 2019 09:36:31 +0000 Subject: [PATCH 03/10] Test CI Breaks on test failure --- ts-tests/runTsTests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts-tests/runTsTests.sh b/ts-tests/runTsTests.sh index 5970611..f04d1bb 100755 --- a/ts-tests/runTsTests.sh +++ b/ts-tests/runTsTests.sh @@ -7,7 +7,7 @@ error_found=false # has an invalid property - should complain ./node_modules/.bin/tsc --target "ES5" --module 'commonjs' --lib esnext,dom --allowSyntheticDefaultImports --jsx 'preserve' --noEmit --strict ts-tests/InvalidGridProperty.tsx &> /dev/null -if [ $? -ne 1 ]; then +if [ $? -ne 0 ]; then echo "ag-grid-react grid with invalid property should throw a compiler error" error_found=true fi From eecd2a6bb2c0fc17ff2c03c698b29a19d726051f Mon Sep 17 00:00:00 2001 From: Sean Landsman Date: Wed, 6 Mar 2019 14:13:10 +0000 Subject: [PATCH 04/10] AG-1520 React wrapper causes styling issues for components --- package.json | 2 +- ts-tests/runTsTests.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ed2c5f4..9196015 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "build-all": "npm run build-examples && npm run build-dashboard", "build": "npm run clean && npm run mkdirs && npm run build-all && npm run copy", "start": "npm run examples", - "test" : "sh ./ts-tests/runTsTests.sh" + "test" : "./ts-tests/runTsTests.sh" }, "repository": { "type": "git", diff --git a/ts-tests/runTsTests.sh b/ts-tests/runTsTests.sh index f04d1bb..5970611 100755 --- a/ts-tests/runTsTests.sh +++ b/ts-tests/runTsTests.sh @@ -7,7 +7,7 @@ error_found=false # has an invalid property - should complain ./node_modules/.bin/tsc --target "ES5" --module 'commonjs' --lib esnext,dom --allowSyntheticDefaultImports --jsx 'preserve' --noEmit --strict ts-tests/InvalidGridProperty.tsx &> /dev/null -if [ $? -ne 0 ]; then +if [ $? -ne 1 ]; then echo "ag-grid-react grid with invalid property should throw a compiler error" error_found=true fi From 6b06b9fa017f4602b345086b0edd7a8ea6c26d9c Mon Sep 17 00:00:00 2001 From: Sean Landsman Date: Thu, 14 Mar 2019 12:01:33 +0000 Subject: [PATCH 05/10] AG-2741 Functional components don't work with reactNext --- .../richGridDeclarativeExample/RichGridDeclarativeExample.jsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src-examples/richGridDeclarativeExample/RichGridDeclarativeExample.jsx b/src-examples/richGridDeclarativeExample/RichGridDeclarativeExample.jsx index 047c9e6..f0a6c8c 100644 --- a/src-examples/richGridDeclarativeExample/RichGridDeclarativeExample.jsx +++ b/src-examples/richGridDeclarativeExample/RichGridDeclarativeExample.jsx @@ -200,6 +200,8 @@ export default class RichGridDeclarativeExample extends Component { menuIcon: 'fa-bars' } }} + + reactNext={true} > From efa5167c541a5ce9e2b6907b7368362784ea8474 Mon Sep 17 00:00:00 2001 From: Sean Landsman Date: Mon, 18 Mar 2019 15:08:58 +0000 Subject: [PATCH 06/10] Minor updates to deps --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9196015..aa63058 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "react": "16.8.2", "react-dom": "16.8.2", "react-redux": "6.0.1", - "react-router-dom": "4.3.1", + "react-router-dom": "4.4.0", "redux": "4.0.1" } } From 5e4a94d8659ab862d39a7eca3e4f132788a4295d Mon Sep 17 00:00:00 2001 From: Sean Landsman Date: Tue, 19 Mar 2019 08:17:15 +0000 Subject: [PATCH 07/10] AG-2750 Pre-release framework sweep --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index aa63058..c5abfdd 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "react": "16.8.2", "react-dom": "16.8.2", "react-redux": "6.0.1", - "react-router-dom": "4.4.0", + "react-router-dom": "5.0.0", "redux": "4.0.1" } } From 940cc314aa9b1bd298d2851f93c93dc87b06aae3 Mon Sep 17 00:00:00 2001 From: Sean Landsman Date: Tue, 19 Mar 2019 12:15:40 +0000 Subject: [PATCH 08/10] AG-2750 Pre-release framework sweep --- src-examples/richGridDeclarativeExample/SkillsFilter.jsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src-examples/richGridDeclarativeExample/SkillsFilter.jsx b/src-examples/richGridDeclarativeExample/SkillsFilter.jsx index cb44c89..dcbe69b 100644 --- a/src-examples/richGridDeclarativeExample/SkillsFilter.jsx +++ b/src-examples/richGridDeclarativeExample/SkillsFilter.jsx @@ -56,7 +56,7 @@ export default class SkillsFilter extends React.Component { return passed; }; - getModel() { + getModelAsString() { return '' } @@ -83,7 +83,6 @@ export default class SkillsFilter extends React.Component { const skillsTemplates = []; RefData.IT_SKILLS.forEach((skill, index) => { - const skillName = RefData.IT_SKILLS_NAMES[index]; const template = (