sillsdev / TheCombine

This is a tool for supporting the rapid word collection workshop and post workshop clean-up
https://sillsdev.github.io/TheCombine/
MIT License
17 stars 13 forks source link

Update of redux and redux-thunk is a breaking change #3155

Open jmgrady opened 1 month ago

jmgrady commented 1 month ago

Dependabot recommends updating redux to 5.0.1 and redux-thunk to 3.1.0.

Issues

ERROR in src/components/Login/Login.tsx:65:14
TS2769: No overload matches this call.
  The last overload gave the following error.
    Argument of type 'Reset' is not assignable to parameter of type 'UnknownAction'.
      Index signature for type 'string' is missing in type 'Reset'.
    63 |
    64 |   useEffect(() => {
  > 65 |     dispatch(reset());
       |              ^^^^^^^
    66 |     getBannerText(BannerType.Login).then(setBanner);
    67 |   }, [dispatch]);
    68 |
ERROR in src/components/Project/tests/ProjectActions.test.tsx:1:15
TS2305: Module '"redux"' has no exported member 'PreloadedState'.
  > 1 | import { type PreloadedState } from "redux";
      |               ^^^^^^^^^^^^^^
    2 |
    3 | import { type Project, type Speaker } from "api/models";
    4 | import { defaultState } from "components/App/DefaultState";
ERROR in src/goals/CharacterInventory/Redux/tests/CharacterInventoryActions.test.tsx:51:30
TS2322: Type 'null' is not assignable to type 'string'.
    49 |
    50 | const bumpId = (id: string): string => `${id}++`;
  > 51 | const mockAction: Action = { type: null };
       |                              ^^^^
    52 | const setMockFunctions = (): void => {
    53 |   mockAddCharInvChangesToGoal.mockReturnValue(mockAction);
    54 |   mockAsyncUpdateCurrentProject.mockReturnValue(mockAction);
ERROR in src/rootReducer.ts:16:15
TS2322: Type 'Reducer<LoginState, UnknownAction, LoginState>' is not assignable to type 'LoginState'.
    14 | export const rootReducer: Reducer<StoreState> = combineReducers<StoreState>({
    15 |   //login and signup
  > 16 |   loginState: loginReducer,
       |               ^^^^^^^^^^^^
    17 |
    18 |   //project
    19 |   currentProjectState: projectReducer,