diff --git a/package.json b/package.json index 18bb7b60a1b..27b1c58988f 100644 --- a/package.json +++ b/package.json @@ -104,6 +104,7 @@ "vite/esbuild": "^0.25.0", "react-router-dom/react-router/path-to-regexp": "^1.9.0", "**/form-data": "^4.0.4", + "redux": "^5.0.1", "@types/react": "18.2.1", "@types/react-dom": "18.2.1" }, @@ -146,7 +147,6 @@ "@types/pako": "^2.0.0", "@types/react": "^18.0.20", "@types/react-dom": "^18.0.5", - "@types/react-redux": "^7.1.12", "@types/react-router-dom": "^5.3.3", "@types/react-virtualized": "^9.21.10", "@types/react-window-infinite-loader": "^1.0.6", @@ -218,6 +218,7 @@ "prettier": "3.5.2", "react-refresh": "^0.9.0", "redux-mock-store": "^1.5.4", + "redux-thunk": "^3.1.0", "regenerator-runtime": "^0.13.5", "rimraf": "^3.0.2", "sass": "npm:sass-embedded", @@ -261,7 +262,7 @@ "@redis-ui/icons": "^6.9.3", "@redis-ui/styles": "^15.0.0", "@redis-ui/table": "^3.7.0", - "@reduxjs/toolkit": "^1.6.2", + "@reduxjs/toolkit": "^2.12.0", "@stablelib/snappy": "^1.0.2", "@types/json-dup-key-validator": "^1.0.2", "ajv": "^8.18.0", @@ -308,7 +309,7 @@ "react-hotkeys-hook": "^3.3.1", "react-jsx-parser": "^2.4.1", "react-monaco-editor": "^0.59.0", - "react-redux": "^7.2.2", + "react-redux": "^9.2.0", "react-resizable-panels": "^3.0.2", "react-rnd": "^10.3.5", "react-router-dom": "^5.3.4", diff --git a/redisinsight/desktop/tsconfig.json b/redisinsight/desktop/tsconfig.json index fe6781b1e57..84bcb564ec8 100644 --- a/redisinsight/desktop/tsconfig.json +++ b/redisinsight/desktop/tsconfig.json @@ -32,6 +32,6 @@ "apiClient/*": ["redisinsight/api-client/*"] } }, - "include": ["**/*"], + "include": ["**/*", "../ui/src/types/redux-augment.d.ts"], "exclude": ["dll/*", "dist", "node_modules"] } diff --git a/redisinsight/ui/.tscheck.rec.json b/redisinsight/ui/.tscheck.rec.json index c4e04ed9c6f..9f05b0a2ac9 100644 --- a/redisinsight/ui/.tscheck.rec.json +++ b/redisinsight/ui/.tscheck.rec.json @@ -1163,9 +1163,6 @@ "src/utils/streamUtils.ts": { "TS2345": 2 }, - "src/utils/test-utils.tsx": { - "TS2322": 2 - }, "src/utils/tests/apiResponse.spec.ts": { "TS2345": 1, "TS2739": 2, diff --git a/redisinsight/ui/src/components/cli/components/cli-body/CliBodyWrapper.spec.tsx b/redisinsight/ui/src/components/cli/components/cli-body/CliBodyWrapper.spec.tsx index a8de5e81e16..a9122a6d9d7 100644 --- a/redisinsight/ui/src/components/cli/components/cli-body/CliBodyWrapper.spec.tsx +++ b/redisinsight/ui/src/components/cli/components/cli-body/CliBodyWrapper.spec.tsx @@ -97,7 +97,7 @@ describe('CliBodyWrapper', () => { beforeEach(() => { const state: any = store.getState() - ;(useSelector as jest.Mock).mockImplementation( + ;(useSelector as unknown as jest.Mock).mockImplementation( (callback: (arg0: any) => any) => callback({ ...state, diff --git a/redisinsight/ui/src/components/oauth/oauth-jobs/OAuthJobs.spec.tsx b/redisinsight/ui/src/components/oauth/oauth-jobs/OAuthJobs.spec.tsx index ea8fbb2e3c3..6aa88df4c94 100644 --- a/redisinsight/ui/src/components/oauth/oauth-jobs/OAuthJobs.spec.tsx +++ b/redisinsight/ui/src/components/oauth/oauth-jobs/OAuthJobs.spec.tsx @@ -58,7 +58,7 @@ describe('OAuthJobs', () => { beforeEach(() => { const state = store.getState() as RootState - ;(useSelector as jest.Mock).mockImplementation( + ;(useSelector as unknown as jest.Mock).mockImplementation( (callback: (arg0: any) => any) => callback({ ...state, diff --git a/redisinsight/ui/src/packages/redistimeseries-app/yarn.lock b/redisinsight/ui/src/packages/redistimeseries-app/yarn.lock index c72b4997fff..76c3cfb1779 100644 --- a/redisinsight/ui/src/packages/redistimeseries-app/yarn.lock +++ b/redisinsight/ui/src/packages/redistimeseries-app/yarn.lock @@ -1420,6 +1420,9 @@ react@^17.0.2: loose-envify "^1.1.0" object-assign "^4.1.1" +"redisinsight-plugin-sdk@file:../redisinsight-plugin-sdk": + version "1.1.0" + redux@^4.0.0, redux@^4.0.4: version "4.2.1" resolved "https://registry.yarnpkg.com/redux/-/redux-4.2.1.tgz#c08f4306826c49b5e9dc901dee0452ea8fce6197" @@ -1851,7 +1854,7 @@ vfile@^4.0.0, vfile@^4.2.0: vfile-message "^2.0.0" "vite@file:../node_modules/vite": - version "6.3.4" + version "6.4.1" dependencies: esbuild "^0.25.0" fdir "^6.4.4" diff --git a/redisinsight/ui/src/pages/browser/BrowserPage.test.tsx b/redisinsight/ui/src/pages/browser/BrowserPage.test.tsx index fb7e39c5d2d..483d99a6ecf 100644 --- a/redisinsight/ui/src/pages/browser/BrowserPage.test.tsx +++ b/redisinsight/ui/src/pages/browser/BrowserPage.test.tsx @@ -63,7 +63,7 @@ beforeEach(() => { }) const selectKey = (state: any, selectedKey: any, data?: any = {}) => { - ;(useSelector as jest.Mock).mockImplementation( + ;(useSelector as unknown as jest.Mock).mockImplementation( (callback: (arg0: RootState) => RootState) => callback({ ...state, @@ -125,7 +125,9 @@ describe('BrowserPage', () => { } beforeAll(() => { - ;(useSelector as jest.Mock).mockImplementation(originalUseSelector) + ;(useSelector as unknown as jest.Mock).mockImplementation( + originalUseSelector, + ) }) it.each([true, false])( diff --git a/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkActions.spec.tsx b/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkActions.spec.tsx index 8b7f2767a55..4c41ce8d655 100644 --- a/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkActions.spec.tsx +++ b/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkActions.spec.tsx @@ -46,7 +46,7 @@ jest.mock('react-redux', () => ({ beforeEach(() => { const state: any = store.getState() - ;(useSelector as jest.Mock).mockImplementation( + ;(useSelector as unknown as jest.Mock).mockImplementation( (callback: (arg0: RootState) => RootState) => callback({ ...state, @@ -75,7 +75,7 @@ describe('BulkActions', () => { it('bulk actions summary should render with any search', () => { const state: any = store.getState() - ;(useSelector as jest.Mock).mockImplementation( + ;(useSelector as unknown as jest.Mock).mockImplementation( (callback: (arg0: any) => any) => callback({ ...state, @@ -108,7 +108,7 @@ describe('BulkActions', () => { it('bulk actions summary should render with any filter', () => { const state: any = store.getState() - ;(useSelector as jest.Mock).mockImplementation( + ;(useSelector as unknown as jest.Mock).mockImplementation( (callback: (arg0: any) => any) => callback({ ...state, @@ -150,7 +150,7 @@ describe('BulkActions', () => { describe('Telemetry', () => { it('should call proper telemetry events', async () => { const state: any = store.getState() - ;(useSelector as jest.Mock).mockImplementation( + ;(useSelector as unknown as jest.Mock).mockImplementation( (callback: (arg0: any) => any) => callback({ ...state, diff --git a/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkDelete/BulkDeleteContent/BulkDeleteContent.spec.tsx b/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkDelete/BulkDeleteContent/BulkDeleteContent.spec.tsx index a000fc45396..f36903ae572 100644 --- a/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkDelete/BulkDeleteContent/BulkDeleteContent.spec.tsx +++ b/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkDelete/BulkDeleteContent/BulkDeleteContent.spec.tsx @@ -29,7 +29,7 @@ jest.mock('react-redux', () => ({ beforeEach(() => { const state: any = store.getState() - ;(useSelector as jest.Mock).mockImplementation( + ;(useSelector as unknown as jest.Mock).mockImplementation( (callback: (arg0: RootState) => RootState) => callback({ ...state, diff --git a/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkDelete/BulkDeleteSummary/BulkDeleteSummary.spec.tsx b/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkDelete/BulkDeleteSummary/BulkDeleteSummary.spec.tsx index 5d68f3e06dd..b0e1ddac3a4 100644 --- a/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkDelete/BulkDeleteSummary/BulkDeleteSummary.spec.tsx +++ b/redisinsight/ui/src/pages/browser/components/bulk-actions/BulkDelete/BulkDeleteSummary/BulkDeleteSummary.spec.tsx @@ -29,7 +29,7 @@ jest.mock('react-redux', () => ({ beforeEach(() => { const state: any = store.getState() - ;(useSelector as jest.Mock).mockImplementation( + ;(useSelector as unknown as jest.Mock).mockImplementation( (callback: (arg0: RootState) => RootState) => callback({ ...state, @@ -54,7 +54,7 @@ describe('BulkDeleteSummary', () => { it('summary should contain calculated text', () => { const state: any = store.getState() - ;(useSelector as jest.Mock).mockImplementation( + ;(useSelector as unknown as jest.Mock).mockImplementation( (callback: (arg0: RootState) => RootState) => callback({ ...state, @@ -83,7 +83,7 @@ describe('BulkDeleteSummary', () => { it('should show folder key count when keyCount is set (folder delete)', () => { const state: any = store.getState() - ;(useSelector as jest.Mock).mockImplementation( + ;(useSelector as unknown as jest.Mock).mockImplementation( (callback: (arg0: RootState) => RootState) => callback({ ...state, @@ -120,7 +120,7 @@ describe('BulkDeleteSummary', () => { it('should show approximate title for folder delete when scan not complete', () => { const state: any = store.getState() - ;(useSelector as jest.Mock).mockImplementation( + ;(useSelector as unknown as jest.Mock).mockImplementation( (callback: (arg0: RootState) => RootState) => callback({ ...state, @@ -154,7 +154,7 @@ describe('BulkDeleteSummary', () => { it('should show N/A when scanned is 0 (avoid division by zero)', () => { const state: any = store.getState() - ;(useSelector as jest.Mock).mockImplementation( + ;(useSelector as unknown as jest.Mock).mockImplementation( (callback: (arg0: RootState) => RootState) => callback({ ...state, diff --git a/redisinsight/ui/src/pages/browser/components/redisearch-key-list/RediSearchIndexesList.spec.tsx b/redisinsight/ui/src/pages/browser/components/redisearch-key-list/RediSearchIndexesList.spec.tsx index af3dc1be7ce..8cd1d130695 100644 --- a/redisinsight/ui/src/pages/browser/components/redisearch-key-list/RediSearchIndexesList.spec.tsx +++ b/redisinsight/ui/src/pages/browser/components/redisearch-key-list/RediSearchIndexesList.spec.tsx @@ -102,7 +102,7 @@ describe('RediSearchIndexesList', () => { beforeEach(() => { const state: any = store.getState() - ;(useSelector as jest.Mock).mockImplementation( + ;(useSelector as unknown as jest.Mock).mockImplementation( (callback: (arg0: any) => any) => callback({ ...state, diff --git a/redisinsight/ui/src/pages/browser/components/use-key-format/useKeyFormat.spec.tsx b/redisinsight/ui/src/pages/browser/components/use-key-format/useKeyFormat.spec.tsx index 6917c99de4d..2dbee67a9d6 100644 --- a/redisinsight/ui/src/pages/browser/components/use-key-format/useKeyFormat.spec.tsx +++ b/redisinsight/ui/src/pages/browser/components/use-key-format/useKeyFormat.spec.tsx @@ -9,7 +9,7 @@ jest.mock('react-redux', () => ({ useSelector: jest.fn(), })) -const mockUseSelector = useSelector as jest.Mock +const mockUseSelector = useSelector as unknown as jest.Mock describe('useKeyFormat hook', () => { const renderUseKeyFormat = () => renderHook(() => useKeyFormat()) diff --git a/redisinsight/ui/src/pages/browser/components/virtual-tree/components/Node/Node.spec.tsx b/redisinsight/ui/src/pages/browser/components/virtual-tree/components/Node/Node.spec.tsx index 088c47ca887..ad840688ec7 100644 --- a/redisinsight/ui/src/pages/browser/components/virtual-tree/components/Node/Node.spec.tsx +++ b/redisinsight/ui/src/pages/browser/components/virtual-tree/components/Node/Node.spec.tsx @@ -490,9 +490,10 @@ describe('Node', () => { instances: { connectedInstance: { id: mockInstanceId } }, }, } + let currentState = { ...initialState, ...connectionState } const customStore = { - getState: () => ({ ...initialState, ...connectionState }), - subscribe: jest.fn(), + getState: () => currentState, + subscribe: jest.fn(() => () => {}), dispatch: jest.fn(), } @@ -501,10 +502,7 @@ describe('Node', () => { { store: customStore }, ) - customStore.getState = () => ({ - ...updatedState, - ...connectionState, - }) + currentState = { ...updatedState, ...connectionState } rerender( @@ -532,20 +530,21 @@ describe('Node', () => { onDeleteClicked: jest.fn(), } - const customStore = { - getState: () => ({ - app: { - context: { - dbConfig: { - shownColumns: columns, - }, + const customState = { + app: { + context: { + dbConfig: { + shownColumns: columns, }, }, - connections: { - instances: { connectedInstance: { id: mockInstanceId } }, - }, - }), - subscribe: jest.fn(), + }, + connections: { + instances: { connectedInstance: { id: mockInstanceId } }, + }, + } + const customStore = { + getState: () => customState, + subscribe: jest.fn(() => () => {}), dispatch: jest.fn(), } diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/change-editor-type-button/useChangeEditorType.spec.ts b/redisinsight/ui/src/pages/browser/modules/key-details/components/change-editor-type-button/useChangeEditorType.spec.ts index 7933eaad077..fac0661e97a 100644 --- a/redisinsight/ui/src/pages/browser/modules/key-details/components/change-editor-type-button/useChangeEditorType.spec.ts +++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/change-editor-type-button/useChangeEditorType.spec.ts @@ -15,8 +15,8 @@ jest.mock('uiSrc/slices/browser/rejson', () => ({ fetchReJSON: jest.fn((key) => ({ type: 'FETCH_REJSON', payload: key })), })) -const mockedUseDispatch = reactRedux.useDispatch as jest.Mock -const mockedUseSelector = reactRedux.useSelector as jest.Mock +const mockedUseDispatch = reactRedux.useDispatch as unknown as jest.Mock +const mockedUseSelector = reactRedux.useSelector as unknown as jest.Mock const mockKeyName = stringToBuffer('test-key') describe('useChangeEditorType', () => { diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/RejsonDetailsWrapper.spec.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/RejsonDetailsWrapper.spec.tsx index 7d4ad5f5896..e2399159e42 100644 --- a/redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/RejsonDetailsWrapper.spec.tsx +++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/RejsonDetailsWrapper.spec.tsx @@ -27,8 +27,8 @@ jest.mock('uiSrc/components/hooks/useDatabaseEnvironment', () => ({ const mockedProps = mock() -const mockUseSelector = useSelector as jest.Mock -const mockUseDispatch = useDispatch as jest.Mock +const mockUseSelector = useSelector as unknown as jest.Mock +const mockUseDispatch = useDispatch as unknown as jest.Mock type Selector = { name: string diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/components/add-item/AddItem.spec.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/components/add-item/AddItem.spec.tsx index da7eda1e6c2..ec19294024c 100644 --- a/redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/components/add-item/AddItem.spec.tsx +++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/components/add-item/AddItem.spec.tsx @@ -14,7 +14,7 @@ jest.mock('react-redux', () => ({ useSelector: jest.fn(), })) -const mockUseSelector = useSelector as jest.Mock +const mockUseSelector = useSelector as unknown as jest.Mock describe('AddItem', () => { beforeEach(() => { diff --git a/redisinsight/ui/src/pages/database-analysis/components/header/Header.spec.tsx b/redisinsight/ui/src/pages/database-analysis/components/header/Header.spec.tsx index 7d0c9f9d393..33ad0291ac8 100644 --- a/redisinsight/ui/src/pages/database-analysis/components/header/Header.spec.tsx +++ b/redisinsight/ui/src/pages/database-analysis/components/header/Header.spec.tsx @@ -51,7 +51,7 @@ jest.mock('react-redux', () => ({ })) const connectType = (state: any, connectionType: any) => { - ;(useSelector as jest.Mock).mockImplementation( + ;(useSelector as unknown as jest.Mock).mockImplementation( (callback: (arg0: RootState) => RootState) => callback({ ...state, diff --git a/redisinsight/ui/src/pages/home/components/database-manage-tags-modal/ManageTagsModal.spec.tsx b/redisinsight/ui/src/pages/home/components/database-manage-tags-modal/ManageTagsModal.spec.tsx index 5a54a765291..a9c02710ab7 100644 --- a/redisinsight/ui/src/pages/home/components/database-manage-tags-modal/ManageTagsModal.spec.tsx +++ b/redisinsight/ui/src/pages/home/components/database-manage-tags-modal/ManageTagsModal.spec.tsx @@ -15,7 +15,9 @@ jest.mock('uiSrc/slices/instances/instances', () => ({ updateInstanceAction: jest.fn().mockReturnValue({ type: 'UPDATE_INSTANCE' }), })) -const mockDispatch = useDispatch as jest.MockedFunction +const mockDispatch = useDispatch as unknown as jest.MockedFunction< + typeof useDispatch +> const mockInstance: Partial = { id: '1', name: 'Test Instance', diff --git a/redisinsight/ui/src/pages/home/components/database-manage-tags-modal/TagInputField.spec.tsx b/redisinsight/ui/src/pages/home/components/database-manage-tags-modal/TagInputField.spec.tsx index 323263543a2..cdda49c6ba0 100644 --- a/redisinsight/ui/src/pages/home/components/database-manage-tags-modal/TagInputField.spec.tsx +++ b/redisinsight/ui/src/pages/home/components/database-manage-tags-modal/TagInputField.spec.tsx @@ -8,7 +8,9 @@ jest.mock('react-redux', () => ({ connect: () => (Component: any) => Component, })) -const mockSelector = useSelector as jest.MockedFunction +const mockSelector = useSelector as unknown as jest.MockedFunction< + typeof useSelector +> describe('TagInputField', () => { const mockOnChange = jest.fn() diff --git a/redisinsight/ui/src/pages/home/components/database-manage-tags-modal/TagSuggestions.spec.tsx b/redisinsight/ui/src/pages/home/components/database-manage-tags-modal/TagSuggestions.spec.tsx index 778d9219691..f3d3b69f4af 100644 --- a/redisinsight/ui/src/pages/home/components/database-manage-tags-modal/TagSuggestions.spec.tsx +++ b/redisinsight/ui/src/pages/home/components/database-manage-tags-modal/TagSuggestions.spec.tsx @@ -12,7 +12,9 @@ jest.mock('react-redux', () => ({ connect: () => (Component: any) => Component, })) -const mockSelector = useSelector as jest.MockedFunction +const mockSelector = useSelector as unknown as jest.MockedFunction< + typeof useSelector +> const mockTags: Tag[] = [ { diff --git a/redisinsight/ui/src/pages/home/components/search-databases-list/SearchDatabasesList.spec.tsx b/redisinsight/ui/src/pages/home/components/search-databases-list/SearchDatabasesList.spec.tsx index 331cd9a62f6..a3051f22394 100644 --- a/redisinsight/ui/src/pages/home/components/search-databases-list/SearchDatabasesList.spec.tsx +++ b/redisinsight/ui/src/pages/home/components/search-databases-list/SearchDatabasesList.spec.tsx @@ -108,7 +108,7 @@ const mockInitialState = ( instances: Instance[], options?: { selectedTags?: Set }, ) => { - ;(useSelector as jest.Mock).mockImplementation( + ;(useSelector as unknown as jest.Mock).mockImplementation( (callback: (arg0: RootState) => RootState) => callback({ ...state, diff --git a/redisinsight/ui/src/pages/home/components/tags-cell/TagsCellHeader.spec.tsx b/redisinsight/ui/src/pages/home/components/tags-cell/TagsCellHeader.spec.tsx index cc3c49b31d9..6791c99f1b0 100644 --- a/redisinsight/ui/src/pages/home/components/tags-cell/TagsCellHeader.spec.tsx +++ b/redisinsight/ui/src/pages/home/components/tags-cell/TagsCellHeader.spec.tsx @@ -16,8 +16,12 @@ jest.mock('react-redux', () => ({ connect: () => (Component: any) => Component, })) -const mockDispatch = useDispatch as jest.MockedFunction -const mockSelector = useSelector as jest.MockedFunction +const mockDispatch = useDispatch as unknown as jest.MockedFunction< + typeof useDispatch +> +const mockSelector = useSelector as unknown as jest.MockedFunction< + typeof useSelector +> const mockTags: Tag[] = [ { diff --git a/redisinsight/ui/src/pages/home/components/tags-cell/useFilterTags.spec.ts b/redisinsight/ui/src/pages/home/components/tags-cell/useFilterTags.spec.ts index c0b2dbf3de9..1c3d705f9d0 100644 --- a/redisinsight/ui/src/pages/home/components/tags-cell/useFilterTags.spec.ts +++ b/redisinsight/ui/src/pages/home/components/tags-cell/useFilterTags.spec.ts @@ -27,8 +27,12 @@ const mockTags: Tag[] = [ }, ] -const mockDispatch = useDispatch as jest.MockedFunction -const mockSelector = useSelector as jest.MockedFunction +const mockDispatch = useDispatch as unknown as jest.MockedFunction< + typeof useDispatch +> +const mockSelector = useSelector as unknown as jest.MockedFunction< + typeof useSelector +> describe('useFilterTags', () => { beforeEach(() => { diff --git a/redisinsight/ui/src/pages/rdi/home/search/SearchRdiList.spec.tsx b/redisinsight/ui/src/pages/rdi/home/search/SearchRdiList.spec.tsx index 1b1cbfdf7ea..6eb037e1baa 100644 --- a/redisinsight/ui/src/pages/rdi/home/search/SearchRdiList.spec.tsx +++ b/redisinsight/ui/src/pages/rdi/home/search/SearchRdiList.spec.tsx @@ -57,7 +57,7 @@ describe('SearchRdiList', () => { storeMock.clearActions() const state: RootState = store.getState() - ;(useSelector as jest.Mock).mockImplementation( + ;(useSelector as unknown as jest.Mock).mockImplementation( (callback: (arg0: RootState) => RootState) => callback({ ...state, diff --git a/redisinsight/ui/src/pages/vector-search/components/rqe-not-available/RqeNotAvailable.spec.tsx b/redisinsight/ui/src/pages/vector-search/components/rqe-not-available/RqeNotAvailable.spec.tsx index 609c61a8ce8..10cf260973f 100644 --- a/redisinsight/ui/src/pages/vector-search/components/rqe-not-available/RqeNotAvailable.spec.tsx +++ b/redisinsight/ui/src/pages/vector-search/components/rqe-not-available/RqeNotAvailable.spec.tsx @@ -5,7 +5,9 @@ import { FeatureFlags } from 'uiSrc/constants' import cloudReducer from 'uiSrc/slices/instances/cloud' import instancesReducer from 'uiSrc/slices/instances/instances' import appOauthReducer from 'uiSrc/slices/oauth/cloud' -import appFeaturesReducer from 'uiSrc/slices/app/features' +import appFeaturesReducer, { + initialState as initialFeaturesState, +} from 'uiSrc/slices/app/features' import { RqeNotAvailable } from './RqeNotAvailable' const createTestStore = () => @@ -21,7 +23,9 @@ const createTestStore = () => preloadedState: { app: { features: { + ...initialFeaturesState, featureFlags: { + loading: false, features: { [FeatureFlags.cloudSso]: { flag: true }, [FeatureFlags.cloudAds]: { flag: true }, diff --git a/redisinsight/ui/src/pages/vector-search/components/search-page-fallback/SearchPageFallback.spec.tsx b/redisinsight/ui/src/pages/vector-search/components/search-page-fallback/SearchPageFallback.spec.tsx index 0f1b8ed9156..9153ca3944b 100644 --- a/redisinsight/ui/src/pages/vector-search/components/search-page-fallback/SearchPageFallback.spec.tsx +++ b/redisinsight/ui/src/pages/vector-search/components/search-page-fallback/SearchPageFallback.spec.tsx @@ -6,7 +6,9 @@ import { FeatureFlags } from 'uiSrc/constants' import cloudReducer from 'uiSrc/slices/instances/cloud' import instancesReducer from 'uiSrc/slices/instances/instances' import appOauthReducer from 'uiSrc/slices/oauth/cloud' -import appFeaturesReducer from 'uiSrc/slices/app/features' +import appFeaturesReducer, { + initialState as initialFeaturesState, +} from 'uiSrc/slices/app/features' import { OAuthSocialSource } from 'uiSrc/slices/interfaces' import { SearchPageFallback } from './SearchPageFallback' import { SearchPageFallbackContent } from './SearchPageFallback.types' @@ -24,7 +26,9 @@ const createTestStore = (featureFlagsEnabled = true) => preloadedState: { app: { features: { + ...initialFeaturesState, featureFlags: { + loading: false, features: { [FeatureFlags.cloudSso]: { flag: featureFlagsEnabled }, [FeatureFlags.cloudAds]: { flag: featureFlagsEnabled }, diff --git a/redisinsight/ui/src/pages/vector-search/components/upgrade-redis-banner/UpgradeRedisBanner.spec.tsx b/redisinsight/ui/src/pages/vector-search/components/upgrade-redis-banner/UpgradeRedisBanner.spec.tsx index 41934b2a1e2..2ca4a3cc1e6 100644 --- a/redisinsight/ui/src/pages/vector-search/components/upgrade-redis-banner/UpgradeRedisBanner.spec.tsx +++ b/redisinsight/ui/src/pages/vector-search/components/upgrade-redis-banner/UpgradeRedisBanner.spec.tsx @@ -5,7 +5,9 @@ import { OAuthSsoDialog } from 'uiSrc/components' import { FeatureFlags } from 'uiSrc/constants' import cloudReducer from 'uiSrc/slices/instances/cloud' import appOauthReducer from 'uiSrc/slices/oauth/cloud' -import appFeaturesReducer from 'uiSrc/slices/app/features' +import appFeaturesReducer, { + initialState as initialFeaturesState, +} from 'uiSrc/slices/app/features' import { UpgradeRedisBanner } from './UpgradeRedisBanner' @@ -19,7 +21,9 @@ const createTestStore = (featureFlagsEnabled = true) => preloadedState: { app: { features: { + ...initialFeaturesState, featureFlags: { + loading: false, features: { [FeatureFlags.cloudSso]: { flag: featureFlagsEnabled }, [FeatureFlags.cloudAds]: { flag: featureFlagsEnabled }, diff --git a/redisinsight/ui/src/pages/vector-search/components/version-not-supported/VersionNotSupported.spec.tsx b/redisinsight/ui/src/pages/vector-search/components/version-not-supported/VersionNotSupported.spec.tsx index 0ea5bc6c2b6..38bffd3529d 100644 --- a/redisinsight/ui/src/pages/vector-search/components/version-not-supported/VersionNotSupported.spec.tsx +++ b/redisinsight/ui/src/pages/vector-search/components/version-not-supported/VersionNotSupported.spec.tsx @@ -5,7 +5,9 @@ import { FeatureFlags } from 'uiSrc/constants' import cloudReducer from 'uiSrc/slices/instances/cloud' import instancesReducer from 'uiSrc/slices/instances/instances' import appOauthReducer from 'uiSrc/slices/oauth/cloud' -import appFeaturesReducer from 'uiSrc/slices/app/features' +import appFeaturesReducer, { + initialState as initialFeaturesState, +} from 'uiSrc/slices/app/features' import { VersionNotSupported } from './VersionNotSupported' const createTestStore = () => @@ -21,7 +23,9 @@ const createTestStore = () => preloadedState: { app: { features: { + ...initialFeaturesState, featureFlags: { + loading: false, features: { [FeatureFlags.cloudSso]: { flag: true }, [FeatureFlags.cloudAds]: { flag: true }, diff --git a/redisinsight/ui/src/pages/vector-search/hooks/useIsKeyIndexed/useIsKeyIndexed.spec.ts b/redisinsight/ui/src/pages/vector-search/hooks/useIsKeyIndexed/useIsKeyIndexed.spec.ts index 47fbbfb864a..be9ed565474 100644 --- a/redisinsight/ui/src/pages/vector-search/hooks/useIsKeyIndexed/useIsKeyIndexed.spec.ts +++ b/redisinsight/ui/src/pages/vector-search/hooks/useIsKeyIndexed/useIsKeyIndexed.spec.ts @@ -22,8 +22,8 @@ jest.mock('uiSrc/slices/browser/redisearch', () => ({ describe('useIsKeyIndexed', () => { const mockDispatch = jest.fn() - const mockUseSelector = useSelector as jest.Mock - const mockUseDispatch = useDispatch as jest.Mock + const mockUseSelector = useSelector as unknown as jest.Mock + const mockUseDispatch = useDispatch as unknown as jest.Mock beforeEach(() => { jest.clearAllMocks() diff --git a/redisinsight/ui/src/pages/vector-search/hooks/useListContent/useListContent.spec.ts b/redisinsight/ui/src/pages/vector-search/hooks/useListContent/useListContent.spec.ts index f58f5d7b34e..659b41f18e4 100644 --- a/redisinsight/ui/src/pages/vector-search/hooks/useListContent/useListContent.spec.ts +++ b/redisinsight/ui/src/pages/vector-search/hooks/useListContent/useListContent.spec.ts @@ -62,8 +62,8 @@ const mockInstanceId = faker.string.uuid() const mockDatabaseId = faker.string.uuid() describe('useListContent', () => { - const mockUseSelector = useSelector as jest.Mock - const mockUseDispatch = useDispatch as jest.Mock + const mockUseSelector = useSelector as unknown as jest.Mock + const mockUseDispatch = useDispatch as unknown as jest.Mock beforeEach(() => { jest.clearAllMocks() diff --git a/redisinsight/ui/src/pages/vector-search/hooks/useRedisearchListData/useRedisearchListData.spec.ts b/redisinsight/ui/src/pages/vector-search/hooks/useRedisearchListData/useRedisearchListData.spec.ts index a9ee9e2cb2c..615211c10a6 100644 --- a/redisinsight/ui/src/pages/vector-search/hooks/useRedisearchListData/useRedisearchListData.spec.ts +++ b/redisinsight/ui/src/pages/vector-search/hooks/useRedisearchListData/useRedisearchListData.spec.ts @@ -30,8 +30,8 @@ jest.mock('uiSrc/utils', () => ({ describe('useRedisearchListData', () => { const mockDispatch = jest.fn() - const mockUseSelector = useSelector as jest.Mock - const mockUseDispatch = useDispatch as jest.Mock + const mockUseSelector = useSelector as unknown as jest.Mock + const mockUseDispatch = useDispatch as unknown as jest.Mock const mockIsRedisearchAvailable = isRedisearchAvailable as jest.Mock beforeEach(() => { diff --git a/redisinsight/ui/src/pages/workbench/WorkbenchPage.spec.tsx b/redisinsight/ui/src/pages/workbench/WorkbenchPage.spec.tsx index 2ecadfce6ed..bf64656814b 100644 --- a/redisinsight/ui/src/pages/workbench/WorkbenchPage.spec.tsx +++ b/redisinsight/ui/src/pages/workbench/WorkbenchPage.spec.tsx @@ -50,7 +50,7 @@ describe('WorkbenchPage', () => { beforeEach(() => { const state: any = store.getState() - ;(useSelector as jest.Mock).mockImplementation( + ;(useSelector as unknown as jest.Mock).mockImplementation( (callback: (arg0: RootState) => RootState) => callback({ ...state, @@ -91,7 +91,7 @@ describe('Telemetry', () => { beforeEach(() => { const state: any = store.getState() - ;(useSelector as jest.Mock).mockImplementation( + ;(useSelector as unknown as jest.Mock).mockImplementation( (callback: (arg0: RootState) => RootState) => callback({ ...state, @@ -258,7 +258,7 @@ describe('Raw mode', () => { beforeEach(() => { const state: any = store.getState() - ;(useSelector as jest.Mock).mockImplementation( + ;(useSelector as unknown as jest.Mock).mockImplementation( (callback: (arg0: RootState) => RootState) => callback({ ...state, diff --git a/redisinsight/ui/src/slices/tests/app/connectivity.spec.ts b/redisinsight/ui/src/slices/tests/app/connectivity.spec.ts index de539d652e2..9b458a9701d 100644 --- a/redisinsight/ui/src/slices/tests/app/connectivity.spec.ts +++ b/redisinsight/ui/src/slices/tests/app/connectivity.spec.ts @@ -127,9 +127,9 @@ describe('app connectivity slice', () => { id: '123', // Match the test database ID } - jest.spyOn(store, 'dispatch').mockImplementation((action: any) => { - testStore.dispatch(action) - }) + jest + .spyOn(store, 'dispatch') + .mockImplementation((action: any) => testStore.dispatch(action)) const getDbOverviewMock = jest.fn(() => { return HttpResponse.json( { code: 'serviceUnavailable', message: 'Test error' }, @@ -172,9 +172,9 @@ describe('app connectivity slice', () => { id: 'different-instance-id', // Different from request URL } - jest.spyOn(store, 'dispatch').mockImplementation((action: any) => { - testStore.dispatch(action) - }) + jest + .spyOn(store, 'dispatch') + .mockImplementation((action: any) => testStore.dispatch(action)) const getDbOverviewMock = jest.fn(async () => { return HttpResponse.json( diff --git a/redisinsight/ui/src/slices/tests/browser/rejson.setJsonDataAction.spec.ts b/redisinsight/ui/src/slices/tests/browser/rejson.setJsonDataAction.spec.ts index 34014c64a17..5de7b0128da 100644 --- a/redisinsight/ui/src/slices/tests/browser/rejson.setJsonDataAction.spec.ts +++ b/redisinsight/ui/src/slices/tests/browser/rejson.setJsonDataAction.spec.ts @@ -1,4 +1,4 @@ -import thunk from 'redux-thunk' +import { thunk } from 'redux-thunk' import configureStore from 'redux-mock-store' import { EditorType } from 'uiSrc/slices/interfaces' diff --git a/redisinsight/ui/src/slices/tests/panels/aiAssistant.spec.ts b/redisinsight/ui/src/slices/tests/panels/aiAssistant.spec.ts index c1f170bd2e5..02eb347f42d 100644 --- a/redisinsight/ui/src/slices/tests/panels/aiAssistant.spec.ts +++ b/redisinsight/ui/src/slices/tests/panels/aiAssistant.spec.ts @@ -63,7 +63,7 @@ describe('ai assistant slice', () => { // Act const result = reducer(undefined, { - type: undefined, + type: '@@INIT', }) // Assert diff --git a/redisinsight/ui/src/telemetry/tests/usePageViewTelemetry.spec.ts b/redisinsight/ui/src/telemetry/tests/usePageViewTelemetry.spec.ts index bcb42d7581b..da0b5a73058 100644 --- a/redisinsight/ui/src/telemetry/tests/usePageViewTelemetry.spec.ts +++ b/redisinsight/ui/src/telemetry/tests/usePageViewTelemetry.spec.ts @@ -1,5 +1,5 @@ import { renderHook, act, cleanup } from '@testing-library/react-hooks' -import * as reactRedux from 'react-redux' +import { useSelector } from 'react-redux' import { faker } from '@faker-js/faker' import { cloneDeep } from 'lodash' @@ -19,9 +19,14 @@ jest.mock('uiSrc/telemetry', () => ({ sendPageViewTelemetry: jest.fn(), })) +jest.mock('react-redux', () => ({ + ...jest.requireActual('react-redux'), + useSelector: jest.fn(), +})) + describe('usePageViewTelemetry', () => { let store: typeof mockedStore - let mockUseSelector: jest.SpyInstance + const mockUseSelector = useSelector as unknown as jest.Mock const mockPage = faker.helpers.enumValue(TelemetryPageView) @@ -32,14 +37,9 @@ describe('usePageViewTelemetry', () => { store = cloneDeep(mockedStore) store.clearActions() - mockUseSelector = jest.spyOn(reactRedux, 'useSelector') mockUseSelector.mockReturnValue(INSTANCES_MOCK[0]) }) - afterEach(() => { - jest.restoreAllMocks() - }) - it('should send page view telemetry on mount if connected to instance', () => { renderHook(() => usePageViewTelemetry({ page: mockPage })) diff --git a/redisinsight/ui/src/types/redux-augment.d.ts b/redisinsight/ui/src/types/redux-augment.d.ts new file mode 100644 index 00000000000..d78b954fec8 --- /dev/null +++ b/redisinsight/ui/src/types/redux-augment.d.ts @@ -0,0 +1,7 @@ +import 'redux' + +declare module 'redux' { + interface Dispatch { + (action: (...args: any[]) => R): R + } +} diff --git a/redisinsight/ui/src/utils/test-utils.tsx b/redisinsight/ui/src/utils/test-utils.tsx index 1b0d89e7441..180dbebab1b 100644 --- a/redisinsight/ui/src/utils/test-utils.tsx +++ b/redisinsight/ui/src/utils/test-utils.tsx @@ -2,7 +2,7 @@ import React from 'react' import { cloneDeep, first, map } from 'lodash' import { Provider } from 'react-redux' -import thunk from 'redux-thunk' +import { thunk } from 'redux-thunk' import { BrowserRouter } from 'react-router-dom' import configureMockStore from 'redux-mock-store' import { @@ -16,6 +16,7 @@ import { import { ThemeProvider } from 'styled-components' import { theme } from '@redis-ui/styles' import userEvent from '@testing-library/user-event' +import type { EnhancedStore } from '@reduxjs/toolkit' import type { RootState, ReduxStore } from 'uiSrc/slices/store' import { initialState as initialStateInstances } from 'uiSrc/slices/instances/instances' import { initialState as initialStateTags } from 'uiSrc/slices/instances/tags' @@ -23,6 +24,7 @@ import { initialState as initialStateCaCerts } from 'uiSrc/slices/instances/caCe import { initialState as initialStateClientCerts } from 'uiSrc/slices/instances/clientCerts' import { initialState as initialStateCluster } from 'uiSrc/slices/instances/cluster' import { initialState as initialStateCloud } from 'uiSrc/slices/instances/cloud' +import { initialState as initialStateAzure } from 'uiSrc/slices/instances/azure' import { initialState as initialStateSentinel } from 'uiSrc/slices/instances/sentinel' import { initialState as initialStateKeys } from 'uiSrc/slices/browser/keys' import { initialState as initialStateString } from 'uiSrc/slices/browser/string' @@ -59,6 +61,7 @@ import { initialState as initialStateAnalyticsSettings } from 'uiSrc/slices/anal import { initialState as initialStateDbAnalysis } from 'uiSrc/slices/analytics/dbAnalysis' import { initialState as initialStatePubSub } from 'uiSrc/slices/pubsub/pubsub' import { initialState as initialStateRedisearch } from 'uiSrc/slices/browser/redisearch' +import { initialState as initialStateVectorSet } from 'uiSrc/slices/browser/vectorSet' import { initialState as initialStateRecommendations } from 'uiSrc/slices/recommendations/recommendations' import { initialState as initialStateOAuth } from 'uiSrc/slices/oauth/cloud' import { initialState as initialStateAzureAuth } from 'uiSrc/slices/oauth/azure' @@ -79,7 +82,7 @@ import { setStoreRef } from './test-store' interface Options { initialState?: RootState - store?: ReduxStore + store?: ReduxStore | EnhancedStore withRouter?: boolean [property: string]: any } @@ -107,6 +110,7 @@ const initialStateDefault: RootState = { cluster: cloneDeep(initialStateCluster), cloud: cloneDeep(initialStateCloud), sentinel: cloneDeep(initialStateSentinel), + azure: cloneDeep(initialStateAzure), tags: cloneDeep(initialStateTags), }, browser: { @@ -120,6 +124,7 @@ const initialStateDefault: RootState = { stream: cloneDeep(initialStateStream), bulkActions: cloneDeep(initialStateBulkActions), redisearch: cloneDeep(initialStateRedisearch), + vectorSet: cloneDeep(initialStateVectorSet), }, cli: { settings: cloneDeep(initialStateCliSettings), diff --git a/yarn.lock b/yarn.lock index 91c3a594bfd..ef32ed31e6f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2833,15 +2833,17 @@ "@tanstack/react-table" "^8.9.8" type-fest "^5.4.4" -"@reduxjs/toolkit@^1.6.2": - version "1.9.5" - resolved "https://registry.yarnpkg.com/@reduxjs/toolkit/-/toolkit-1.9.5.tgz#d3987849c24189ca483baa7aa59386c8e52077c4" - integrity sha512-Rt97jHmfTeaxL4swLRNPD/zV4OxTes4la07Xc4hetpUW/vc75t5m1ANyxG6ymnEQ2FsLQsoMlYB2vV1sO3m8tQ== - dependencies: - immer "^9.0.21" - redux "^4.2.1" - redux-thunk "^2.4.2" - reselect "^4.1.8" +"@reduxjs/toolkit@^2.12.0": + version "2.12.0" + resolved "https://registry.yarnpkg.com/@reduxjs/toolkit/-/toolkit-2.12.0.tgz#e62787503a38561e04bb8f39e29ca8db689590f9" + integrity sha512-KiT+RzZbp6mQET+Mg+h2c97+9j1sNflUxQkIHI7Yuzf6Peu+OYpmkn6nbHWmLLWj+1ZODUJFwGZ7gx3L9R9EOw== + dependencies: + "@standard-schema/spec" "^1.0.0" + "@standard-schema/utils" "^0.3.0" + immer "^11.0.0" + redux "^5.0.1" + redux-thunk "^3.1.0" + reselect "^5.1.0" "@rolldown/pluginutils@1.0.0-beta.27": version "1.0.0-beta.27" @@ -3026,6 +3028,16 @@ resolved "https://registry.yarnpkg.com/@stablelib/snappy/-/snappy-1.0.2.tgz#ebc9875639dcc3d9cf847a10599a8ed4246e870d" integrity sha512-bROi7u2tJsTA4PQMpoI3Za33upkUqryXqWpYMxqoEAN6iW0/2icycoREgzNuzgSVpq6rIT98mc6tewnlTBXRwQ== +"@standard-schema/spec@^1.0.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@standard-schema/spec/-/spec-1.1.0.tgz#a79b55dbaf8604812f52d140b2c9ab41bc150bb8" + integrity sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w== + +"@standard-schema/utils@^0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@standard-schema/utils/-/utils-0.3.0.tgz#3d5e608f16c2390c10528e98e59aef6bf73cae7b" + integrity sha512-e7Mew686owMaPJVNNLs55PUvgz371nKgwsc4vxE49zsODpJEnxgxRo2y/OKrqueavXgZNMDVj3DdHFlaSAeU8g== + "@storybook/addon-a11y@^9.1.19": version "9.1.19" resolved "https://registry.yarnpkg.com/@storybook/addon-a11y/-/addon-a11y-9.1.19.tgz#01190dcc689f7288f53aa3a87a52f6e2625eb282" @@ -4056,7 +4068,7 @@ dependencies: "@types/react" "*" -"@types/react-redux@^7.1.12", "@types/react-redux@^7.1.20": +"@types/react-redux@^7.1.20": version "7.1.25" resolved "https://registry.yarnpkg.com/@types/react-redux/-/react-redux-7.1.25.tgz#de841631205b24f9dfb4967dd4a7901e048f9a88" integrity sha512-bAGh4e+w5D8dajd6InASVIyCo4pZLJ66oLb80F9OBLO1gKESbZcRCJpTT6uLXX+HAB57zw1WTdwJdAsewuTweg== @@ -4243,6 +4255,11 @@ resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.6.tgz#250a7b16c3b91f672a24552ec64678eeb1d3a08d" integrity sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ== +"@types/use-sync-external-store@^0.0.6": + version "0.0.6" + resolved "https://registry.yarnpkg.com/@types/use-sync-external-store/-/use-sync-external-store-0.0.6.tgz#60be8d21baab8c305132eb9cb912ed497852aadc" + integrity sha512-zFDAD+tlpf2r4asuHEj0XH6pY6i0g5NeAHPn+15wk3BV6JA69eERFXC1gyGThDkVa1zCyKr5jox1+2LbV/AMLg== + "@types/verror@^1.10.3": version "1.10.6" resolved "https://registry.yarnpkg.com/@types/verror/-/verror-1.10.6.tgz#3e600c62d210c5826460858f84bcbb65805460bb" @@ -9228,10 +9245,10 @@ immediate@~3.0.5: resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" integrity sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ== -immer@^9.0.21: - version "9.0.21" - resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.21.tgz#1e025ea31a40f24fb064f1fef23e931496330176" - integrity sha512-bc4NBHqOqSfRW7POMkHd51LvClaeMXpm8dx0e8oE2GORbq5aRK7Bxl4FyzVLdGtLmvLKL7BTDBG5ACQm4HWjTA== +immer@^11.0.0: + version "11.1.8" + resolved "https://registry.yarnpkg.com/immer/-/immer-11.1.8.tgz#08a6426f7019dbce8d6dff8c4a43bb25c550a575" + integrity sha512-/tbkHMW7y10Lx6i1crLjD4/OhNkRG+Fo7byZHtah0547nIeXYcpIXaUh0IAQY6gO5459qpGGYapcEOHtFXkIuA== immutable@^4.0.0: version "4.3.8" @@ -12996,7 +13013,7 @@ react-property@2.0.0: resolved "https://registry.yarnpkg.com/react-property/-/react-property-2.0.0.tgz#2156ba9d85fa4741faf1918b38efc1eae3c6a136" integrity sha512-kzmNjIgU32mO4mmH5+iUyrqlpFQhF8K2k7eZ4fdLSOPFrD1XgEuSBv9LDEgxRXTMBqMd8ppT0x6TIzqE5pdGdw== -react-redux@^7.2.0, react-redux@^7.2.2: +react-redux@^7.2.0: version "7.2.9" resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.2.9.tgz#09488fbb9416a4efe3735b7235055442b042481d" integrity sha512-Gx4L3uM182jEEayZfRbI/G11ZpYdNAnBs70lFVMNdHJI76XYtR+7m0MN+eAs7UHBPhWXcnFPaS+9owSCJQHNpQ== @@ -13008,6 +13025,14 @@ react-redux@^7.2.0, react-redux@^7.2.2: prop-types "^15.7.2" react-is "^17.0.2" +react-redux@^9.2.0: + version "9.3.0" + resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-9.3.0.tgz#a30113bb6d95c0a715d54dda4308d450fca6ce09" + integrity sha512-KQopgqFo/p/fgmAs5qz6p5RWaNAzq40WAu7fJIXnQpYxFPbJYtsJPWvGeF2rOBaY/kEuV77AVsX8TsQzKm+A/g== + dependencies: + "@types/use-sync-external-store" "^0.0.6" + use-sync-external-store "^1.4.0" + react-refresh@^0.17.0: version "0.17.0" resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.17.0.tgz#b7e579c3657f23d04eccbe4ad2e58a8ed51e7e53" @@ -13269,17 +13294,15 @@ redux-mock-store@^1.5.4: dependencies: lodash.isplainobject "^4.0.6" -redux-thunk@^2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-2.4.2.tgz#b9d05d11994b99f7a91ea223e8b04cf0afa5ef3b" - integrity sha512-+P3TjtnP0k/FEjcBL5FZpoovtvrTNT/UXd4/sluaSyrURlSlhLSzEdfsTBW7WsKB6yPvgd7q/iZPICFjW4o57Q== +redux-thunk@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-3.1.0.tgz#94aa6e04977c30e14e892eae84978c1af6058ff3" + integrity sha512-NW2r5T6ksUKXCabzhL9z+h206HQw/NJkcLm1GPImRQ8IzfXwRGqjVhKJGauHirT0DAuyy6hjdnMZaRoAcy0Klw== -redux@^4.0.0, redux@^4.0.4, redux@^4.0.5, redux@^4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/redux/-/redux-4.2.1.tgz#c08f4306826c49b5e9dc901dee0452ea8fce6197" - integrity sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w== - dependencies: - "@babel/runtime" "^7.9.2" +redux@^4.0.0, redux@^4.0.4, redux@^4.0.5, redux@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/redux/-/redux-5.0.1.tgz#97fa26881ce5746500125585d5642c77b6e9447b" + integrity sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w== refa@^0.12.0, refa@^0.12.1: version "0.12.1" @@ -13526,10 +13549,10 @@ resedit@^1.7.0: dependencies: pe-library "^0.4.1" -reselect@^4.1.8: - version "4.1.8" - resolved "https://registry.yarnpkg.com/reselect/-/reselect-4.1.8.tgz#3f5dc671ea168dccdeb3e141236f69f02eaec524" - integrity sha512-ab9EmR80F/zQTMNeneUr4cv+jSwPJgIlvEmVwLerwrWVbpLlBuls9XHzIeTFy4cegU2NHBp3va0LKOzU5qFEYQ== +reselect@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/reselect/-/reselect-5.2.0.tgz#f380ef7664332d26ea06c1cba04bdbbdcaa955f1" + integrity sha512-AgZ3UOZm3YndfrJ4OYjgrT7bmCm/1iqkjvEfH/oYjzh6PD2qw4QuT3jjnXIrpdt4MTpMXclMT3lXbmRY+XRakw== resolve-alpn@^1.0.0: version "1.2.1" @@ -15588,6 +15611,11 @@ use-sidecar@^1.1.2, use-sidecar@^1.1.3: detect-node-es "^1.1.0" tslib "^2.0.0" +use-sync-external-store@^1.4.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.6.0.tgz#b174bfa65cb2b526732d9f2ac0a408027876f32d" + integrity sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w== + utf8-byte-length@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz#f45f150c4c66eee968186505ab93fcbb8ad6bf61"