Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade redux and react-redux packages #1251

Merged
merged 10 commits into from
Nov 14, 2024
  •  
  •  
  •  
11 changes: 10 additions & 1 deletion .deps/dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,19 @@
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #4131 |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #10839 |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #10792 |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #16176 |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #13991 |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #8234 |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #7582 |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #10842 |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
Expand Down Expand Up @@ -242,6 +246,7 @@
| `[email protected]` | MIT | clearlydefined |
| `[email protected]` | MIT | clearlydefined |
| [`[email protected]`](https://github.com/jsdom/cssstyle) | MIT | clearlydefined |
| `[email protected]` | MIT | #11847 |
| `[email protected]` | MIT | clearlydefined |
| `[email protected]` | MIT | clearlydefined |
| [`[email protected]`](git://github.com/debug-js/debug.git) | MIT | clearlydefined |
Expand All @@ -250,6 +255,7 @@
| `[email protected]` | MIT | clearlydefined |
| [`[email protected]`](https://github.com/MikeMcl/decimal.js.git) | MIT | clearlydefined |
| [`[email protected]`](git://github.com/dmnd/dedent.git) | MIT | #14381 |
| [`[email protected]`](git://github.com/flitbit/diff.git) | MIT | clearlydefined |
| [`[email protected]`](http://github.com/thlorenz/deep-is.git) | MIT | #2130 |
| `[email protected]` | MIT | clearlydefined |
| `[email protected]` | MIT | clearlydefined |
Expand Down Expand Up @@ -610,6 +616,7 @@
| [`[email protected]`](git+https://github.com/dubzzz/pure-rand.git) | MIT | #8423 |
| [`[email protected]`](git://github.com/feross/queue-microtask.git) | MIT | clearlydefined |
| `[email protected]` | MIT | clearlydefined |
| [`[email protected]`](https://github.com/facebook/react.git) | MIT | clearlydefined |
| [`[email protected]`](https://github.com/facebook/react.git) | MIT | clearlydefined |
| [`[email protected]`](https://github.com/facebook/react.git) | MIT | clearlydefined |
| [`[email protected]`](https://reactjs.org/) | MIT | clearlydefined |
Expand All @@ -620,7 +627,9 @@
| `[email protected]` | MIT | clearlydefined |
| `[email protected]` | MIT | clearlydefined |
| `[email protected]` | MIT | clearlydefined |
| [`[email protected]`](git+https://github.com/theaqua/redux-logger.git) | MIT | clearlydefined |
| [`[email protected]`](git+https://github.com/arnaudbenard/redux-mock-store.git) | MIT | clearlydefined |
| [`[email protected]`](http://redux.js.org) | MIT | #7046 |
| [`[email protected]`](git+https://github.com/es-shims/Reflect.getPrototypeOf.git) | MIT | #13910 |
| [`[email protected]`](git://github.com/es-shims/RegExp.prototype.flags.git) | MIT | #8199 |
| [`[email protected]`](git://github.com/stevenvachon/relateurl.git) | MIT | clearlydefined |
Expand Down
23 changes: 9 additions & 14 deletions .deps/prod.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
| Packages | License | Resolved CQs |
| --- | --- | --- |
| [`@babel/[email protected]`](https://github.com/babel/babel.git) | MIT | #10718 |
| [`@babel/[email protected]`](https://github.com/babel/babel.git) | MIT | #13900 |
| [`@codemirror/[email protected]`](https://github.com/codemirror/autocomplete.git) | MIT | clearlydefined |
| [`@codemirror/[email protected]`](git+https://github.com/codemirror/lang-yaml.git) | MIT | clearlydefined |
| [`@codemirror/[email protected]`](https://github.com/codemirror/language.git) | MIT | clearlydefined |
Expand Down Expand Up @@ -52,6 +51,7 @@
| [`@patternfly/[email protected]`](https://github.com/patternfly/patternfly-react.git) | MIT | [clearlydefined](https://clearlydefined.io/definitions/npm/npmjs/@patternfly/react-table/4.113.6) |
| [`@patternfly/[email protected]`](https://github.com/patternfly/patternfly-react.git) | MIT | clearlydefined |
| [`@pkgjs/[email protected]`]([email protected]:pkgjs/parseargs.git) | MIT | #8236 |
| [`@reduxjs/[email protected]`](git+https://github.com/reduxjs/redux-toolkit.git) | MIT | #14170 |
| [`@remix-run/[email protected]`](https://github.com/remix-run/react-router) | MIT | clearlydefined |
| `@sideway/[email protected]` | BSD-3-Clause | #3098 |
| `@sideway/[email protected]` | BSD-3-Clause | clearlydefined |
Expand All @@ -62,21 +62,17 @@
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #8266 |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #8266 |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #10811 |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #11004 |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #10804 |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #16176 |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #10970 |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #8234 |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #7582 |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #10798 |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
| [`@types/[email protected]`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #6016 |
| [`@ungap/[email protected]`](git+https://github.com/ungap/structured-clone.git) | ISC | clearlydefined |
| [`[email protected]`](https://github.com/npm/abbrev-js.git) | ISC | clearlydefined |
Expand Down Expand Up @@ -153,9 +149,8 @@
| [`[email protected]`](https://github.com/crypto-browserify/createECDH.git) | MIT | clearlydefined |
| [`[email protected]`]([email protected]:crypto-browserify/createHash.git) | MIT | clearlydefined |
| [`[email protected]`](https://github.com/crypto-browserify/createHmac.git) | MIT | clearlydefined |
| [`[email protected]`]([email protected]:moxystudio/node-cross-spawn.git) | MIT | clearlydefined |
| [`[email protected]`]([email protected]:moxystudio/node-cross-spawn.git) | MIT | #17146 |
| [`[email protected]`](git://github.com/crypto-browserify/crypto-browserify.git) | MIT | #1033 |
| `[email protected]` | MIT | #11847 |
| [`[email protected]`](git://github.com/trentm/node-dashdash.git) | MIT | #14596 |
| `[email protected]` | MIT | #14000 |
| [`[email protected]`](https://github.com/felixge/node-dateformat.git) | MIT | clearlydefined |
Expand Down Expand Up @@ -250,7 +245,6 @@
| [`[email protected]`](https://github.com/mcollina/help-me.git) | MIT | clearlydefined |
| `[email protected]` | MIT | clearlydefined |
| [`[email protected]`](git+ssh://[email protected]/indutny/hmac-drbg.git) | MIT | clearlydefined |
| [`[email protected]`](git://github.com/mridgway/hoist-non-react-statics.git) | BSD-3-Clause | clearlydefined |
| `[email protected]` | MIT | clearlydefined |
| [`[email protected]`](git://github.com/fb55/htmlparser2.git) | MIT | clearlydefined |
| `[email protected]` | BSD-2-Clause | clearlydefined |
Expand All @@ -261,6 +255,7 @@
| `[email protected]` | ISC | clearlydefined |
| [`[email protected]`](git://github.com/ashtuchkin/iconv-lite.git) | MIT | clearlydefined |
| [`[email protected]`](git://github.com/feross/ieee754.git) | BSD-3-Clause | clearlydefined |
| [`[email protected]`](https://github.com/immerjs/immer.git) | MIT | clearlydefined |
| [`[email protected]`](https://github.com/jensyt/imurmurhash-js) | MIT | clearlydefined |
| `[email protected]` | MIT | clearlydefined |
| [`[email protected]`](https://github.com/npm/inflight.git) | ISC | clearlydefined |
Expand Down Expand Up @@ -434,10 +429,9 @@
| [`[email protected]`](https://github.com/FormidableLabs/react-fast-compare) | MIT | clearlydefined |
| [`[email protected]`](https://github.com/nfl/react-helmet) | MIT | clearlydefined |
| [`[email protected]`](https://github.com/facebook/react.git) | MIT | clearlydefined |
| [`[email protected]`](https://github.com/facebook/react.git) | MIT | clearlydefined |
| `[email protected]` | MIT | clearlydefined |
| [`[email protected]`](https://github.com/tsmith123/react-pluralize) | MIT | clearlydefined |
| [`react-redux@7.2.9`](https://github.com/reduxjs/react-redux) | MIT | #2978 |
| [`react-redux@9.1.2`](https://github.com/reduxjs/react-redux) | MIT | #13913 |
| [`[email protected]`](https://github.com/remix-run/react-router) | MIT | #15860 |
| [`[email protected]`](https://github.com/remix-run/react-router) | MIT | clearlydefined |
| [`[email protected]`](https://github.com/gaearon/react-side-effect.git) | MIT | clearlydefined |
Expand All @@ -447,8 +441,8 @@
| [`[email protected]`](git://github.com/nodejs/readable-stream) | MIT | #8426 |
| [`[email protected]`](git+https://github.com/pinojs/real-require.git) | MIT | [clearlydefined](https://clearlydefined.io/definitions/npm/npmjs/-/real-require/0.2.0) |
| [`[email protected]`](git+https://github.com/pladaria/reconnecting-websocket.git) | MIT | #940 |
| [`redux-thunk@2.4.2`](https://github.com/reduxjs/redux-thunk) | MIT | clearlydefined |
| [`redux@4.2.1`](http://redux.js.org) | MIT | #7046 |
| [`redux-thunk@3.1.0`](https://github.com/reduxjs/redux-thunk) | MIT | clearlydefined |
| [`redux@5.0.1`](http://redux.js.org) | MIT | clearlydefined |
| [`[email protected]`](https://github.com/rbuckton/reflect-metadata.git) | Apache-2.0 | clearlydefined |
| [`[email protected]`](https://github.com/rbuckton/reflect-metadata.git) | Apache-2.0 | clearlydefined |
| [`[email protected]`](https://github.com/rbuckton/reflect-metadata.git) | Apache-2.0 | clearlydefined |
Expand All @@ -458,7 +452,7 @@
| [`[email protected]`](https://github.com/request/request.git) | Apache-2.0 | #997 |
| `[email protected]` | MIT | clearlydefined |
| [`[email protected]`](https://github.com/unshiftio/requires-port) | MIT | clearlydefined |
| [`reselect@4.1.8`](https://github.com/reduxjs/reselect.git) | MIT | clearlydefined |
| [`reselect@5.1.1`](https://github.com/reduxjs/reselect.git) | MIT | clearlydefined |
| `[email protected]` | MIT | clearlydefined |
| [`[email protected]`](git://github.com/fent/ret.js.git) | MIT | clearlydefined |
| [`[email protected]`](git://github.com/tim-kos/node-retry.git) | MIT | clearlydefined |
Expand Down Expand Up @@ -543,6 +537,7 @@
| [`[email protected]`](git+https://github.com/RyanZim/universalify.git) | MIT | clearlydefined |
| [`[email protected]`](http://github.com/garycourt/uri-js) | BSD-2-Clause | #1086 |
| [`[email protected]`](https://github.com/unshiftio/url-parse.git) | MIT | clearlydefined |
| [`[email protected]`](https://github.com/facebook/react.git) | MIT | clearlydefined |
| [`[email protected]`](git://github.com/TooTallNate/util-deprecate.git) | MIT | #5885 |
| [`[email protected]`](https://github.com/uuidjs/uuid.git) | MIT | #2733 |
| [`[email protected]`](https://github.com/uuidjs/uuid.git) | MIT | #57 |
Expand Down
8 changes: 4 additions & 4 deletions packages/dashboard-backend/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ module.exports = {
setupFilesAfterEnv: ['./jest.setup.js'],
coverageThreshold: {
global: {
statements: 81,
branches: 78,
functions: 78,
lines: 81,
statements: 86,
branches: 80,
functions: 86,
lines: 86,
},
},
};
8 changes: 4 additions & 4 deletions packages/dashboard-frontend/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ module.exports = {
],
coverageThreshold: {
global: {
statements: 90,
branches: 86,
functions: 85,
lines: 90,
statements: 92,
branches: 88,
functions: 87,
lines: 92,
},
},
};
6 changes: 6 additions & 0 deletions packages/dashboard-frontend/jest.setup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,9 @@ jest.mock('react-markdown', () => {
return React.createElement('a', null, props.children, props.content);
});
});

jest.mock('gravatar-url', () => {
return function () {
return 'avatar/source/location';
};
});
11 changes: 6 additions & 5 deletions packages/dashboard-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"@patternfly/react-core": "^4.276.11",
"@patternfly/react-icons": "^4.93.7",
"@patternfly/react-table": "^4.113.3",
"@reduxjs/toolkit": "^2.2.7",
"axios": "^1.7.0",
"buffer": "^6.0.3",
"crypto-browserify": "^3.12.0",
Expand All @@ -61,14 +62,12 @@
"react-helmet": "^6.1.0",
"react-markdown": "^9.0.1",
"react-pluralize": "^1.6.3",
"react-redux": "^7.2.9",
"react-redux": "^9.1.2",
"react-router-dom": "^6.26.1",
"react-tooltip": "^4.5.1",
"reconnecting-websocket": "^4.4.0",
"redux": "^4.2.1",
"redux-thunk": "^2.4.2",
"redux": "^5.0.1",
"reflect-metadata": "^0.1.13",
"reselect": "^4.1.8",
"sanitize-html": "^2.11.0"
},
"devDependencies": {
Expand All @@ -89,7 +88,8 @@
"@types/react-dom": "^18.3.0",
"@types/react-router-dom": "^5.3.3",
"@types/react-test-renderer": "^18.3.0",
"@types/redux-mock-store": "^1.0.2",
"@types/redux-logger": "^3.0.13",
"@types/redux-mock-store": "^1.0.6",
"@types/sanitize-html": "^2.9.0",
"@types/webpack": "^5.28.5",
"@typescript-eslint/eslint-plugin": "^6.4.0",
Expand Down Expand Up @@ -118,6 +118,7 @@
"mini-css-extract-plugin": "^2.7.6",
"prettier": "^3.2.5",
"react-test-renderer": "^18.3.1",
"redux-logger": "^3.0.6",
"redux-mock-store": "^1.5.4",
"source-map-loader": "^4.0.1",
"speed-measure-webpack-plugin": "^1.5.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,14 @@ import { fireEvent, render, screen } from '@testing-library/react';
import React from 'react';
import { Provider } from 'react-redux';
import renderer from 'react-test-renderer';
import { Action, Store } from 'redux';
import { Store } from 'redux';

import { AboutMenu } from '@/Layout/Header/Tools/AboutMenu';
import { BRANDING_DEFAULT, BrandingData } from '@/services/bootstrap/branding.constant';
import { che } from '@/services/models';
import { AppThunk } from '@/store';
import { FakeStoreBuilder } from '@/store/__mocks__/storeBuilder';
import { MockStoreBuilder } from '@/store/__mocks__/mockStore';
import { selectBranding } from '@/store/Branding/selectors';
import * as InfrastructureNamespacesStore from '@/store/InfrastructureNamespaces';

import { AboutMenu } from '..';
import { infrastructureNamespacesActionCreators } from '@/store/InfrastructureNamespaces';

jest.mock('gravatar-url', () => {
return function () {
Expand All @@ -35,12 +33,10 @@ jest.mock('gravatar-url', () => {
jest.mock('@/store/InfrastructureNamespaces', () => {
return {
actionCreators: {
requestNamespaces:
(): AppThunk<Action, Promise<che.KubernetesNamespace[]>> =>
async (): Promise<che.KubernetesNamespace[]> => {
return Promise.resolve([]);
},
} as InfrastructureNamespacesStore.ActionCreators,
requestNamespaces: (): AppThunk => async (): Promise<void> => {
return Promise.resolve();
},
} as typeof infrastructureNamespacesActionCreators,
};
});

Expand Down Expand Up @@ -131,7 +127,7 @@ describe('About Menu', () => {
});

function createStore(cheCliTool: string, name: string, email: string): Store {
return new FakeStoreBuilder()
return new MockStoreBuilder()
.withUserProfile({
username: name,
email,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { Provider } from 'react-redux';
import renderer from 'react-test-renderer';
import { Store } from 'redux';

import { FakeStoreBuilder } from '@/store/__mocks__/storeBuilder';
import { MockStoreBuilder } from '@/store/__mocks__/mockStore';
import { selectApplications } from '@/store/ClusterInfo/selectors';

import { ApplicationsMenu } from '..';
Expand Down Expand Up @@ -89,7 +89,7 @@ describe('About Menu', () => {
});

function createStore(): Store {
return new FakeStoreBuilder()
return new MockStoreBuilder()
.withClusterInfo({
applications: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,22 @@ import { createHashHistory } from 'history';
import React from 'react';
import { Provider } from 'react-redux';
import renderer from 'react-test-renderer';
import { Action, Store } from 'redux';
import { Store } from 'redux';

import UserMenu from '@/Layout/Header/Tools/UserMenu';
import { BRANDING_DEFAULT, BrandingData } from '@/services/bootstrap/branding.constant';
import { che } from '@/services/models';
import { AppThunk } from '@/store';
import { FakeStoreBuilder } from '@/store/__mocks__/storeBuilder';
import { MockStoreBuilder } from '@/store/__mocks__/mockStore';
import { selectBranding } from '@/store/Branding/selectors';
import * as InfrastructureNamespacesStore from '@/store/InfrastructureNamespaces';

import UserMenu from '..';
import { infrastructureNamespacesActionCreators } from '@/store/InfrastructureNamespaces';

jest.mock('@/store/InfrastructureNamespaces', () => {
return {
actionCreators: {
requestNamespaces:
(): AppThunk<Action, Promise<che.KubernetesNamespace[]>> =>
async (): Promise<che.KubernetesNamespace[]> => {
return Promise.resolve([]);
},
} as InfrastructureNamespacesStore.ActionCreators,
requestNamespaces: (): AppThunk => async () => {
return Promise.resolve();
},
} as typeof infrastructureNamespacesActionCreators,
};
});

Expand Down Expand Up @@ -87,7 +83,7 @@ describe('User Menu', () => {
});

function createStore(name: string, email: string): Store {
return new FakeStoreBuilder()
return new MockStoreBuilder()
.withUserProfile({
username: name,
email,
Expand Down
Loading
Loading