Skip to content

Commit

Permalink
Remove uses of the legacy react-devtools-inline package
Browse files Browse the repository at this point in the history
  • Loading branch information
markerikson committed Sep 14, 2023
1 parent f587dc7 commit a125140
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/ui/components/SecondaryToolbox/ReactDevTools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -454,9 +454,9 @@ async function loadReactDevToolsInlineModuleFromProtocol(
// If we don't have a version yet, it probably means we're too early in the Replay session.
if (backendBridgeProtocolVersion >= 2) {
stateUpdaterCallback(await import("@replayio/react-devtools-inline/frontend"));
} else if (backendBridgeProtocolVersion === 1) {
stateUpdaterCallback(await import("react-devtools-inline_4_18_0/frontend"));
}
// We no longer support loading a version of `react-devtools-inline`
// that only knows about protocol version 1.
}

const nodePickerInstance = new NodePickerClass();
Expand Down
4 changes: 0 additions & 4 deletions src/ui/components/SecondaryToolbox/react-devtools-inline.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
// https://github.com/facebook/react/blob/main/packages/react-devtools-inline/
// https://github.com/facebook/react/blob/main/packages/react-devtools-shared/

declare module "react-devtools-inline_4_18_0/frontend" {
export * from "@types/react-devtools-inline/frontend";
}

declare module "@replayio/react-devtools-inline" {
export * from "@types/react-devtools-inline";
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { Store } from "@replayio/react-devtools-inline";
import type { Dispatch, ReactNode, SetStateAction } from "react";
import type { Root } from "react-dom/client";

Expand All @@ -21,8 +22,6 @@ import {
TREE_OPERATION_UPDATE_TREE_BASE_DURATION,
} from "../printOperations";

import type { Store } from "@replayio/react-devtools-inline";

const Component = ({ children = null }: { children?: ReactNode }) => children as any;

describe("RDT processing", () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { RendererInterface } from "@replayio/react-devtools-inline";

import { pauseEvaluationsCache } from "replay-next/src/suspense/PauseCache";
import { ReplayClientInterface } from "shared/client/types";

import type { RendererInterface } from "@replayio/react-devtools-inline";

// Our modified RDT bundle exports some additional methods
type RendererInterfaceWithAdditions = RendererInterface & {
getOrGenerateFiberID: (fiber: any) => number;
Expand Down

0 comments on commit a125140

Please sign in to comment.