Skip to content

Commit 5ecf471

Browse files
committed
Start of React router v7 transition
1 parent 6f56202 commit 5ecf471

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+14576
-32885
lines changed

package-lock.json

Lines changed: 14434 additions & 32732 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@
5454
"default": "./dist/client.css"
5555
}
5656
},
57-
"files": ["dist"],
57+
"files": [
58+
"dist"
59+
],
5860
"repository": {
5961
"type": "git",
6062
"url": "git+https://github.com/Code-Forge-Net/Remix-Dev-Tools.git"
@@ -91,20 +93,20 @@
9193
"icons": "npm run run:scripts scripts/icons.ts",
9294
"check:unused": "knip "
9395
},
94-
"workspaces": [".", "test-apps/*", "docs"],
96+
"workspaces": [
97+
".",
98+
"test-apps/*"
99+
],
95100
"peerDependencies": {
96-
"@remix-run/react": ">=1.15",
97101
"react": ">=17",
98102
"react-dom": ">=17",
99103
"vite": ">=5.0.0"
100104
},
101105
"devDependencies": {
102106
"@biomejs/biome": "1.8.3",
103-
"@remix-run/dev": "^2.9.1",
104-
"@remix-run/node": "^2.9.1",
105-
"@remix-run/react": "^2.9.1",
106-
"@remix-run/router": "^1.9.0",
107-
"@remix-run/server-runtime": "^2.9.1",
107+
"@react-router/dev": "^7.0.0-pre.0",
108+
"@react-router/node": "^7.0.0-pre.0",
109+
"@react-router/serve": "^7.0.0-pre.0",
108110
"@testing-library/react": "^14.0.0",
109111
"@types/beautify": "^0.0.3",
110112
"@types/node": "^20.4.5",
@@ -125,7 +127,7 @@
125127
"tsup": "^7.2.0",
126128
"tsx": "^4.19.1",
127129
"typescript": "^5.1.6",
128-
"vite": "^5.1.0",
130+
"vite": "^5.4.8",
129131
"vitest": "^0.33.0"
130132
},
131133
"dependencies": {
@@ -139,7 +141,8 @@
139141
"react-d3-tree": "^3.6.2",
140142
"react-diff-viewer-continued": "^3.3.1",
141143
"react-hotkeys-hook": "^4.5.0",
144+
"react-router": "^7.0.0-pre.0",
142145
"react-use-websocket": "^4.8.1",
143146
"tailwind-merge": "^1.14.0"
144147
}
145-
}
148+
}

src/client/EmbeddedDevTools.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { useLocation } from "@remix-run/react"
21
import clsx from "clsx"
32
import { useEffect, useState } from "react"
3+
import { useLocation } from "react-router"
44
import type { RemixDevToolsProps } from "./RemixDevTools.js"
55
import { RDTContextProvider } from "./context/RDTContext.js"
66
import { useSettingsContext } from "./context/useRDTContext.js"

src/client/RemixDevTools.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Link, useLocation } from "@remix-run/react"
21
import { useEffect, useState } from "react"
2+
import { Link, useLocation } from "react-router"
33
import { Trigger } from "./components/Trigger.js"
44
import { RDTContextProvider, type RdtClientConfig } from "./context/RDTContext.js"
55
import { useDetachedWindowControls, usePersistOpen, useSettingsContext } from "./context/useRDTContext.js"

src/client/components/RouteInfo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { Link } from "@remix-run/react"
21
import clsx from "clsx"
32
import type { MouseEvent } from "react"
3+
import { Link } from "react-router"
44
import { useSettingsContext } from "../context/useRDTContext.js"
55
import { type ExtendedRoute, constructRoutePath } from "../utils/routing.js"
66
import { Input } from "./Input.js"

src/client/components/RouteNode.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import type { useNavigate } from "@remix-run/react"
21
import clsx from "clsx"
32
import type { CustomNodeElementProps } from "react-d3-tree"
3+
import type { useNavigate } from "react-router"
44
import type { RouteWildcards } from "../context/rdtReducer.js"
55
import { type ExtendedRoute, getRouteColor } from "../utils/routing.js"
66

src/client/components/RouteSegmentInfo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export const RouteSegmentInfo = ({ route, i }: { route: UIMatch<unknown, unknown
8989
isHoveringRoute: type === "enter",
9090
})
9191
}
92-
const entryRoute = __remixManifest.routes[route.id]
92+
const entryRoute = __reactRouterManifest.routes[route.id]
9393
const isLayout = isLayoutRoute(entryRoute)
9494

9595
const clearServerInfoForRoute = () => {

src/client/context/RDTContext.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
//getExistingStateFromStorage,
1616
} from "./RDTContext.js"
1717

18-
vi.mock("@remix-run/react", () => ({
18+
vi.mock("react-router", () => ({
1919
useLocation: () => ({
2020
pathname: "/",
2121
}),

src/client/context/timeline/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { FormEncType } from "@remix-run/react"
1+
import type { FormEncType } from "react-router"
22

33
interface NormalRedirectEvent {
44
type: "REDIRECT"

src/client/hooks/detached/useListenToRouteChange.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { useLocation, useNavigate, useNavigation } from "@remix-run/react"
21
import { useEffect, useRef } from "react"
2+
import { useLocation, useNavigate, useNavigation } from "react-router"
33
import { detachedModeSetup } from "../../context/RDTContext.js"
44
import { useDetachedWindowControls } from "../../context/useRDTContext.js"
55
import { getStorageItem, setStorageItem } from "../../utils/storage.js"

0 commit comments

Comments
 (0)