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

Migrate to React 19 #4409

Draft
wants to merge 57 commits into
base: master
Choose a base branch
from

Commits on Sep 13, 2024

  1. Configuration menu
    Copy the full SHA
    ede814c View commit details
    Browse the repository at this point in the history
  2. 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.
    aryaemami59 committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    02e5023 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4475c22 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    662fd38 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    98c7d16 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    6070776 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    fbc8819 View commit details
    Browse the repository at this point in the history
  8. Bump jsdom to 24.0.0

    aryaemami59 committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    6a36c6a View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    d3f7fbf View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    b5c7bb1 View commit details
    Browse the repository at this point in the history
  11. 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.
    aryaemami59 committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    3dcee2f View commit details
    Browse the repository at this point in the history
  12. 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`.
    aryaemami59 committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    783ae4b View commit details
    Browse the repository at this point in the history
  13. Fix test names in fork.test.ts

    - Fixed test names in `fork.test.ts` which could cause the terminal to flicker in Windows.
    aryaemami59 committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    17d9f53 View commit details
    Browse the repository at this point in the history
  14. 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.
    aryaemami59 committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    5bef2cd View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    f32fbce View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    4238059 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    fcfd0a7 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    0b8692f View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    1a2415f View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    93ca270 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    55af373 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    529d0ca View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    5095dfc View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    bcc39cd View commit details
    Browse the repository at this point in the history
  25. Migrate docs to React 19

    aryaemami59 committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    5bac006 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    f51a37f View commit details
    Browse the repository at this point in the history
  27. Bump React to the new rc

    Update React and React-DOM
    aryaemami59 committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    9bc2220 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    f0eace5 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    4f5e6e6 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    567ff3b View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    8b753ee View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    7555deb View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    8314e26 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    a8b9ade View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    72fb1ac View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    d4247be View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    8a1028c View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    530d3f5 View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    c630a97 View commit details
    Browse the repository at this point in the history
  40. Bump immer in lockfile

    aryaemami59 committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    0ff87ab View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    8273a1b View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    7be6ce1 View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    153ecdd View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    f70d15b View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    3e0add3 View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    cea84ed View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    6086099 View commit details
    Browse the repository at this point in the history
  48. 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`.
    aryaemami59 committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    37c9c0e View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    4283dd4 View commit details
    Browse the repository at this point in the history
  50. Configuration menu
    Copy the full SHA
    ed90d0d View commit details
    Browse the repository at this point in the history
  51. Configuration menu
    Copy the full SHA
    9759ad1 View commit details
    Browse the repository at this point in the history
  52. Remove jest-snapshot from resolutions field

    - This was done because it was causing the unit tests in example workspaces to fail.
    aryaemami59 committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    42315cb View commit details
    Browse the repository at this point in the history
  53. Configuration menu
    Copy the full SHA
    ed1f53e View commit details
    Browse the repository at this point in the history
  54. Update lockfile

    aryaemami59 committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    9d16152 View commit details
    Browse the repository at this point in the history
  55. Configuration menu
    Copy the full SHA
    b5de1c5 View commit details
    Browse the repository at this point in the history
  56. Update lockfile

    aryaemami59 committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    b6bb978 View commit details
    Browse the repository at this point in the history
  57. Configuration menu
    Copy the full SHA
    8fb2a7c View commit details
    Browse the repository at this point in the history