Skip to content

Commit

Permalink
fix(build): npm updates (#576)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdcabrera committed Apr 20, 2021
1 parent 8d1f656 commit ee2a533
Show file tree
Hide file tree
Showing 10 changed files with 2,743 additions and 3,341 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.vscode/

# dependencies
*.eslintcache
node_modules
.pnp*

Expand Down
23 changes: 12 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
},
"collectCoverageFrom": [
"src/**/*.{js,jsx}",
"!src/**/.*/**",
"!src/index.js",
"!src/setupTests.js",
"!src/components/app.js",
Expand Down Expand Up @@ -111,9 +112,9 @@
"@redhat-cloud-services/frontend-components": "2.5.0",
"@redhat-cloud-services/frontend-components-notifications": "2.2.3",
"@redhat-cloud-services/frontend-components-utilities": "2.2.7",
"axios": "^0.21.0",
"axios": "^0.21.1",
"classnames": "^2.2.6",
"i18next": "^19.8.4",
"i18next": "^19.8.7",
"i18next-xhr-backend": "^3.2.2",
"js-cookie": "^2.2.1",
"locale-code": "^2.0.2",
Expand All @@ -124,11 +125,11 @@
"prop-types": "^15.7.2",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-i18next": "^11.7.3",
"react-i18next": "^11.8.5",
"react-redux": "^7.2.2",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0",
"react-scripts": "3.4.3",
"react-scripts": "3.4.4",
"redux": "^4.0.5",
"redux-logger": "^3.0.6",
"redux-promise-middleware": "^6.1.2",
Expand All @@ -138,28 +139,28 @@
},
"devDependencies": {
"apidoc-mock": "^3.0.3",
"cspell": "^4.2.5",
"cspell": "^5.2.4",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.5",
"enzyme-adapter-react-16": "^1.15.6",
"enzyme-to-json": "^3.6.1",
"eslint-config-airbnb": "^18.2.1",
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jest": "^24.1.3",
"eslint-plugin-jsdoc": "^30.7.8",
"eslint-plugin-jsdoc": "^31.6.0",
"eslint-plugin-json": "^2.1.2",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-react": "^7.21.5",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-react": "^7.22.0",
"eslint-plugin-react-hooks": "^4.2.0",
"express": "^4.17.1",
"glob": "^7.1.6",
"moxios": "^0.4.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.2.1",
"redux-mock-store": "^1.5.4",
"standard-version": "^9.0.0",
"swagger-ui-express": "^4.1.5",
"standard-version": "^9.1.0",
"swagger-ui-express": "^4.1.6",
"yamljs": "^0.3.0"
},
"resolutions": {
Expand Down
4 changes: 2 additions & 2 deletions scripts/post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
echo "Cleaning up build resources..."

# clean up build
rm ./build/*manifest*.js*
rm ./build/service-worker.js
rm -f ./build/*manifest*.js*
rm -f ./build/service-worker.js
}
2 changes: 1 addition & 1 deletion scripts/pre.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ clean()
echo "Cleaning build directories, files..."
rm -rf -- ./build
rm -rf -- ./public/apps
rm ./.env.production.local
rm -f ./.env.production.local
}
#
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,12 +313,12 @@ exports[`ChartArea Component should allow tick formatting: x tick format 1`] = `
</g>
<g>
<g
clip-path="url(#victory-clip-2)"
clip-path="url(#victory-clip-4)"
style="height:100%;width:100%;user-select:none"
>
<defs>
<clipPath
id="victory-clip-2"
id="victory-clip-4"
>
<rect
height="175"
Expand Down Expand Up @@ -665,12 +665,12 @@ exports[`ChartArea Component should allow tick formatting: y tick format 1`] = `
</g>
<g>
<g
clip-path="url(#victory-clip-1)"
clip-path="url(#victory-clip-2)"
style="height:100%;width:100%;user-select:none"
>
<defs>
<clipPath
id="victory-clip-1"
id="victory-clip-2"
>
<rect
height="175"
Expand Down
5 changes: 5 additions & 0 deletions src/components/chartArea/__tests__/chartArea.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,11 @@ describe('ChartArea Component', () => {
});

it('should run componentWillUnmount method successfully', () => {
window.ResizeObserver = jest.fn().mockImplementation(() => ({
observe: jest.fn(),
unobserve: jest.fn()
}));

const component = mount(<ChartArea />);
const componentWillUnmount = jest.spyOn(component.instance(), 'componentWillUnmount');
component.unmount();
Expand Down
18 changes: 8 additions & 10 deletions src/redux/middleware/actionRecordMiddleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,14 @@ const recordAction = (action, { id, limit, ...config }) => {
* @param {object} config
* @returns {Function}
*/
const actionRecordMiddleware = (config = {}) => {
return () => next => action => {
recordAction(action, {
id: 'actionRecordMiddleware/v1',
limit: 100,
...config
});

return next(action);
};
const actionRecordMiddleware = (config = {}) => () => next => action => {
recordAction(action, {
id: 'actionRecordMiddleware/v1',
limit: 100,
...config
});

return next(action);
};

export { actionRecordMiddleware as default, actionRecordMiddleware };
4 changes: 2 additions & 2 deletions src/redux/selectors/viewSelectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const statePropsFilter = (state = {}, props, defaultProps = {}) => ({
/**
* Create selector, transform combined state, props into a consumable API param/query object.
*
* @type {{query: object, graphTallyQuery: object, inventoryGuestsQuery: object, inventoryHostsQuery: object
* @type {{query: object, graphTallyQuery: object, inventoryGuestsQuery: object, inventoryHostsQuery: object,
* inventorySubscriptionsQuery: object}}
*/
const selector = createDeepEqualSelector([statePropsFilter], view => ({
Expand All @@ -71,7 +71,7 @@ const selector = createDeepEqualSelector([statePropsFilter], view => ({
* Expose selector instance. For scenarios where a selector is reused across component instances.
*
* @param {object} defaultProps
* @returns {{query: object, graphTallyQuery: object, inventoryGuestsQuery: object, inventoryHostsQuery: object
* @returns {{query: object, graphTallyQuery: object, inventoryGuestsQuery: object, inventoryHostsQuery: object,
* inventorySubscriptionsQuery: object}}
*/
const makeSelector = defaultProps => (state, props) => ({
Expand Down
2 changes: 2 additions & 0 deletions tests/__snapshots__/dist.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ Array [
"./build/static/js/7*chunk.js",
"./build/static/js/8*chunk*map",
"./build/static/js/8*chunk.js",
"./build/static/js/9*chunk*map",
"./build/static/js/9*chunk.js",
"./build/static/js/main*chunk*map",
"./build/static/js/main*chunk.js",
"./build/static/js/runtime-main*js",
Expand Down
Loading

0 comments on commit ee2a533

Please sign in to comment.