This commit adds Redux Toolkit as a dependency. Adding Redux Toolkit is beneficial because it will allow us to use the current best-practice Redux development patterns and tools as well as reduce the number of dependencies. Redux Toolkit is backwards compatible with existing Redux code, and therefore works with all of the current actions and reducers. The store is now created using Redux Toolkit's configureStore(). Previously, a custom store creator developed by Red Hat Insights was used. However, this is actually not required for Insights apps, and creating the store using configureStore() is necessary to take advantage of Redux Toolkit. For instance, the store can now be inspected using the Redux devtools in the browser. This commit removes the redux-logger middleware. It is no longer necessary, as the Redux development tools can now be used to easily inspect and reason about the redux store and its state. The Thunk middleware dependency has also been removed, as Thunks are already included in Redux Toolkit. The redux-promise-middleware dependency has been left in place for now, but its functionality is also available in Redux Toolkit and it may be considered for removal in the future. Using Redux Toolkit will also allow us to move to the `Slice` pattern when defining actions/reducers in the future if we wish. This will make writing, reasoning about, and debugging the code related to the Redux store much easier.
100 lines
3.2 KiB
JSON
100 lines
3.2 KiB
JSON
{
|
|
"name": "image-builder",
|
|
"version": "1.1.0",
|
|
"private": false,
|
|
"engines": {
|
|
"node": ">=16.0.0",
|
|
"npm": ">=7.0.0"
|
|
},
|
|
"dependencies": {
|
|
"@data-driven-forms/pf4-component-mapper": "3.16.10",
|
|
"@data-driven-forms/react-form-renderer": "3.16.10",
|
|
"@patternfly/patternfly": "4.185.1",
|
|
"@patternfly/react-core": "4.198.19",
|
|
"@patternfly/react-table": "4.71.16",
|
|
"@redhat-cloud-services/frontend-components": "3.9.2",
|
|
"@redhat-cloud-services/frontend-components-notifications": "3.2.7",
|
|
"@redhat-cloud-services/frontend-components-utilities": "3.2.16",
|
|
"@reduxjs/toolkit": "^1.8.5",
|
|
"classnames": "2.3.1",
|
|
"react": "17.0.2",
|
|
"react-dom": "17.0.2",
|
|
"react-redux": "8.0.2",
|
|
"react-router-dom": "6.3.0",
|
|
"redux": "4.1.2",
|
|
"redux-promise-middleware": "6.1.2"
|
|
},
|
|
"jest": {
|
|
"coverageDirectory": "./coverage/",
|
|
"collectCoverage": true,
|
|
"collectCoverageFrom": [
|
|
"src/**/*.js",
|
|
"!src/**/stories/*",
|
|
"!src/entry-dev.js"
|
|
],
|
|
"testEnvironment": "jsdom",
|
|
"globals": {
|
|
"COMMITHASH": "dummy"
|
|
},
|
|
"roots": [
|
|
"<rootDir>/src/"
|
|
],
|
|
"moduleNameMapper": {
|
|
"\\.(css|scss)$": "identity-obj-proxy"
|
|
},
|
|
"setupFiles": [
|
|
"jest-canvas-mock"
|
|
]
|
|
},
|
|
"devDependencies": {
|
|
"@babel/core": "7.18.6",
|
|
"@babel/eslint-parser": "^7.17.0",
|
|
"@babel/plugin-proposal-object-rest-spread": "7.17.3",
|
|
"@babel/plugin-transform-runtime": "7.17.0",
|
|
"@babel/preset-env": "7.16.11",
|
|
"@babel/preset-react": "7.16.7",
|
|
"@redhat-cloud-services/eslint-config-redhat-cloud-services": "1.2.2",
|
|
"@redhat-cloud-services/frontend-components-config": "4.6.13",
|
|
"@testing-library/dom": "8.13.0",
|
|
"@testing-library/jest-dom": "5.16.5",
|
|
"@testing-library/react": "12.1.5",
|
|
"@testing-library/user-event": "13.5.0",
|
|
"babel-jest": "28.1.2",
|
|
"babel-plugin-dual-import": "1.2.1",
|
|
"babel-plugin-transform-imports": "2.0.0",
|
|
"css-loader": "6.7.1",
|
|
"eslint": "8.13.0",
|
|
"eslint-plugin-jest-dom": "4.0.1",
|
|
"eslint-plugin-react": "7.29.4",
|
|
"eslint-plugin-testing-library": "5.1.0",
|
|
"git-revision-webpack-plugin": "5.0.0",
|
|
"identity-obj-proxy": "3.0.0",
|
|
"jest": "27.5.1",
|
|
"jest-canvas-mock": "2.3.1",
|
|
"npm-run-all": "4.1.5",
|
|
"postcss-scss": "4.0.3",
|
|
"prop-types": "15.8.1",
|
|
"redux-mock-store": "1.5.4",
|
|
"sass": "1.49.9",
|
|
"sass-loader": "12.6.0",
|
|
"stylelint": "14.6.1",
|
|
"stylelint-config-recommended-scss": "6.0.0",
|
|
"webpack-bundle-analyzer": "4.5.0"
|
|
},
|
|
"scripts": {
|
|
"lint": "npm-run-all lint:*",
|
|
"lint:js": "eslint config src",
|
|
"lint:js:fix": "eslint config src --fix",
|
|
"lint:sass": "stylelint 'src/**/*.scss' --config .stylelintrc.json",
|
|
"prod-beta": "BETA=true PROXY=true webpack serve --config config/dev.webpack.config.js",
|
|
"prod-stable": "PROXY=true webpack serve --config config/dev.webpack.config.js",
|
|
"stage-beta": "STAGE=true npm run prod-beta",
|
|
"test": "jest --verbose",
|
|
"test:single": "jest --verbose -w 1",
|
|
"build": "webpack --config config/prod.webpack.config.js",
|
|
"verify": "npm-run-all build lint test"
|
|
},
|
|
"insights": {
|
|
"appname": "image-builder"
|
|
}
|
|
}
|