Skip to content

Commit

Permalink
Remove v7_relativeSplatPath future flag and old code paths
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 committed Jun 24, 2024
1 parent c9e50ca commit 1ab15b1
Show file tree
Hide file tree
Showing 17 changed files with 150 additions and 235 deletions.
5 changes: 5 additions & 0 deletions .changeset/tidy-clouds-lay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-router": major
---

Remove `v7_relativeSplatPath` future flag
Original file line number Diff line number Diff line change
Expand Up @@ -2955,7 +2955,7 @@ function testDomRouter(
let { container } = render(<RouterProvider router={router} />);

expect(container.querySelector("form")?.getAttribute("action")).toBe(
"/foo?a=1"
"/foo/bar?a=1"
);
});

Expand All @@ -2975,7 +2975,7 @@ function testDomRouter(
let { container } = render(<RouterProvider router={router} />);

expect(container.querySelector("form")?.getAttribute("action")).toBe(
"/foo"
"/foo/bar"
);
});

Expand All @@ -2995,7 +2995,7 @@ function testDomRouter(
let { container } = render(<RouterProvider router={router} />);

expect(container.querySelector("form")?.getAttribute("action")).toBe(
"/foo"
"/foo/bar"
);
});
});
Expand Down Expand Up @@ -3129,7 +3129,7 @@ function testDomRouter(
let { container } = render(<RouterProvider router={router} />);

expect(container.querySelector("form")?.getAttribute("action")).toBe(
"/inbox"
"/inbox/messages/1/2"
);
});
});
Expand Down
2 changes: 1 addition & 1 deletion packages/react-router/__tests__/dom/link-href-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ describe("<Link> href", () => {
});

expect(renderer.root.findByType("a").props.href).toEqual(
"/inbox/messages"
"/inbox/messages/abc"
);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -581,9 +581,13 @@ describe("special character tests", () => {
}

function Child() {
let location = useLocation();
let to = location.pathname.endsWith("grandchild")
? "."
: "./grandchild";
return (
<>
<Link to="./grandchild">Link to grandchild</Link>
<Link to={to}>Link to grandchild</Link>
<Routes>
<Route path="grandchild" element={<Grandchild />} />
</Routes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ describe("path resolution", () => {
path: "*",
},
],
"/foo",
"/foo/bar",
false
);
});
Expand Down
Loading

0 comments on commit 1ab15b1

Please sign in to comment.