Skip to content

Commit

Permalink
Merge branch 'release-next'
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 committed Jan 18, 2024
2 parents 274027e + 44b391a commit ee02f5d
Show file tree
Hide file tree
Showing 20 changed files with 891 additions and 90 deletions.
97 changes: 55 additions & 42 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,134 +13,136 @@ We manage release notes in this file instead of the paginated Github Releases Pa
<summary>Table of Contents</summary>

- [React Router Releases](#react-router-releases)
- [v6.21.2](#v6212)
- [v6.21.3](#v6213)
- [Patch Changes](#patch-changes)
- [v6.21.1](#v6211)
- [v6.21.2](#v6212)
- [Patch Changes](#patch-changes-1)
- [v6.21.1](#v6211)
- [Patch Changes](#patch-changes-2)
- [v6.21.0](#v6210)
- [What's Changed](#whats-changed)
- [`future.v7_relativeSplatPath`](#futurev7_relativesplatpath)
- [Partial Hydration](#partial-hydration)
- [Minor Changes](#minor-changes)
- [Patch Changes](#patch-changes-2)
- [v6.20.1](#v6201)
- [Patch Changes](#patch-changes-3)
- [v6.20.1](#v6201)
- [Patch Changes](#patch-changes-4)
- [v6.20.0](#v6200)
- [Minor Changes](#minor-changes-1)
- [Patch Changes](#patch-changes-4)
- [Patch Changes](#patch-changes-5)
- [v6.19.0](#v6190)
- [What's Changed](#whats-changed-1)
- [`unstable_flushSync` API](#unstable_flushsync-api)
- [Minor Changes](#minor-changes-2)
- [Patch Changes](#patch-changes-5)
- [Patch Changes](#patch-changes-6)
- [v6.18.0](#v6180)
- [What's Changed](#whats-changed-2)
- [New Fetcher APIs](#new-fetcher-apis)
- [Persistence Future Flag (`future.v7_fetcherPersist`)](#persistence-future-flag-futurev7_fetcherpersist)
- [Minor Changes](#minor-changes-3)
- [Patch Changes](#patch-changes-6)
- [Patch Changes](#patch-changes-7)
- [v6.17.0](#v6170)
- [What's Changed](#whats-changed-3)
- [View Transitions 🚀](#view-transitions-)
- [Minor Changes](#minor-changes-4)
- [Patch Changes](#patch-changes-7)
- [Patch Changes](#patch-changes-8)
- [v6.16.0](#v6160)
- [Minor Changes](#minor-changes-5)
- [Patch Changes](#patch-changes-8)
- [Patch Changes](#patch-changes-9)
- [v6.15.0](#v6150)
- [Minor Changes](#minor-changes-6)
- [Patch Changes](#patch-changes-9)
- [v6.14.2](#v6142)
- [Patch Changes](#patch-changes-10)
- [v6.14.1](#v6141)
- [v6.14.2](#v6142)
- [Patch Changes](#patch-changes-11)
- [v6.14.1](#v6141)
- [Patch Changes](#patch-changes-12)
- [v6.14.0](#v6140)
- [What's Changed](#whats-changed-4)
- [JSON/Text Submissions](#jsontext-submissions)
- [Minor Changes](#minor-changes-7)
- [Patch Changes](#patch-changes-12)
- [Patch Changes](#patch-changes-13)
- [v6.13.0](#v6130)
- [What's Changed](#whats-changed-5)
- [Minor Changes](#minor-changes-8)
- [Patch Changes](#patch-changes-13)
- [v6.12.1](#v6121)
- [Patch Changes](#patch-changes-14)
- [v6.12.1](#v6121)
- [Patch Changes](#patch-changes-15)
- [v6.12.0](#v6120)
- [What's Changed](#whats-changed-6)
- [`React.startTransition` support](#reactstarttransition-support)
- [Minor Changes](#minor-changes-9)
- [Patch Changes](#patch-changes-15)
- [v6.11.2](#v6112)
- [Patch Changes](#patch-changes-16)
- [v6.11.1](#v6111)
- [v6.11.2](#v6112)
- [Patch Changes](#patch-changes-17)
- [v6.11.1](#v6111)
- [Patch Changes](#patch-changes-18)
- [v6.11.0](#v6110)
- [Minor Changes](#minor-changes-10)
- [Patch Changes](#patch-changes-18)
- [Patch Changes](#patch-changes-19)
- [v6.10.0](#v6100)
- [What's Changed](#whats-changed-7)
- [Minor Changes](#minor-changes-11)
- [Patch Changes](#patch-changes-19)
- [Patch Changes](#patch-changes-20)
- [v6.9.0](#v690)
- [What's Changed](#whats-changed-8)
- [`Component`/`ErrorBoundary` route properties](#componenterrorboundary-route-properties)
- [Introducing Lazy Route Modules](#introducing-lazy-route-modules)
- [Minor Changes](#minor-changes-12)
- [Patch Changes](#patch-changes-20)
- [v6.8.2](#v682)
- [Patch Changes](#patch-changes-21)
- [v6.8.1](#v681)
- [v6.8.2](#v682)
- [Patch Changes](#patch-changes-22)
- [v6.8.1](#v681)
- [Patch Changes](#patch-changes-23)
- [v6.8.0](#v680)
- [Minor Changes](#minor-changes-13)
- [Patch Changes](#patch-changes-23)
- [Patch Changes](#patch-changes-24)
- [v6.7.0](#v670)
- [Minor Changes](#minor-changes-14)
- [Patch Changes](#patch-changes-24)
- [v6.6.2](#v662)
- [Patch Changes](#patch-changes-25)
- [v6.6.1](#v661)
- [v6.6.2](#v662)
- [Patch Changes](#patch-changes-26)
- [v6.6.1](#v661)
- [Patch Changes](#patch-changes-27)
- [v6.6.0](#v660)
- [What's Changed](#whats-changed-9)
- [Minor Changes](#minor-changes-15)
- [Patch Changes](#patch-changes-27)
- [Patch Changes](#patch-changes-28)
- [v6.5.0](#v650)
- [What's Changed](#whats-changed-10)
- [Minor Changes](#minor-changes-16)
- [Patch Changes](#patch-changes-28)
- [v6.4.5](#v645)
- [Patch Changes](#patch-changes-29)
- [v6.4.4](#v644)
- [v6.4.5](#v645)
- [Patch Changes](#patch-changes-30)
- [v6.4.3](#v643)
- [v6.4.4](#v644)
- [Patch Changes](#patch-changes-31)
- [v6.4.2](#v642)
- [v6.4.3](#v643)
- [Patch Changes](#patch-changes-32)
- [v6.4.1](#v641)
- [v6.4.2](#v642)
- [Patch Changes](#patch-changes-33)
- [v6.4.1](#v641)
- [Patch Changes](#patch-changes-34)
- [v6.4.0](#v640)
- [What's Changed](#whats-changed-11)
- [Remix Data APIs](#remix-data-apis)
- [Patch Changes](#patch-changes-34)
- [Patch Changes](#patch-changes-35)
- [v6.3.0](#v630)
- [Minor Changes](#minor-changes-17)
- [v6.2.2](#v622)
- [Patch Changes](#patch-changes-35)
- [v6.2.1](#v621)
- [Patch Changes](#patch-changes-36)
- [v6.2.1](#v621)
- [Patch Changes](#patch-changes-37)
- [v6.2.0](#v620)
- [Minor Changes](#minor-changes-18)
- [Patch Changes](#patch-changes-37)
- [v6.1.1](#v611)
- [Patch Changes](#patch-changes-38)
- [v6.1.1](#v611)
- [Patch Changes](#patch-changes-39)
- [v6.1.0](#v610)
- [Minor Changes](#minor-changes-19)
- [Patch Changes](#patch-changes-39)
- [v6.0.2](#v602)
- [Patch Changes](#patch-changes-40)
- [v6.0.1](#v601)
- [v6.0.2](#v602)
- [Patch Changes](#patch-changes-41)
- [v6.0.1](#v601)
- [Patch Changes](#patch-changes-42)
- [v6.0.0](#v600)

</details>
Expand All @@ -164,6 +166,17 @@ Date: YYYY-MM-DD
**Full Changelog**: [`v6.X.Y...v6.X.Y`](https://github.com/remix-run/react-router/compare/react-router@6.X.Y...react-router@6.X.Y)
-->

## v6.21.3

Date: 2024-01-18

### Patch Changes

- Fix `NavLink` `isPending` when a `basename` is used ([#11195](https://github.com/remix-run/react-router/pull/11195))
- Remove leftover `unstable_` prefix from `Blocker`/`BlockerFunction` types ([#11187](https://github.com/remix-run/react-router/pull/11187))

**Full Changelog**: [`v6.21.2...v6.21.3`](https://github.com/remix-run/react-router/compare/react-router@6.21.2...react-router@6.21.3)

## v6.21.2

Date: 2024-01-11
Expand Down
3 changes: 1 addition & 2 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ You may need to make changes to a pre-release prior to publishing a final stable
- Wait for the release workflow to finish. The Changesets action in the workflow will open a PR that will increment all versions and generate the changelogs for the stable release.
- Review the updated `CHANGELOG` files and make any adjustments necessary.
- `find packages -name 'CHANGELOG.md' -mindepth 2 -maxdepth 2 -exec code {} \;`
- Remove the changelogs for all pre-releases
- [TODO: We should automate this]
- Our automated release process should have removed prerelease entries
- Finalize the release notes
- This should already be in pretty good shape in the root `CHANGELOG.md` file in the repo
- Do a quick double check that all iterated prerelease changesets got copied over
Expand Down
10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"test": "jest",
"test:inspect": "node --inspect-brk ./node_modules/.bin/jest",
"changeset": "changeset",
"version": "changeset version",
"version": "changeset version && node ./scripts/remove-prerelease-changelogs.mjs",
"publish": "node scripts/publish.js",
"postversion": "node scripts/postversion.mjs",
"version:experimental": "node ./scripts/version experimental",
Expand All @@ -50,6 +50,7 @@
"@babel/preset-react": "^7.22.5",
"@babel/preset-typescript": "^7.22.5",
"@changesets/cli": "^2.26.2",
"@manypkg/get-packages": "1.1.3",
"@octokit/core": "^4.2.4",
"@octokit/graphql": "^4.8.0",
"@octokit/plugin-paginate-rest": "^2.21.3",
Expand Down Expand Up @@ -96,14 +97,19 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-test-renderer": "^18.2.0",
"remark-gfm": "3.0.1",
"remark-parse": "^10.0.1",
"remark-stringify": "^10.0.2",
"rollup": "^2.79.1",
"rollup-plugin-copy": "^3.4.0",
"rollup-plugin-extensions": "^0.1.0",
"rollup-plugin-prettier": "^2.3.0",
"rollup-plugin-terser": "^7.0.2",
"semver": "^7.5.4",
"type-fest": "^2.19.0",
"typescript": "^5.1.6"
"typescript": "^5.1.6",
"unified": "^10.1.2",
"unist-util-remove": "^3.1.0"
},
"engines": {
"node": ">=14.0.0"
Expand Down
9 changes: 9 additions & 0 deletions packages/react-router-dom-v5-compat/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# `react-router-dom-v5-compat`

## 6.21.3

### Patch Changes

- Remove leftover `unstable_` prefix from `Blocker`/`BlockerFunction` types ([#11187](https://github.com/remix-run/react-router/pull/11187))
- Updated dependencies:
- `react-router-dom@6.21.3`
- `react-router@6.21.3`

## 6.21.2

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/react-router-dom-v5-compat/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ export type {
To,
URLSearchParamsInit,
UIMatch,
unstable_Blocker,
unstable_BlockerFunction,
Blocker,
BlockerFunction,
} from "./react-router-dom";
export {
AbortedDeferredError,
Expand Down
4 changes: 2 additions & 2 deletions packages/react-router-dom-v5-compat/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-router-dom-v5-compat",
"version": "6.21.2",
"version": "6.21.3",
"description": "Migration path to React Router v6 from v4/5",
"keywords": [
"react",
Expand All @@ -24,7 +24,7 @@
"types": "./dist/index.d.ts",
"dependencies": {
"history": "^5.3.0",
"react-router": "6.21.2"
"react-router": "6.21.3"
},
"peerDependencies": {
"react": ">=16.8",
Expand Down
19 changes: 12 additions & 7 deletions packages/react-router-dom/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# `react-router-dom`

## 6.21.3

### Patch Changes

- Fix `NavLink` `isPending` when a `basename` is used ([#11195](https://github.com/remix-run/react-router/pull/11195))
- Remove leftover `unstable_` prefix from `Blocker`/`BlockerFunction` types ([#11187](https://github.com/remix-run/react-router/pull/11187))
- Updated dependencies:
- `react-router@6.21.3`

## 6.21.2

### Patch Changes
Expand Down Expand Up @@ -162,7 +171,7 @@

### Patch Changes

- Revert the `useResolvedPath` fix for splat routes due to a large number of applications that were relying on the buggy behavior (see https://github.com/remix-run/react-router/issues/11052#issuecomment-1836589329). We plan to re-introduce this fix behind a future flag in the next minor version. ([#11078](https://github.com/remix-run/react-router/pull/11078))
- Revert the `useResolvedPath` fix for splat routes due to a large number of applications that were relying on the buggy behavior (see <https://github.com/remix-run/react-router/issues/11052#issuecomment-1836589329>). We plan to re-introduce this fix behind a future flag in the next minor version. ([#11078](https://github.com/remix-run/react-router/pull/11078))
- Updated dependencies:
- `react-router@6.20.1`
- `@remix-run/router@1.13.1`
Expand Down Expand Up @@ -417,7 +426,7 @@

## 6.12.1

> [!WARNING]
> \[!WARNING]
> Please use version `6.13.0` or later instead of `6.12.1`. This version suffers from a `webpack`/`terser` minification issue resulting in invalid minified code in your resulting production bundles which can cause issues in your application. See [#10579](https://github.com/remix-run/react-router/issues/10579) for more details.
### Patch Changes
Expand Down Expand Up @@ -752,7 +761,7 @@

## 6.4.0

Whoa this is a big one! `6.4.0` brings all the data loading and mutation APIs over from Remix. Here's a quick high level overview, but it's recommended you go check out the [docs][rr-docs], especially the [feature overview][rr-feature-overview] and the [tutorial][rr-tutorial].
Whoa this is a big one! `6.4.0` brings all the data loading and mutation APIs over from Remix. Here's a quick high level overview, but it's recommended you go check out the [docs](https://reactrouter.com), especially the [feature overview](https://reactrouter.com/start/overview) and the [tutorial](https://reactrouter.com/start/tutorial).

**New APIs**

Expand All @@ -778,7 +787,3 @@ Whoa this is a big one! `6.4.0` brings all the data loading and mutation APIs ov
**Updated Dependencies**

- `react-router@6.4.0`

[rr-docs]: https://reactrouter.com
[rr-feature-overview]: https://reactrouter.com/start/overview
[rr-tutorial]: https://reactrouter.com/start/tutorial
40 changes: 40 additions & 0 deletions packages/react-router-dom/__tests__/nav-link-active-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,46 @@ describe("NavLink using a data router", () => {
expect(screen.getByText("Link to Bar").className).toBe("");
expect(screen.getByText("Link to Baz").className).toBe("active");
});

it("applies the default 'active'/'pending' classNames when a basename is used", async () => {
let dfd = createDeferred();
let router = createBrowserRouter(
createRoutesFromElements(
<Route path="/" element={<Layout />}>
<Route path="foo" element={<p>Foo page</p>} />
<Route
path="bar"
loader={() => dfd.promise}
element={<p>Bar page</p>}
/>
</Route>
),
{
window: getWindow("/base/foo"),
basename: "/base",
}
);
render(<RouterProvider router={router} />);

function Layout() {
return (
<>
<NavLink to="/foo">Link to Foo</NavLink>
<NavLink to="/bar">Link to Bar</NavLink>
<Outlet />
</>
);
}

expect(screen.getByText("Link to Bar").className).toBe("");

fireEvent.click(screen.getByText("Link to Bar"));
expect(screen.getByText("Link to Bar").className).toBe("pending");

dfd.resolve(null);
await waitFor(() => screen.getByText("Bar page"));
expect(screen.getByText("Link to Bar").className).toBe("active");
});
});

describe("NavLink under a Routes with a basename", () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-router-dom/__tests__/use-blocker-test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from "react";
import * as ReactDOM from "react-dom/client";
import { act } from "react-dom/test-utils";
import type { unstable_Blocker as Blocker, RouteObject } from "../index";
import type { Blocker, RouteObject } from "../index";
import {
createMemoryRouter,
json,
Expand Down
Loading

0 comments on commit ee02f5d

Please sign in to comment.