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

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

Open
jmgrady opened this issue Jun 5, 2024 · 0 comments
Open

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

jmgrady opened this issue Jun 5, 2024 · 0 comments
Labels
javascript Pull requests that update Javascript code maintenance Issue that makes it difficult to maintain the software or to upgrade installations post-release.

Comments

@jmgrady
Copy link
Collaborator

jmgrady commented Jun 5, 2024

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

Issues

  • Missing Dependencies

    • @reduxdevtools/extension 3.3.0
    • @reduxjs/toolkit 2.2.5
  • Build errors

ERROR in src/components/App/App.test.tsx:19:45
TS2322: Type 'typeof import("/home/grady/projects/sil/combine-depends/node_modules/redux-thunk/dist/redux-thunk")' is not assignable to type 'Middleware<{}, any, Dispatch<AnyAction>>'.
  Type 'typeof import("/home/grady/projects/sil/combine-depends/node_modules/redux-thunk/dist/redux-thunk")' provides no match for the signature '(api: MiddlewareAPI<Dispatch<AnyAction>, any>): (next: Dispatch<AnyAction>) => (action: any) => any'.
    17 | jest.mock("components/AnnouncementBanner/AnnouncementBanner", () => "div");
    18 |
  > 19 | const createMockStore = configureMockStore([thunk]);
       |                                             ^^^^^
    20 | const mockStore = createMockStore(defaultState);
    21 |
    22 | // Need window.innerHeight defined for LandingPage.
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,
@jmgrady jmgrady added maintenance Issue that makes it difficult to maintain the software or to upgrade installations post-release. javascript Pull requests that update Javascript code labels Jun 5, 2024
@jmgrady jmgrady added this to To do in Combine Kanban via automation Jun 5, 2024
@jmgrady jmgrady moved this from To do to Discuss in planning meeting in Combine Kanban Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript Pull requests that update Javascript code maintenance Issue that makes it difficult to maintain the software or to upgrade installations post-release.
Projects
No open projects
Combine Kanban
Discuss in planning meeting
Development

No branches or pull requests

1 participant