diff --git a/canvas_modules/harness/assets/styles/carbon.scss b/canvas_modules/harness/assets/styles/carbon.scss index d358025264..b939f6d329 100644 --- a/canvas_modules/harness/assets/styles/carbon.scss +++ b/canvas_modules/harness/assets/styles/carbon.scss @@ -14,10 +14,9 @@ * limitations under the License. */ - @forward "@carbon/react/scss/colors"; - @forward "@carbon/react/scss/type"; - @forward "@carbon/react/scss/spacing"; - @forward "@carbon/react/scss/theme"; - @forward "@carbon/react/scss/motion"; - @forward "@carbon/react/scss/components/button/tokens"; - \ No newline at end of file +@forward "@carbon/react/scss/colors"; +@forward "@carbon/react/scss/type"; +@forward "@carbon/react/scss/spacing"; +@forward "@carbon/react/scss/theme"; +@forward "@carbon/react/scss/motion"; +@forward "@carbon/react/scss/components/button/tokens"; diff --git a/canvas_modules/harness/assets/styles/common.scss b/canvas_modules/harness/assets/styles/common.scss index 680ee14f80..72b2c8fb67 100644 --- a/canvas_modules/harness/assets/styles/common.scss +++ b/canvas_modules/harness/assets/styles/common.scss @@ -15,4 +15,4 @@ */ @use "@carbon/react" as * with ( $font-path: "/fonts" -); \ No newline at end of file +); diff --git a/canvas_modules/harness/package.json b/canvas_modules/harness/package.json index 05dd630524..aba4f928d6 100644 --- a/canvas_modules/harness/package.json +++ b/canvas_modules/harness/package.json @@ -5,72 +5,73 @@ "license": "Apache-2.0", "scripts": { "start": "NODE_ENV=development node index.js", - "build": "npx stylelint 'src/**/*.scss' && grunt", + "build": "npx stylelint 'src/**/*.scss' 'assets/**/*.scss' && grunt", "test": "npx cypress open", "bundle-report": "NODE_ENV=production BUNDLE_REPORT=true grunt", "start-prod": "NODE_ENV=production node index.js", - "build-prod": "npx stylelint 'src/**/*.scss' && NODE_ENV=production grunt --max-old-space-size=8192" + "build-prod": "npx stylelint 'src/**/*.scss' 'assets/**/*.scss' && NODE_ENV=production grunt --max-old-space-size=8192" }, "engines": { "node": "20.x" }, "dependencies": { - "body-parser": "1.19.0", + "body-parser": "1.20.2", "compression": "1.7.4", - "express": "4.17.1", - "express-session": "1.17.1", + "express": "4.19.2", + "express-session": "1.18.0", "html-to-image": "1.11.11", "isomorphic-fetch": "3.0.0", "js-file-download": "0.4.12", "jspdf": "2.5.1", "lodash": "4.17.21", - "log4js": "6.4.1", - "nconf": "0.12.0" + "log4js": "6.9.1", + "nconf": "0.12.1" }, "devDependencies": { - "@babel/core": "7.11.6", - "@babel/plugin-proposal-class-properties": "7.10.4", - "@babel/plugin-transform-runtime": "7.11.5", - "@babel/polyfill": "7.11.5", - "@babel/preset-env": "7.11.5", - "@babel/preset-react": "7.10.4", + "@babel/core": "7.24.3", + "@babel/plugin-proposal-class-properties": "7.18.6", + "@babel/plugin-transform-runtime": "7.24.3", + "@babel/polyfill": "7.12.1", + "@babel/preset-env": "7.24.3", + "@babel/preset-react": "7.24.1", "@carbon/charts": "1.15.3", "@carbon/charts-react": "1.15.3", "@carbon/react": "^1.52.0", "@elyra/canvas": "file:../common-canvas", - "autoprefixer": "10.3.1", - "babel-loader": "8.1.0", + "ajv": "8.12.0", + "autoprefixer": "10.4.19", + "babel-loader": "9.1.3", "babel-plugin-lodash": "3.3.4", - "css-loader": "4.3.0", + "css-loader": "6.10.0", "cypress": "12.17.0", "eslint": "7.9.0", "eslint-config-canvas": "file:../eslint-config-canvas", - "eslint-plugin-cypress": "2.11.1", - "eslint-plugin-import": "2.25.3", - "eslint-plugin-react": "7.21.2", - "file-loader": "6.1.0", - "grunt": "1.5.3", - "grunt-contrib-clean": "2.0.0", + "eslint-plugin-cypress": "2.15.1", + "eslint-plugin-import": "2.29.1", + "eslint-plugin-react": "7.34.1", + "file-loader": "6.2.0", + "grunt": "1.6.1", + "grunt-contrib-clean": "2.0.1", "grunt-contrib-copy": "1.0.0", "grunt-contrib-sass": "2.0.0", "grunt-env": "1.0.1", - "grunt-eslint": "23.0.0", + "grunt-eslint": "24.3.0", "grunt-jsonlint": "2.1.3", - "grunt-webpack": "5.0.0", + "grunt-webpack": "6.0.0", "grunt-yamllint": "0.3.0", "html-webpack-plugin": "5.6.0", "ibm-design-icons": "2.1.4", - "mini-css-extract-plugin": "0.11.2", + "mini-css-extract-plugin": "2.8.1", "object-assign": "4.1.1", "path": "0.12.7", - "postcss": "8.4.31", - "postcss-loader": "4.3.0", - "prop-types": "15.7.2", + "postcss": "8.4.38", + "postcss-loader": "8.1.1", + "prop-types": "15.8.1", "react": "18.2.0", "react-dom": "18.2.0", - "react-hot-loader": "4.13.0", + "react-hot-loader": "4.13.1", "react-inlinesvg": "4.1.3", - "react-intl": "6.6.2", + "react-intl": "6.6.3", "react-redux": "7.2.8", "react-refresh": "0.14.0", "react-router-dom": "5.2.0", @@ -78,14 +79,14 @@ "react-virtualized": "9.22.5", "reactable": "1.1.0", "redux": "5.0.1", - "sass": "1.71.1", - "sass-loader": "12.6.0", - "source-map-loader": "1.1.0", - "style-loader": "1.2.1", + "sass": "1.72.0", + "sass-loader": "14.1.1", + "source-map-loader": "5.0.0", + "style-loader": "3.3.4", "stylelint": "13.13.1", - "webpack": "5.90.3", + "webpack": "5.91.0", "webpack-bundle-analyzer": "4.10.1", - "webpack-dev-middleware": "7.1.0", + "webpack-dev-middleware": "7.1.1", "webpack-hot-middleware": "2.26.1", "webpack-manifest-plugin": "5.0.0" } diff --git a/canvas_modules/harness/src/.eslintrc.js b/canvas_modules/harness/src/.eslintrc.js index ef9f2824e4..89e6a0a49e 100644 --- a/canvas_modules/harness/src/.eslintrc.js +++ b/canvas_modules/harness/src/.eslintrc.js @@ -18,23 +18,24 @@ module.exports = { "eslint-config-canvas", "eslint-config-canvas/react" ].map(require.resolve), - env: { - }, - rules: { - // Disable strict warning on ES6 Components - "strict": 0, - "global-require": 0, - "sort-imports": 0, - "react/jsx-indent-props": [2, "tab"], - "max-len": [2, 180, 4], - }, - globals: { - "document": true, - "window": true, - "location": true, - "navigator": true - }, - parserOptions: { - "sourceType": "module" - } + env: { + }, + rules: { + // Disable strict warning on ES6 Components + "strict": 0, + "global-require": 0, + "sort-imports": 0, + "react/jsx-indent-props": [2, "tab"], + "max-len": [2, 180, 4], + }, + globals: { + "document": true, + "window": true, + "location": true, + "navigator": true, + "fetch": true + }, + parserOptions: { + "sourceType": "module" + } }; diff --git a/canvas_modules/harness/src/client/components/breadcrumbs.jsx b/canvas_modules/harness/src/client/components/breadcrumbs.jsx index 593e1edc62..0e402a6727 100644 --- a/canvas_modules/harness/src/client/components/breadcrumbs.jsx +++ b/canvas_modules/harness/src/client/components/breadcrumbs.jsx @@ -27,12 +27,13 @@ export default class Breadcrumbs extends React.Component { ? / :
; const link = index !== this.props.breadcrumbsDef.length - 1 - ? () + ? ( + ) : (
{label}
); diff --git a/canvas_modules/harness/src/client/services/FormsService.js b/canvas_modules/harness/src/client/services/FormsService.js index 3c50b174f8..39d2a60037 100644 --- a/canvas_modules/harness/src/client/services/FormsService.js +++ b/canvas_modules/harness/src/client/services/FormsService.js @@ -14,7 +14,6 @@ * limitations under the License. */ /* eslint no-console: ["error", { allow: ["log", "warn", "error"] }] */ -import fetch from "isomorphic-fetch"; class FormsService { getFiles(type) { diff --git a/canvas_modules/harness/src/client/services/OpsService.js b/canvas_modules/harness/src/client/services/OpsService.js index b19ad5ea2c..c0fab6cb94 100644 --- a/canvas_modules/harness/src/client/services/OpsService.js +++ b/canvas_modules/harness/src/client/services/OpsService.js @@ -14,7 +14,6 @@ * limitations under the License. */ /* eslint no-console: ["error", { allow: ["log", "warn", "error"] }] */ -import fetch from "isomorphic-fetch"; class OpsService { syntaxCheck(expression) { diff --git a/canvas_modules/harness/webpack.config.dev.js b/canvas_modules/harness/webpack.config.dev.js index bd45db01a4..4790364520 100644 --- a/canvas_modules/harness/webpack.config.dev.js +++ b/canvas_modules/harness/webpack.config.dev.js @@ -62,8 +62,17 @@ const rules = [ { test: /\.s*css$/, use: [ - { loader: "style-loader" }, - { loader: "css-loader", options: { sourceMap: true, url: false } }, + { loader: "style-loader", + options: { + esModule: false + } + }, + { loader: "css-loader", + options: { + sourceMap: true, + url: false + } + }, { loader: "postcss-loader", options: { postcssOptions: { diff --git a/canvas_modules/harness/webpack.config.prod.js b/canvas_modules/harness/webpack.config.prod.js index 82f52a4401..279b8aefe6 100644 --- a/canvas_modules/harness/webpack.config.prod.js +++ b/canvas_modules/harness/webpack.config.prod.js @@ -56,7 +56,11 @@ const rules = [ { loader: MiniCssExtractPlugin.loader, }, - { loader: "css-loader", options: { url: false } }, + { loader: "css-loader", + options: { + url: false + } + }, { loader: "postcss-loader", options: { postcssOptions: {