diff --git a/package.json b/package.json index 1998a914..75756539 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "react-scripts": "5.0.0", "redux": "4.2.0", "redux-logger": "3.0.6", - "redux-thunk": "2.4.1", + "redux-thunk": "3.1.0", "single-spa": "5.9.1", "typeface-roboto": "1.1.13", "typescript": "5.3.3" diff --git a/src/App.tsx b/src/App.tsx index 23458027..d8e6cdbc 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -5,7 +5,7 @@ import * as React from 'react'; import { Provider } from 'react-redux'; import { AnyAction, applyMiddleware, compose, createStore } from 'redux'; import { createLogger } from 'redux-logger'; -import thunk, { ThunkDispatch } from 'redux-thunk'; +import { thunk, ThunkDispatch } from 'redux-thunk'; import { configureSite, loadMaintenanceState, diff --git a/src/accessibilityPage/accessibilityPage.component.test.tsx b/src/accessibilityPage/accessibilityPage.component.test.tsx index 451f7cd4..c47ac450 100644 --- a/src/accessibilityPage/accessibilityPage.component.test.tsx +++ b/src/accessibilityPage/accessibilityPage.component.test.tsx @@ -6,7 +6,7 @@ import { StateType } from '../state/state.types'; import { authState, initialState } from '../state/reducers/scigateway.reducer'; import { createLocation } from 'history'; import configureStore from 'redux-mock-store'; -import thunk from 'redux-thunk'; +import { thunk } from 'redux-thunk'; import { Provider } from 'react-redux'; import { render } from '@testing-library/react'; diff --git a/src/adminPage/adminPage.component.test.tsx b/src/adminPage/adminPage.component.test.tsx index 36a5d350..e2aaba7d 100644 --- a/src/adminPage/adminPage.component.test.tsx +++ b/src/adminPage/adminPage.component.test.tsx @@ -8,7 +8,7 @@ import AdminPage from './adminPage.component'; import { Provider } from 'react-redux'; import { buildTheme } from '../theming'; import TestAuthProvider from '../authentication/testAuthProvider'; -import thunk from 'redux-thunk'; +import { thunk } from 'redux-thunk'; import { Router } from 'react-router'; import { StyledEngineProvider, ThemeProvider } from '@mui/material'; import { render, screen } from '@testing-library/react'; diff --git a/src/adminPage/maintenancePage.component.test.tsx b/src/adminPage/maintenancePage.component.test.tsx index 36aafa44..dca164e1 100644 --- a/src/adminPage/maintenancePage.component.test.tsx +++ b/src/adminPage/maintenancePage.component.test.tsx @@ -7,7 +7,7 @@ import configureStore, { MockStore } from 'redux-mock-store'; import { Provider } from 'react-redux'; import { buildTheme } from '../theming'; import TestAuthProvider from '../authentication/testAuthProvider'; -import thunk from 'redux-thunk'; +import { thunk } from 'redux-thunk'; import { loadMaintenanceState, loadScheduledMaintenanceState, diff --git a/src/loginPage/loginPage.component.test.tsx b/src/loginPage/loginPage.component.test.tsx index 088b8d8d..7270c166 100644 --- a/src/loginPage/loginPage.component.test.tsx +++ b/src/loginPage/loginPage.component.test.tsx @@ -20,7 +20,7 @@ import { resetAuthState, } from '../state/actions/scigateway.actions'; import { Provider } from 'react-redux'; -import thunk from 'redux-thunk'; +import { thunk } from 'redux-thunk'; import { AnyAction } from 'redux'; import { NotificationType } from '../state/scigateway.types'; import * as log from 'loglevel'; diff --git a/src/logoutPage/logoutPage.component.test.tsx b/src/logoutPage/logoutPage.component.test.tsx index a21b30b9..4f5681e8 100644 --- a/src/logoutPage/logoutPage.component.test.tsx +++ b/src/logoutPage/logoutPage.component.test.tsx @@ -8,7 +8,7 @@ import configureStore from 'redux-mock-store'; import { authState, initialState } from '../state/reducers/scigateway.reducer'; import { Provider } from 'react-redux'; import { push } from 'connected-react-router'; -import thunk from 'redux-thunk'; +import { thunk } from 'redux-thunk'; import TestAuthProvider from '../authentication/testAuthProvider'; import { buildTheme } from '../theming'; import { ThemeProvider } from '@mui/material/styles'; diff --git a/src/mainAppBar/userProfile.component.test.tsx b/src/mainAppBar/userProfile.component.test.tsx index 60f4afce..9a68ecf6 100644 --- a/src/mainAppBar/userProfile.component.test.tsx +++ b/src/mainAppBar/userProfile.component.test.tsx @@ -6,7 +6,7 @@ import { authState, initialState } from '../state/reducers/scigateway.reducer'; import { Provider } from 'react-redux'; import { push } from 'connected-react-router'; import { StyledEngineProvider, ThemeProvider } from '@mui/material'; -import thunk from 'redux-thunk'; +import { thunk } from 'redux-thunk'; import TestAuthProvider from '../authentication/testAuthProvider'; import { buildTheme } from '../theming'; import { render, screen, within } from '@testing-library/react'; diff --git a/src/pageContainer.test.tsx b/src/pageContainer.test.tsx index 3cd8829f..fec64ff2 100644 --- a/src/pageContainer.test.tsx +++ b/src/pageContainer.test.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import thunk from 'redux-thunk'; +import { thunk } from 'redux-thunk'; import configureStore from 'redux-mock-store'; import { createLocation } from 'history'; diff --git a/src/pageNotFound/pageNotFound.component.test.tsx b/src/pageNotFound/pageNotFound.component.test.tsx index 25300054..a585712f 100644 --- a/src/pageNotFound/pageNotFound.component.test.tsx +++ b/src/pageNotFound/pageNotFound.component.test.tsx @@ -1,6 +1,6 @@ import React from 'react'; import PageNotFoundComponent from './pageNotFound.component'; -import thunk from 'redux-thunk'; +import { thunk } from 'redux-thunk'; import { authState, initialState } from '../state/reducers/scigateway.reducer'; import { createMemoryHistory, History } from 'history'; import configureStore from 'redux-mock-store'; diff --git a/src/preloader/preloader.component.test.tsx b/src/preloader/preloader.component.test.tsx index b4ec1ec2..914585e4 100644 --- a/src/preloader/preloader.component.test.tsx +++ b/src/preloader/preloader.component.test.tsx @@ -5,7 +5,7 @@ import { StateType } from '../state/state.types'; import { authState, initialState } from '../state/reducers/scigateway.reducer'; import { createLocation } from 'history'; import { Provider } from 'react-redux'; -import thunk from 'redux-thunk'; +import { thunk } from 'redux-thunk'; import { StyledEngineProvider, ThemeProvider } from '@mui/material'; import { render } from '@testing-library/react'; import { createTheme } from '@mui/material/styles'; diff --git a/src/routing/authorisedRoute.component.test.tsx b/src/routing/authorisedRoute.component.test.tsx index caa17554..05cc3273 100644 --- a/src/routing/authorisedRoute.component.test.tsx +++ b/src/routing/authorisedRoute.component.test.tsx @@ -26,7 +26,7 @@ import { } from 'redux'; import { Router } from 'react-router-dom'; import { SignOutType } from '../state/scigateway.types'; -import thunk from 'redux-thunk'; +import { thunk } from 'redux-thunk'; import { StyledEngineProvider, ThemeProvider } from '@mui/material'; import { buildTheme } from '../theming'; import { connectRouter } from 'connected-react-router'; diff --git a/src/state/middleware/scigateway.middleware.test.tsx b/src/state/middleware/scigateway.middleware.test.tsx index 369a3267..4de963e5 100644 --- a/src/state/middleware/scigateway.middleware.test.tsx +++ b/src/state/middleware/scigateway.middleware.test.tsx @@ -27,7 +27,7 @@ import TestAuthProvider from '../../authentication/testAuthProvider'; import { flushPromises } from '../../setupTests'; import { authState, initialState } from '../reducers/scigateway.reducer'; import { buildTheme } from '../../theming'; -import thunk from 'redux-thunk'; +import { thunk } from 'redux-thunk'; import { autoLoginAuthorised } from '../actions/scigateway.actions'; import * as singleSpa from 'single-spa'; diff --git a/yarn.lock b/yarn.lock index 5acd07f3..561fe2d3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13265,12 +13265,12 @@ __metadata: languageName: node linkType: hard -"redux-thunk@npm:2.4.1": - version: 2.4.1 - resolution: "redux-thunk@npm:2.4.1" +"redux-thunk@npm:3.1.0": + version: 3.1.0 + resolution: "redux-thunk@npm:3.1.0" peerDependencies: - redux: ^4 - checksum: 10/b81cdb5fa83dbfb49abc220242dfb9bc76143924d2bf4b62c0730d5dc7eed716b5800e4284e8fed8bd9fc9ea0d7757e5fe8e4a1380e63656782b9f474da25efa + redux: ^5.0.0 + checksum: 10/38c563db5f0bbec90d2e65cc27f3c870c1b6102e0c071258734fac41cb0e51d31d894125815c2f4133b20aff231f51f028ad99bccc05a7e3249f1a5d5a959ed3 languageName: node linkType: hard @@ -13857,7 +13857,7 @@ __metadata: redux: "npm:4.2.0" redux-logger: "npm:3.0.6" redux-mock-store: "npm:1.5.4" - redux-thunk: "npm:2.4.1" + redux-thunk: "npm:3.1.0" serve: "npm:14.2.0" single-spa: "npm:5.9.1" start-server-and-test: "npm:2.0.0"