Skip to content

Commit 06ecf5a

Browse files
committed
Remove cyclic dependency on react-router
1 parent 13df3ce commit 06ecf5a

Some content is hidden

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

49 files changed

+115
-106
lines changed

.changeset/shiny-horses-pump.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"react-router": patch
3+
---
4+
5+
Removed cyclic dependency on react-router

contributors.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@
217217
- petersendidit
218218
- promet99
219219
- pyitphyoaung
220+
- redabacha
220221
- refusado
221222
- rimian
222223
- robbtraister

packages/react-router/__tests__/Route-test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from "react";
22
import * as TestRenderer from "react-test-renderer";
3-
import { MemoryRouter, Routes, Route } from "react-router";
3+
import { MemoryRouter, Route, Routes } from "../index";
44

55
describe("A <Route>", () => {
66
it("renders its `element` prop", () => {

packages/react-router/__tests__/Router-basename-test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from "react";
22
import * as TestRenderer from "react-test-renderer";
3-
import { MemoryRouter, Routes, Route } from "react-router";
3+
import { MemoryRouter, Route, Routes } from "../index";
44

55
describe("<Router basename>", () => {
66
let consoleWarn: jest.SpyInstance;

packages/react-router/__tests__/Router-test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from "react";
22
import * as TestRenderer from "react-test-renderer";
3-
import { MemoryRouter, useLocation } from "react-router";
3+
import { MemoryRouter, useLocation } from "../index";
44

55
describe("<Router>", () => {
66
let consoleError: jest.SpyInstance;

packages/react-router/__tests__/Routes-location-test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from "react";
22
import * as TestRenderer from "react-test-renderer";
3-
import { MemoryRouter, Route, Routes, useParams } from "react-router";
3+
import { MemoryRouter, Route, Routes, useParams } from "../index";
44

55
describe("<Routes> with a location", () => {
66
function Home() {

packages/react-router/__tests__/Routes-test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from "react";
22
import * as TestRenderer from "react-test-renderer";
3-
import { MemoryRouter, Routes, Route } from "react-router";
3+
import { MemoryRouter, Route, Routes } from "../index";
44

55
describe("<Routes>", () => {
66
let consoleWarn: jest.SpyInstance;

packages/react-router/__tests__/absolute-path-matching-test.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import type { RouteObject } from "react-router";
2-
import { matchRoutes } from "react-router";
1+
import { matchRoutes, type RouteObject } from "../index";
32

43
function pickPaths(routes: RouteObject[], pathname: string): string[] | null {
54
let matches = matchRoutes(routes, pathname);

packages/react-router/__tests__/createRoutesFromChildren-test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from "react";
2-
import { Route, createRoutesFromChildren } from "react-router";
2+
import { Route, createRoutesFromChildren } from "../index";
33

44
describe("creating routes from JSX", () => {
55
it("creates a route config of nested JavaScript objects", () => {

packages/react-router/__tests__/data-memory-router-test.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,19 @@ import {
2020
useActionData,
2121
useAsyncError,
2222
useAsyncValue,
23+
useFetcher,
2324
useLoaderData,
2425
useLocation,
2526
useMatches,
27+
useNavigate,
2628
useNavigation,
29+
useRevalidator,
2730
useRouteError,
2831
useRouteLoaderData,
29-
} from "react-router";
30-
31-
import {
32-
useFetcher,
33-
useNavigate,
34-
useRevalidator,
3532
useSubmit,
3633
type ErrorResponse,
3734
} from "../index";
35+
3836
import urlDataStrategy from "./router/utils/urlDataStrategy";
3937
import { createDeferred } from "./router/utils/utils";
4038
import MemoryNavigate from "./utils/MemoryNavigate";

0 commit comments

Comments
 (0)