From 1c5de9abe780d294fbacae7c127812465a75e0cd Mon Sep 17 00:00:00 2001 From: bcd00 <47297759+bcd00@users.noreply.github.com> Date: Fri, 7 May 2021 17:39:56 +0100 Subject: [PATCH] Development (#105) * Update dependency redux-persist to v6 * Update dependency github-markdown-css to v4 * Update dependency react-codemirror2 to v6.0.1 * Update dependency remark-preset-lint-recommended to v3.0.4 * Update dependency eslint-plugin-node to v11.1.0 * Update dependency d3 to v5.16.0 * Update dependency jquery to v3.5.0 [SECURITY] * Update dependency react-router-dom to v5.2.0 * Update dependency react-codemirror2 to v7 * Update dependency eslint-plugin-jest to v23.20.0 * Update dependency react-scripts to v3.4.4 * Update react monorepo to v16.14.0 * Update dependency detect-browser to v5 * Update remark monorepo * Update dependency axios to v0.21.1 [SECURITY] * Update dependency bootstrap to v4.6.0 * Update dependency @fortawesome/fontawesome-free to v5.15.3 * Update dependency codemirror to v5.61.0 * Update dependency eslint-plugin-react to v7.23.2 * Update dependency react-redux to v7.2.4 * Fixed for Windows run, updated test scripts for react-scripts 3.0.0 and added Idea files to gitignore * Adding @babel/core v7.13.16 * Changing eslint react/no-string-refs to 0 rather than false * Adding react version to eslintrc.json and indenting launcher.jsx * Minor fixes to move to Node LTS version 14 Co-authored-by: Renovate Bot --- .gitignore | 4 +- .travis.yml | 2 +- Dockerfile | 2 +- package.json | 14 ++-- packages/ove-ui-demo/.eslintrc.json | 7 +- packages/ove-ui-demo/package.json | 21 +++--- packages/ove-ui-launcher/.eslintrc.json | 7 +- packages/ove-ui-launcher/package.json | 21 +++--- packages/ove-ui-launcher/src/app/launcher.jsx | 68 +++++++++---------- packages/ove-ui-preview/.eslintrc.json | 5 ++ packages/ove-ui-preview/package.json | 21 +++--- packages/ove-ui-status/.eslintrc.json | 7 +- packages/ove-ui-status/package.json | 19 +++--- pm2-windows.json | 28 +++++--- 14 files changed, 132 insertions(+), 94 deletions(-) diff --git a/.gitignore b/.gitignore index 3a995a2e..756afac1 100755 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,6 @@ # dependencies node_modules -node_modules package-lock.json /.pnp .pnp.js @@ -26,3 +25,6 @@ yarn-error.log* # visual studio code for node.js .vscode/ + +.idea +/.idea diff --git a/.travis.yml b/.travis.yml index 7a008337..a4ee5cc4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ sudo: false language: node_js -node_js: stable +node_js: lts/* services: - docker diff --git a/Dockerfile b/Dockerfile index 5a40ea32..eccbba7b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:10-alpine +FROM node:14-alpine WORKDIR /usr/src/app RUN npm install -global pm2 diff --git a/package.json b/package.json index da1a43f9..ce4a270f 100644 --- a/package.json +++ b/package.json @@ -14,15 +14,15 @@ "start:dev": "lerna exec -- npm run start:dev" }, "devDependencies": { - "lerna": "3.20.2", - "eslint": "5.16.0", + "@babel/core": "7.13.16", "eslint-config-standard": "12.0.0", - "eslint-plugin-node": "11.0.0", + "eslint-plugin-jest": "23.20.0", + "eslint-plugin-node": "11.1.0", "eslint-plugin-promise": "4.2.1", + "eslint-plugin-react": "7.23.2", "eslint-plugin-standard": "4.0.1", - "eslint-plugin-jest": "23.7.0", - "eslint-plugin-react": "7.18.3", - "remark": "11.0.2", - "remark-preset-lint-recommended": "3.0.3" + "lerna": "3.20.2", + "remark": "13.0.0", + "remark-preset-lint-recommended": "5.0.0" } } diff --git a/packages/ove-ui-demo/.eslintrc.json b/packages/ove-ui-demo/.eslintrc.json index 26e562fc..e25a128a 100644 --- a/packages/ove-ui-demo/.eslintrc.json +++ b/packages/ove-ui-demo/.eslintrc.json @@ -28,6 +28,11 @@ "allowTemplateLiterals": true }], "semi": ["error", "always"], - "react/no-string-refs": ["false"] + "react/no-string-refs": [0, {"noTemplateLiterals": false}] + }, + "settings": { + "react": { + "version": "detect" + } } } diff --git a/packages/ove-ui-demo/package.json b/packages/ove-ui-demo/package.json index a7877e68..ac78a222 100644 --- a/packages/ove-ui-demo/package.json +++ b/packages/ove-ui-demo/package.json @@ -8,25 +8,26 @@ "author": "Senaka Fernando ", "license": "MIT", "dependencies": { - "axios": "0.19.2", - "bootstrap": "3.4.1", + "bootstrap": "4.6.0", + "axios": "0.21.1", "cors": "2.8.5", - "detect-browser": "4.8.0", + "detect-browser": "5.2.0", "dotenv": "8.2.0", "express": "4.17.1", - "github-markdown-css": "3.0.1", - "jquery": "3.4.1", + "github-markdown-css": "4.0.0", + "jquery": "3.5.0", "little-loader": "0.2.0", - "react": "16.8.6", - "react-dom": "16.8.6", - "react-router-dom": "5.0.0", - "react-scripts": "3.0.0" + "react": "16.14.0", + "react-dom": "16.14.0", + "react-scripts": "3.4.4", + "react-router-dom": "5.2.0" }, "scripts": { "start": "PORT=8284 node -r dotenv/config server.js dotenv_config_path=.env", "start:dev": "OVE_HOST='localhost:8080' PORT=8284 node -r dotenv/config ../../node_modules/.bin/react-scripts start dotenv_config_path=.env", + "start:windows": ".\\\"node_modules/.bin/react-scripts\" start", "build": "react-scripts build", - "test": "react-scripts test --no-watch", + "test": "react-scripts test --watchAll=false", "lint": "eslint src/. --ext .jsx" }, "eslintConfig": { diff --git a/packages/ove-ui-launcher/.eslintrc.json b/packages/ove-ui-launcher/.eslintrc.json index cdc9cb2d..c92143ec 100644 --- a/packages/ove-ui-launcher/.eslintrc.json +++ b/packages/ove-ui-launcher/.eslintrc.json @@ -26,6 +26,11 @@ }], "quotes": [1, "single"], "semi": ["error", "always"], - "react/no-string-refs": ["false"] + "react/no-string-refs": [0, {"noTemplateLiterals": false}] + }, + "settings": { + "react": { + "version": "detect" + } } } diff --git a/packages/ove-ui-launcher/package.json b/packages/ove-ui-launcher/package.json index dc9103aa..a8ec8d3f 100644 --- a/packages/ove-ui-launcher/package.json +++ b/packages/ove-ui-launcher/package.json @@ -8,28 +8,29 @@ "author": "Senaka Fernando ", "license": "MIT", "dependencies": { - "axios": "0.19.2", - "bootstrap": "3.4.1", - "codemirror": "5.51.0", + "bootstrap": "4.6.0", + "codemirror": "5.61.0", + "axios": "0.21.1", "cors": "2.8.5", "dotenv": "8.2.0", "express": "4.17.1", - "jquery": "3.4.1", + "jquery": "3.5.0", "js-beautify": "1.10.3", "little-loader": "0.2.0", - "react": "16.8.6", - "react-codemirror2": "6.0.0", - "react-dom": "16.8.6", - "react-redux": "7.0.3", - "react-scripts": "3.0.0", + "react-codemirror2": "7.2.1", + "react": "16.14.0", + "react-dom": "16.14.0", + "react-redux": "7.2.4", + "react-scripts": "3.4.4", "semantic-ui-css": "2.4.1", "semantic-ui-react": "0.88.2" }, "scripts": { "start": "PORT=8281 node -r dotenv/config server.js dotenv_config_path=.env", "start:dev": "OVE_HOST='localhost:8080' PORT=8281 node -r dotenv/config ../../node_modules/.bin/react-scripts start dotenv_config_path=.env", + "start:windows": ".\\\"node_modules/.bin/react-scripts\" start", "build": "react-scripts build", - "test": "react-scripts test --no-watch", + "test": "react-scripts test --watchAll=false", "lint": "eslint src/. --ext .jsx" }, "eslintConfig": { diff --git a/packages/ove-ui-launcher/src/app/launcher.jsx b/packages/ove-ui-launcher/src/app/launcher.jsx index a8be58f1..c6309c46 100755 --- a/packages/ove-ui-launcher/src/app/launcher.jsx +++ b/packages/ove-ui-launcher/src/app/launcher.jsx @@ -96,43 +96,43 @@ export default class Launcher extends Component { return ( <> -

OVE Application Launcher

+

OVE Application Launcher

Configured to launch applications into the OVE instance at {Constants.REACT_APP_OVE_HOST}.

-
- this.setState({ app: ev.value, state: null, controllerURL: undefined })} - selectedApp={this.state.app} appAvailable={this.state.appAvailable} /> - - this.setState({ space, controllerURL: undefined })} - updateGeometry={geometry => this.setState({ geometry, controllerURL: undefined })} - updateErrors={geometryErrors => this.setState({ geometryErrors })} - - space={this.state.space} geometry={this.state.geometry} errors={this.state.geometryErrors}/> - - this.setState({ state: d, controllerURL: undefined })} - updateMode={d => this.setState({ mode: d, controllerURL: undefined })} - updateURL={d => this.setState({ url: d, controllerURL: undefined })} - updateErrors={d => this.setState({ stateErrors: d })} - app={this.state.app} mode={this.state.mode} state={this.state.state} url={this.state.url} errors={this.state.stateErrors} /> - - this.setState({ deleteSections })} - updateShowController={showController => this.setState({ showController })} - updateErrors={optionsErrors => this.setState({ optionsErrors })} - updateConfig={config => this.setState({ config })} - app={this.state.app} space={this.state.space} deleteSections={this.state.deleteSections} showController={this.state.showController} mode={this.state.mode} state={this.state.state} url={this.state.url} config={this.state.config} - errors={this.state.optionsErrors} /> - - this.setState({ controllerURL })} - updateOS={os => this.setState({ os })} - app={this.state.app} space={this.state.space} geometry={this.state.geometry} mode={this.state.mode} - config={this.state.config} state={this.state.state} deleteSections={this.state.deleteSections} - showController={this.state.showController} os={this.state.os} ready={this.ready()} - appAvailable={this.state.appAvailable} updateAppAvailability={appAvailable => this.setState({ appAvailable })} /> - - -
+
+ this.setState({ app: ev.value, state: null, controllerURL: undefined })} + selectedApp={this.state.app} appAvailable={this.state.appAvailable} /> + + this.setState({ space, controllerURL: undefined })} + updateGeometry={geometry => this.setState({ geometry, controllerURL: undefined })} + updateErrors={geometryErrors => this.setState({ geometryErrors })} + + space={this.state.space} geometry={this.state.geometry} errors={this.state.geometryErrors}/> + + this.setState({ state: d, controllerURL: undefined })} + updateMode={d => this.setState({ mode: d, controllerURL: undefined })} + updateURL={d => this.setState({ url: d, controllerURL: undefined })} + updateErrors={d => this.setState({ stateErrors: d })} + app={this.state.app} mode={this.state.mode} state={this.state.state} url={this.state.url} errors={this.state.stateErrors} /> + + this.setState({ deleteSections })} + updateShowController={showController => this.setState({ showController })} + updateErrors={optionsErrors => this.setState({ optionsErrors })} + updateConfig={config => this.setState({ config })} + app={this.state.app} space={this.state.space} deleteSections={this.state.deleteSections} showController={this.state.showController} mode={this.state.mode} state={this.state.state} url={this.state.url} config={this.state.config} + errors={this.state.optionsErrors} /> + + this.setState({ controllerURL })} + updateOS={os => this.setState({ os })} + app={this.state.app} space={this.state.space} geometry={this.state.geometry} mode={this.state.mode} + config={this.state.config} state={this.state.state} deleteSections={this.state.deleteSections} + showController={this.state.showController} os={this.state.os} ready={this.ready()} + appAvailable={this.state.appAvailable} updateAppAvailability={appAvailable => this.setState({ appAvailable })} /> + + +
); } diff --git a/packages/ove-ui-preview/.eslintrc.json b/packages/ove-ui-preview/.eslintrc.json index 39908a50..4731d8ad 100644 --- a/packages/ove-ui-preview/.eslintrc.json +++ b/packages/ove-ui-preview/.eslintrc.json @@ -36,5 +36,10 @@ }], "quotes": [1, "single"], "semi": ["error", "always"] + }, + "settings": { + "react": { + "version": "detect" + } } } diff --git a/packages/ove-ui-preview/package.json b/packages/ove-ui-preview/package.json index c9805208..5aa19d29 100644 --- a/packages/ove-ui-preview/package.json +++ b/packages/ove-ui-preview/package.json @@ -8,26 +8,27 @@ "author": "Senaka Fernando ", "license": "MIT", "dependencies": { - "axios": "0.19.2", - "bootstrap": "3.4.1", + "bootstrap": "4.6.0", + "axios": "0.21.1", "cors": "2.8.5", - "d3": "5.15.0", + "d3": "5.16.0", "dotenv": "8.2.0", "express": "4.17.1", - "jquery": "3.4.1", + "jquery": "3.5.0", "little-loader": "0.2.0", - "react": "16.8.6", - "react-dom": "16.8.6", - "react-redux": "7.0.3", - "react-scripts": "3.0.0", + "react": "16.14.0", + "react-dom": "16.14.0", + "react-redux": "7.2.4", + "react-scripts": "3.4.4", "redux": "4.0.5", - "redux-persist": "5.10.0" + "redux-persist": "6.0.0" }, "scripts": { "start": "PORT=8282 node -r dotenv/config server.js dotenv_config_path=.env", "start:dev": "OVE_HOST='localhost:8080' PORT=8282 node -r dotenv/config ../../node_modules/.bin/react-scripts start dotenv_config_path=.env", + "start:windows": ".\\\"node_modules/.bin/react-scripts\" start", "build": "react-scripts build", - "test": "react-scripts test --no-watch", + "test": "react-scripts test --watchAll=false", "lint": "eslint src/. --ext .jsx && eslint src/. --ext .js" }, "eslintConfig": { diff --git a/packages/ove-ui-status/.eslintrc.json b/packages/ove-ui-status/.eslintrc.json index cdc9cb2d..c92143ec 100644 --- a/packages/ove-ui-status/.eslintrc.json +++ b/packages/ove-ui-status/.eslintrc.json @@ -26,6 +26,11 @@ }], "quotes": [1, "single"], "semi": ["error", "always"], - "react/no-string-refs": ["false"] + "react/no-string-refs": [0, {"noTemplateLiterals": false}] + }, + "settings": { + "react": { + "version": "detect" + } } } diff --git a/packages/ove-ui-status/package.json b/packages/ove-ui-status/package.json index 6f83fd1d..06b95821 100644 --- a/packages/ove-ui-status/package.json +++ b/packages/ove-ui-status/package.json @@ -8,24 +8,25 @@ "author": "Senaka Fernando ", "license": "MIT", "dependencies": { - "@fortawesome/fontawesome-free": "5.8.1", - "axios": "0.19.2", - "bootstrap": "4.3.1", + "@fortawesome/fontawesome-free": "5.15.3", + "bootstrap": "4.6.0", + "axios": "0.21.1", "cors": "2.8.5", "dotenv": "8.2.0", "express": "4.17.1", - "github-markdown-css": "3.0.1", - "jquery": "3.4.1", + "github-markdown-css": "4.0.0", + "jquery": "3.5.0", "little-loader": "0.2.0", - "react": "16.8.6", - "react-dom": "16.8.6", - "react-scripts": "3.0.0" + "react": "16.14.0", + "react-dom": "16.14.0", + "react-scripts": "3.4.4" }, "scripts": { "start": "PORT=8283 node -r dotenv/config server.js dotenv_config_path=.env", "start:dev": "OVE_HOST='localhost:8080' PORT=8283 node -r dotenv/config ../../node_modules/.bin/react-scripts start dotenv_config_path=.env", + "start:windows": ".\\\"node_modules/.bin/react-scripts\" start dotenv_config_path=.env", "build": "react-scripts build", - "test": "react-scripts test --no-watch", + "test": "react-scripts test --watchAll=false", "lint": "eslint src/. --ext .jsx" }, "eslintConfig": { diff --git a/pm2-windows.json b/pm2-windows.json index 450bc4f8..e28037b3 100644 --- a/pm2-windows.json +++ b/pm2-windows.json @@ -5,9 +5,12 @@ "cwd": "./packages/ove-ui-launcher", "kill_timeout": 3000, "restart_delay": 3000, - "script": "-r dotenv/config server.js dotenv_config_path=.env", + "script": "server.js", "env": { - "PORT": "8281" + "PUBLIC_URL": "//__OVEHOST__/ui/demo", + "OVE_HOST": "localhost:8080", + "PORT": 8281, + "REACT_APP_OVE_HOST": "$OVE_HOST" } }, { @@ -15,9 +18,12 @@ "cwd": "./packages/ove-ui-preview", "kill_timeout": 3000, "restart_delay": 3000, - "script": "-r dotenv/config server.js dotenv_config_path=.env", + "script": "server.js", "env": { - "PORT": "8282" + "PUBLIC_URL": "//__OVEHOST__/ui/demo", + "OVE_HOST": "localhost:8080", + "PORT": 8282, + "REACT_APP_OVE_HOST": "$OVE_HOST" } }, { @@ -25,9 +31,12 @@ "cwd": "./packages/ove-ui-status", "kill_timeout": 3000, "restart_delay": 3000, - "script": "-r dotenv/config server.js dotenv_config_path=.env", + "script": "server.js", "env": { - "PORT": "8283" + "PUBLIC_URL": "//__OVEHOST__/ui/demo", + "OVE_HOST": "localhost:8080", + "PORT": 8283, + "REACT_APP_OVE_HOST": "$OVE_HOST" } }, { @@ -35,9 +44,12 @@ "cwd": "./packages/ove-ui-demo", "kill_timeout": 3000, "restart_delay": 3000, - "script": "-r dotenv/config server.js dotenv_config_path=.env", + "script": "server.js", "env": { - "PORT": "8284" + "PUBLIC_URL": "//__OVEHOST__/ui/demo", + "OVE_HOST": "localhost:8080", + "PORT": 8284, + "REACT_APP_OVE_HOST": "$OVE_HOST" } } ]