Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: reduxjs/redux-toolkit
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.4.0
Choose a base ref
...
head repository: reduxjs/redux-toolkit
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.5.0
Choose a head ref
  • 11 commits
  • 65 files changed
  • 3 contributors

Commits on Nov 28, 2024

  1. Configuration menu
    Copy the full SHA
    a531f50 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    97f96ad View commit details
    Browse the repository at this point in the history
  3. Remove stray console log

    markerikson committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    5255770 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f861244 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0536468 View commit details
    Browse the repository at this point in the history
  6. Tweak delay time

    markerikson committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    ef84607 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    23a1c3f View commit details
    Browse the repository at this point in the history
  8. Merge pull request #4686 from isqua/act

    Update @testing-library/react from 13.3.0 to 16.0.1; Fixes #4685
    markerikson authored Nov 28, 2024
    Configuration menu
    Copy the full SHA
    e848a55 View commit details
    Browse the repository at this point in the history

Commits on Dec 11, 2024

  1. Migrate to React 19 (#4409)

    * Update `react-redux` to 9.1.2
    
    * Run tests against different versions of React during CI
    
    * Remove unnecessary `tick` and `runAllTimers` from `cleanup.test.tsx`
    
    * Remove redundant `act` wrappers around `fireEvent` method calls
    
    - According to latest documentation of `@testing-library/react`, `fireEvent` methods are already wrapped inside `act` calls making manual wrapping unnecessary.
    
    * Workaround issue `userEvent` not working with fake timers
    
    - There currently seems to be an issue involving `sinon` fake timers used by `vitest`, `@testing-library/react` only supporting `jest` fake timers and  `@testing-library/user-event` using `setTimeout` internally to simulate user actions such as button presses. Currently `@testing-library/react` only works with `jest` fake timers, which means if there are any component updates while `sinon` fake timers are running in `vitest` , `@testing-library/react` will not catch it and things start to break.
    - To workaround this issue, We have to setup the `user` by calling `userEvent.setup({ delay: null })`. The reason why We do this is because `@testing-library/user-event` uses `setTimeout` internally which cannot be awaited in a test while fake timers are running as it can cause the tests to indefinitely hang. So the current workaround is to disable the `delay` functionality of `userEvent` and prevent it from calling `setTimeout`. We also have to pass in `shouldAdvanceTime: true` to `vi.useFakeTimers()` as it can get around the issue of `@testing-library/react` not tracking `sinon` fake timers in `vitest`.
    
    * Fix test names in `fork.test.ts`
    
    - Fixed test names in `fork.test.ts` which could cause the terminal to flicker in Windows.
    
    * Fix issue with `console` spy inside `buildHooks.test.tsx`
    
    - `.mockReset()` should not be called in spies since it calls `.mockClear()` and returns the implementation to its **initial** form. In this case it was silencing some of the `act` related warnings emitted by `@testing-library/react` which needed to be resolved since they were calling issues. So `.mockReset()` calls on spies need to be changed to `.mockRestore()` calls since `.mockRestore()` restores the implementation to its **original** form.
    
    * Fix `act` related issues in `buildHooks.test.tsx`
    
    * Fix issues related to spies and stubbing environments in `utils.spec.ts`
    
    * Fix `console` spy related issues in `effectScenarios.test.ts`
    
    * Fix `console` spy related issues in `listenerMiddleware.test.ts`
    
    * Fix `console` spy related issues in `createApi.test.ts`
    
    * Fix wrong `test.each` and `describe.each` calls
    
    * Fix `console` spy related issues in `devWarnings.test.tsx`
    
    * Fix `console` spy related issues in `injectEndpoints.test.tsx`
    
    * Fix issue with test names in `queryFn.test.tsx`
    
    * Migrate docs to React 19
    
    * Update `peerDependencies` of toolkit to include React v19
    
    * Update React and React-DOM to the new rc version
    
    * Fix issues related to `console` spies in `createAsyncThunk.test.ts`
    
    * Fix issues related to stubbing envs in `createAsyncThunk.test.ts`
    
    * Fix issues related to `console` spies in `createReducer.test.ts`
    
    * Fix issues related to stubbing envs in `createReducer.test.ts`
    
    * Fix issues related to `console` spies in `createSlice.test.ts`
    
    * Fix issues related to stubbing envs in `createSlice.test.ts`
    
    * Fix issues related to `console` spies in `immutableStateInvariantMiddleware.test.ts`
    
    * Fix issues related to `console` spies in `serializableStateInvariantMiddleware.test.ts`
    
    * Change `.toHaveBeenCalledTimes(1)` to `.toHaveBeenCalledOnce()`
    
    * Change `.toHaveBeenCalledTimes(0)` to `.not.toHaveBeenCalled()`
    
    * Set `@types/react` and `@types/react-dom` to temporary types packages
    
    - We set the `@types/react` and `@types/react-dom` package resolutions to `npm:types-react` and `npm:types-react-dom` according to the React 19 migration guide.
    
    * Add `areErrorsEqual` equality tester
    
    - This was done to make sure `toHaveBeenCalledWith` will fail if we pass in the wrong Error constructor. For example the assertion will now fail if we pass in an `Error` instead of a `TypeError`.
    
    * Fix `console` spy related issues in `fakeBaseQuery.test.tsx`
    
    * Fix `console` spy related issues in `queryFn.test.tsx`
    
    * Remove `satisfies` operators in `queryFn.test.tsx`
    
    * Remove `jest-snapshot` from `resolutions` field
    
    - This was done because it was causing the unit tests in example workspaces to fail.
    
    * Remove `console-testing-library` as it is no longer needed
    
    * Fix minor JSX related type issues
    
    * Bump `jsdom` to version 25.0.1
    
    * Bump `@testing-library/react` to version 16.1.0
    
    * Properly `await` assertion in `tests/fork.test.ts`
    
    * Properly `await` assertion in `src/query/tests/errorHandling.test.tsx`
    
    * Migrate to React 19
    
    * Bump TS version in website
    
    ---------
    
    Co-authored-by: Mark Erikson <mark@isquaredsoftware.com>
    aryaemami59 and markerikson authored Dec 11, 2024
    Configuration menu
    Copy the full SHA
    40b8aed View commit details
    Browse the repository at this point in the history
  2. Handle additional serializeQueryArgs + skipToken case (#4762)

    * Handle skipToken in queryStatePreSelector
    
    * Add invalidationBehavior docblock to API ref
    markerikson authored Dec 11, 2024
    Configuration menu
    Copy the full SHA
    2047f54 View commit details
    Browse the repository at this point in the history
  3. Release 2.5.0

    markerikson committed Dec 11, 2024
    Configuration menu
    Copy the full SHA
    6590cec View commit details
    Browse the repository at this point in the history
Loading