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 22, 2024

  1. Configuration menu
    Copy the full SHA
    e4de96b 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 22, 2024
    Configuration menu
    Copy the full SHA
    6ace22c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0a93873 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    47f95fd View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ef3aa47 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    fbde6cb View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    05c1696 View commit details
    Browse the repository at this point in the history
  8. Bump jsdom to 24.0.0

    aryaemami59 committed Sep 22, 2024
    Configuration menu
    Copy the full SHA
    e8acd1f View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    7c82cba View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    ba8a1e4 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 22, 2024
    Configuration menu
    Copy the full SHA
    9a56382 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 22, 2024
    Configuration menu
    Copy the full SHA
    7527bc8 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 22, 2024
    Configuration menu
    Copy the full SHA
    83ff0f1 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 22, 2024
    Configuration menu
    Copy the full SHA
    b5fbcd8 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    ced2a4d View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    de0ecb9 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    c8489bb View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    edf74cc View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    59a61b5 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    c5e5a26 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    be40596 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    caaab51 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    3376ab4 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    28d08d2 View commit details
    Browse the repository at this point in the history
  25. Migrate docs to React 19

    aryaemami59 committed Sep 22, 2024
    Configuration menu
    Copy the full SHA
    f3f2c14 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    01cb3cd 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 22, 2024
    Configuration menu
    Copy the full SHA
    803f2a2 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    50be30d View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    a6543f6 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    086e59d View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    5ad0da9 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    4c84ebd View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    b9bd487 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    c3bd5a7 View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    15c68e5 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    8899359 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    bd502fb View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    a53abba View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    5f9946f View commit details
    Browse the repository at this point in the history
  40. Bump immer in lockfile

    aryaemami59 committed Sep 22, 2024
    Configuration menu
    Copy the full SHA
    7f8a6b7 View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    d0a2a99 View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    ad40fbc View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    20de5a3 View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    662ea44 View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    201990f View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    5a36a02 View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    6054697 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 22, 2024
    Configuration menu
    Copy the full SHA
    0b27310 View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    c627876 View commit details
    Browse the repository at this point in the history
  50. Configuration menu
    Copy the full SHA
    9887f34 View commit details
    Browse the repository at this point in the history
  51. Configuration menu
    Copy the full SHA
    f91d181 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 22, 2024
    Configuration menu
    Copy the full SHA
    10190d4 View commit details
    Browse the repository at this point in the history
  53. Configuration menu
    Copy the full SHA
    b869bac View commit details
    Browse the repository at this point in the history
  54. Update lockfile

    aryaemami59 committed Sep 22, 2024
    Configuration menu
    Copy the full SHA
    e340937 View commit details
    Browse the repository at this point in the history
  55. Configuration menu
    Copy the full SHA
    d64caae View commit details
    Browse the repository at this point in the history
  56. Update lockfile

    aryaemami59 committed Sep 22, 2024
    Configuration menu
    Copy the full SHA
    23c32ed View commit details
    Browse the repository at this point in the history
  57. Configuration menu
    Copy the full SHA
    60e7bff View commit details
    Browse the repository at this point in the history