Skip to content

Commit

Permalink
Update dependencies in main package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
jandrade committed Jul 25, 2024
1 parent 68dd605 commit 7818228
Show file tree
Hide file tree
Showing 21 changed files with 78 additions and 119 deletions.
21 changes: 10 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,17 @@
"@swc-node/register": "^1.6.5",
"@swc/core": "^1.3.36",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^12.1.2",
"@testing-library/react-hooks": "^7.0.2",
"@testing-library/react": "15.0.6",
"@testing-library/user-event": "^14.5.1",
"@types/jest": "^29.5.12",
"@types/jest-axe": "^3.5.9",
"@types/jscodeshift": "^0.11.11",
"@types/node": "^18.14.1",
"@types/node-fetch": "^2.6.11",
"@types/react": "16",
"@types/react-dom": "16",
"@types/react": "18.2.0",
"@types/react-dom": "18.2.0",
"@types/react-router": "5",
"@types/react-router-dom": "5",
"@types/react-router-dom": "^5.3.3",
"@types/react-window": "^1.8.5",
"@typescript-eslint/eslint-plugin": "^5.59.5",
"@typescript-eslint/parser": "^5.59.5",
Expand Down Expand Up @@ -128,11 +127,11 @@
"aphrodite": "^1.2.5",
"moment": "2.29.4",
"node-fetch": "^2.6.7",
"react": "16.14.0",
"react-dom": "16.14.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-popper": "^2.3.0",
"react-router": "5.2.1",
"react-router-dom": "5.3.0",
"react-router": "5.3.4",
"react-router-dom": "5.3.4",
"react-window": "^1.8.7"
},
"workspaces": [
Expand All @@ -145,8 +144,8 @@
"@testing-library/dom": "^8.0.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/user-event": "^14.5.1",
"@types/react": "16",
"@types/react-dom": "16",
"@types/react": "18",
"@types/react-dom": "18",
"strip-ansi": "6.0.1",
"strip-ansi-explanation": "There's an issue with strip-ansi v7 which causes conflicts with the Khan/changeset-per-package action"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as React from "react";
import {render, act} from "@testing-library/react";
import {renderHook} from "@testing-library/react-hooks";
import {render, act, renderHook} from "@testing-library/react";

import {useForceUpdate} from "../use-force-update";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as React from "react";
import {render, screen} from "@testing-library/react";
import {renderHook} from "@testing-library/react-hooks";
import {render, screen, renderHook} from "@testing-library/react";
import {renderToString} from "react-dom/server";

import Server from "../../util/server";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {renderHook} from "@testing-library/react-hooks";
import {renderHook} from "@testing-library/react";
import {useLatestRef} from "../use-latest-ref";

describe("useLatestRef", () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {renderHook} from "@testing-library/react-hooks";
import {renderHook} from "@testing-library/react";

import {useOnMountEffect} from "../use-on-mount-effect";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// eslint-disable-next-line import/no-unassigned-import
import "jest-extended";
import * as React from "react";
import {render, act as reactAct} from "@testing-library/react";
import {renderHook} from "@testing-library/react-hooks";
import {render, act as reactAct, renderHook} from "@testing-library/react";

import {useOnline} from "../use-online";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import {renderHook} from "@testing-library/react-hooks";
import {renderHook} from "@testing-library/react";
import {renderToString} from "react-dom/server";

import Server from "../../util/server";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from "react";
import {renderHookStatic} from "@khanacademy/wonder-blocks-testing-core";
import {renderHook} from "@testing-library/react-hooks";
import {renderHook} from "@testing-library/react";

import {useRenderState} from "../use-render-state";
import {RenderStateRoot} from "../../components/render-state-root";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import * as React from "react";
import {renderHookStatic} from "@khanacademy/wonder-blocks-testing-core";
import {
render,
renderHook as clientRenderHook,
act,
} from "@testing-library/react-hooks";
import {renderHookStatic} from "@khanacademy/wonder-blocks-testing-core";
import {render, act as reactAct} from "@testing-library/react";
} from "@testing-library/react";
import {values} from "@khanacademy/wonder-stuff-core";

import {Server} from "@khanacademy/wonder-blocks-core";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import {renderHook} from "@testing-library/react-hooks";
import {renderHook} from "@testing-library/react";

import {GqlRouterContext} from "../../util/gql-router-context";
import {useGqlRouterContext} from "../use-gql-router-context";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import {renderHook} from "@testing-library/react-hooks";
import {renderHook} from "@testing-library/react";

import * as GetGqlDataFromResponse from "../../util/get-gql-data-from-response";
import {GqlRouterContext} from "../../util/gql-router-context";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import * as React from "react";
import {
renderHook as clientRenderHook,
act,
} from "@testing-library/react-hooks";
import {renderHookStatic} from "@khanacademy/wonder-blocks-testing-core";
import {renderHook as clientRenderHook, act} from "@testing-library/react";

import {Server} from "@khanacademy/wonder-blocks-core";
import {Status} from "../../util/status";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import {renderHook} from "@testing-library/react-hooks";
import {renderHook} from "@testing-library/react";
import InterceptRequests from "../../components/intercept-requests";
import {useRequestInterception} from "../use-request-interception";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {renderHook as clientRenderHook} from "@testing-library/react-hooks";
import {renderHookStatic} from "@khanacademy/wonder-blocks-testing-core";
import {renderHook as clientRenderHook} from "@testing-library/react";

import {Server} from "@khanacademy/wonder-blocks-core";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// eslint-disable-next-line import/no-unassigned-import
import "jest-extended";
import {renderHook as clientRenderHook} from "@testing-library/react-hooks";
import {renderHook as clientRenderHook} from "@testing-library/react";

import {useSharedCache, SharedCache} from "../use-shared-cache";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import {renderHook} from "@testing-library/react-hooks";
import {renderHook} from "@testing-library/react";

import {
createThemeContext,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {renderHook} from "@testing-library/react-hooks";
import {renderHook} from "@testing-library/react";
import {StyleSheet} from "aphrodite";
import {ThemedStylesFn} from "../../types";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {renderHook, act} from "@testing-library/react-hooks";
import {renderHook, act} from "@testing-library/react";
import {SchedulePolicy, ClearPolicy, ActionPolicy} from "../../util/policies";

import {useInterval} from "../use-interval";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {renderHook, act} from "@testing-library/react-hooks";
import {renderHook, act} from "@testing-library/react";
import {SchedulePolicy, ClearPolicy, ActionPolicy} from "../../util/policies";

import {useTimeout} from "../use-timeout";
Expand Down
5 changes: 3 additions & 2 deletions utils/testing/expect-render-error.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import * as ReactDOM from "react-dom";
import {createRoot} from "react-dom/client";

// Code from:
// https://gist.github.com/gaearon/adf9d5500e11a4e7b2c6f7ebf994fe56
Expand Down Expand Up @@ -37,7 +37,8 @@ export default (element: React.ReactNode, expectedError: string) => {
const div = document.createElement("div");
window.addEventListener("error", handleTopLevelError);
try {
ReactDOM.render(<TestBoundary>{element}</TestBoundary>, div);
const root = createRoot(div);
root.render(<TestBoundary>{element}</TestBoundary>);
} finally {
window.removeEventListener("error", handleTopLevelError);
}
Expand Down
Loading

0 comments on commit 7818228

Please sign in to comment.