Skip to content

Commit

Permalink
build(deps): Bump react-dom and @types/react-dom (#1826)
Browse files Browse the repository at this point in the history
* build(deps): Bump react-dom and @types/react-dom

Bumps [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom) and [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom). These dependencies needed to be updated together.

Updates `react-dom` from 18.2.0 to 18.3.1
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v18.3.1/packages/react-dom)

Updates `@types/react-dom` from 18.2.24 to 18.3.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom)

---
updated-dependencies:
- dependency-name: react-dom
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: "@types/react-dom"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* fix: update act import to remove depreaction warning

* style: reformat code after import change

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Paul Schreiber <[email protected]>
  • Loading branch information
dependabot[bot] and paulschreiber authored Apr 29, 2024
1 parent 4a5591c commit 2628933
Show file tree
Hide file tree
Showing 23 changed files with 36 additions and 55 deletions.
26 changes: 13 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"react": "^18.2.0",
"react-avatar-editor": "^13.0.2",
"react-beautiful-dnd": "^13.1.1",
"react-dom": "^18.2.0",
"react-dom": "^18.3.1",
"react-dropzone": "^14.2.3",
"react-error-boundary": "^4.0.13",
"react-helmet-async": "^2.0.4",
Expand Down Expand Up @@ -98,7 +98,7 @@
"@types/jest": "^29.5.12",
"@types/js-cookie": "^3.0.6",
"@types/react": "^18.2.78",
"@types/react-dom": "^18.2.24",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/parser": "^7.6.0",
"depcheck": "^1.4.7",
"eslint-config-prettier": "^9.1.0",
Expand Down
3 changes: 1 addition & 2 deletions src/account/components/AccountProfile.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { fireEvent, render, screen, within } from 'tests/utils';
import React from 'react';
import React, { act } from 'react';
import { when } from 'jest-when';
import _ from 'lodash/fp';
import { act } from 'react-dom/test-utils';
import { useNavigate, useParams, useSearchParams } from 'react-router-dom';
import * as terrasoApi from 'terraso-client-shared/terrasoApi/api';

Expand Down
3 changes: 1 addition & 2 deletions src/contact/ContactForm.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { render, screen } from 'tests/utils';
import React from 'react';
import React, { act } from 'react';
import _ from 'lodash/fp';
import { act } from 'react-dom/test-utils';

import { useScript } from 'custom-hooks';

Expand Down
3 changes: 1 addition & 2 deletions src/group/components/GroupForm.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { fireEvent, render, screen, within } from 'tests/utils';
import React from 'react';
import { act } from 'react-dom/test-utils';
import React, { act } from 'react';
import { useNavigate, useParams } from 'react-router-dom';
import * as terrasoApi from 'terraso-client-shared/terrasoApi/api';

Expand Down
3 changes: 1 addition & 2 deletions src/group/components/GroupList.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { fireEvent, render, screen, within } from 'tests/utils';
import React from 'react';
import { act } from 'react-dom/test-utils';
import React, { act } from 'react';
import { useSearchParams } from 'react-router-dom';
import * as terrasoApi from 'terraso-client-shared/terrasoApi/api';
import useMediaQuery from '@mui/material/useMediaQuery';
Expand Down
3 changes: 1 addition & 2 deletions src/group/membership/components/GroupMembers.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { fireEvent, render, screen, waitFor, within } from 'tests/utils';
import React from 'react';
import React, { act } from 'react';
import _ from 'lodash/fp';
import { act } from 'react-dom/test-utils';
import { useNavigate, useParams } from 'react-router-dom';
import * as terrasoApi from 'terraso-client-shared/terrasoApi/api';
import { GROUP_TYPES_WITH_REDIRECTS } from 'tests/constants';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { fireEvent, render, screen, within } from 'tests/utils';
import React from 'react';
import { act } from 'react-dom/test-utils';
import React, { act } from 'react';
import { useParams } from 'react-router-dom';
import * as terrasoApi from 'terraso-client-shared/terrasoApi/api';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { fireEvent, render, screen, waitFor, within } from 'tests/utils';
import React from 'react';
import { act } from 'react-dom/test-utils';
import React, { act } from 'react';
import { useParams } from 'react-router-dom';
import * as terrasoApi from 'terraso-client-shared/terrasoApi/api';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { fireEvent, render, screen, waitFor, within } from 'tests/utils';
import React from 'react';
import React, { act } from 'react';
import MapboxDraw from '@mapbox/mapbox-gl-draw';
import { act } from 'react-dom/test-utils';
import { useParams } from 'react-router-dom';
import * as terrasoApi from 'terraso-client-shared/terrasoApi/api';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { fireEvent, render, screen, waitFor, within } from 'tests/utils';
import React from 'react';
import React, { act } from 'react';
import MapboxDraw from '@mapbox/mapbox-gl-draw';
import { act } from 'react-dom/test-utils';
import { useParams } from 'react-router-dom';
import * as terrasoApi from 'terraso-client-shared/terrasoApi/api';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { fireEvent, render, screen } from 'tests/utils';
import React from 'react';
import { act } from 'react-dom/test-utils';
import React, { act } from 'react';
import { useParams } from 'react-router-dom';
import * as terrasoApi from 'terraso-client-shared/terrasoApi/api';

Expand Down
3 changes: 1 addition & 2 deletions src/landscape/components/LandscapeForm/KeyInfoNew.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { fireEvent, render, screen, waitFor, within } from 'tests/utils';
import React from 'react';
import { act } from 'react-dom/test-utils';
import React, { act } from 'react';
import { useParams } from 'react-router-dom';
import * as terrasoApi from 'terraso-client-shared/terrasoApi/api';

Expand Down
3 changes: 1 addition & 2 deletions src/landscape/components/LandscapeForm/KeyInfoUpdate.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { fireEvent, render, screen, within } from 'tests/utils';
import React from 'react';
import { act } from 'react-dom/test-utils';
import React, { act } from 'react';
import { useParams } from 'react-router-dom';
import * as terrasoApi from 'terraso-client-shared/terrasoApi/api';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { fireEvent, render, screen, waitFor } from 'tests/utils';
import React from 'react';
import React, { act } from 'react';
import AvatarEditor from 'react-avatar-editor';
import { act } from 'react-dom/test-utils';
import { useParams } from 'react-router-dom';
import * as terrasoApi from 'terraso-client-shared/terrasoApi/api';

Expand Down
3 changes: 1 addition & 2 deletions src/landscape/components/LandscapeForm/ProfileUpdate.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { fireEvent, render, screen, waitFor, within } from 'tests/utils';
import React from 'react';
import { act } from 'react-dom/test-utils';
import React, { act } from 'react';
import { useParams } from 'react-router-dom';
import * as terrasoApi from 'terraso-client-shared/terrasoApi/api';

Expand Down
3 changes: 1 addition & 2 deletions src/landscape/components/LandscapeList.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { fireEvent, render, screen, waitFor, within } from 'tests/utils';
import React from 'react';
import { act } from 'react-dom/test-utils';
import React, { act } from 'react';
import { useSearchParams } from 'react-router-dom';
import * as terrasoApi from 'terraso-client-shared/terrasoApi/api';
import { mockTerrasoAPIrequestGraphQL } from 'tests/apiUtils';
Expand Down
3 changes: 1 addition & 2 deletions src/landscape/membership/components/LandscapeMembers.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { fireEvent, render, screen, waitFor, within } from 'tests/utils';
import React from 'react';
import React, { act } from 'react';
import _ from 'lodash/fp';
import { act } from 'react-dom/test-utils';
import * as terrasoApi from 'terraso-client-shared/terrasoApi/api';
import { mockTerrasoAPIrequestGraphQL } from 'tests/apiUtils';
import useMediaQuery from '@mui/material/useMediaQuery';
Expand Down
3 changes: 1 addition & 2 deletions src/layout/AppBar.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { fireEvent, render, screen } from 'tests/utils';
import React from 'react';
import React, { act } from 'react';
import Cookies from 'js-cookie';
import { act } from 'react-dom/test-utils';
import { useLocation, useNavigate } from 'react-router-dom';
import useMediaQuery from '@mui/material/useMediaQuery';

Expand Down
3 changes: 1 addition & 2 deletions src/localization/components/LocalePicker.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { fireEvent, render, screen, within } from 'tests/utils';
import React from 'react';
import React, { act } from 'react';
import _ from 'lodash/fp';
import { act } from 'react-dom/test-utils';
import * as terrasoApi from 'terraso-client-shared/terrasoApi/api';
import useMediaQuery from '@mui/material/useMediaQuery';

Expand Down
2 changes: 1 addition & 1 deletion src/localization/i18n.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { render, screen } from 'tests/utils';
import { act } from 'react-dom/test-utils';
import { act } from 'react';
import { useTranslation } from 'react-i18next';

import i18n from 'localization/i18n';
Expand Down
3 changes: 1 addition & 2 deletions src/navigation/components/Navigation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
import { fireEvent, render, screen } from 'tests/utils';
import React from 'react';
import { act } from 'react-dom/test-utils';
import React, { act } from 'react';
import { useLocation } from 'react-router-dom';

import Navigation from 'navigation/components/Navigation';
Expand Down
2 changes: 1 addition & 1 deletion src/tests/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ import React from 'react';
// import for side effects to ensure config happens before running tests
import 'config';

import { act } from 'react';
import {
waitFor as baseWaitFor,
cleanup,
render as rtlRender,
} from '@testing-library/react';
import { axe, toHaveNoViolations } from 'jest-axe';
import { act } from 'react-dom/test-utils';
import createStore from 'terrasoApi/store';

import AppWrappers from 'layout/AppWrappers';
Expand Down

0 comments on commit 2628933

Please sign in to comment.