From ff991da916813a4e8161f339f4446b20112f2b2b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 24 Jun 2024 18:15:55 +0000 Subject: [PATCH 1/3] chore: Update version for release --- .changeset/fog-of-war.md | 10 ---------- .changeset/gorgeous-geese-sit.md | 5 ----- .changeset/pre.json | 16 ---------------- .changeset/smooth-sloths-exist.md | 6 ------ packages/react-router-dom-v5-compat/CHANGELOG.md | 8 ++++---- packages/react-router-dom-v5-compat/package.json | 2 +- packages/react-router-dom/CHANGELOG.md | 10 +++++----- packages/react-router-dom/package.json | 2 +- packages/react-router-native/CHANGELOG.md | 4 ++-- packages/react-router-native/package.json | 2 +- packages/react-router/CHANGELOG.md | 8 ++++---- packages/react-router/package.json | 2 +- packages/router/CHANGELOG.md | 6 +++--- packages/router/package.json | 2 +- 14 files changed, 23 insertions(+), 60 deletions(-) delete mode 100644 .changeset/fog-of-war.md delete mode 100644 .changeset/gorgeous-geese-sit.md delete mode 100644 .changeset/pre.json delete mode 100644 .changeset/smooth-sloths-exist.md diff --git a/.changeset/fog-of-war.md b/.changeset/fog-of-war.md deleted file mode 100644 index 1eea19ad1d..0000000000 --- a/.changeset/fog-of-war.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"react-router-dom": minor -"react-router": minor -"@remix-run/router": minor ---- - -Add support for Lazy Route Discovery (a.k.a. Fog of War) - -- RFC: https://github.com/remix-run/react-router/discussions/11113 -- `unstable_patchRoutesOnMiss` docs: https://reactrouter.com/en/main/routers/create-browser-router diff --git a/.changeset/gorgeous-geese-sit.md b/.changeset/gorgeous-geese-sit.md deleted file mode 100644 index c38daf1ce8..0000000000 --- a/.changeset/gorgeous-geese-sit.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router-dom": patch ---- - -Fix `fetcher.submit` types - remove incorrect `navigate`/`fetcherKey`/`unstable_viewTransition` options because they are only relevant for `useSubmit` diff --git a/.changeset/pre.json b/.changeset/pre.json deleted file mode 100644 index f0dae125c6..0000000000 --- a/.changeset/pre.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "mode": "exit", - "tag": "pre", - "initialVersions": { - "react-router": "6.23.1", - "react-router-dom": "6.23.1", - "react-router-dom-v5-compat": "6.23.1", - "react-router-native": "6.23.1", - "@remix-run/router": "1.16.1" - }, - "changesets": [ - "fog-of-war", - "gorgeous-geese-sit", - "smooth-sloths-exist" - ] -} diff --git a/.changeset/smooth-sloths-exist.md b/.changeset/smooth-sloths-exist.md deleted file mode 100644 index 6c6a91dcbc..0000000000 --- a/.changeset/smooth-sloths-exist.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"react-router-dom": patch -"react-router-dom-v5-compat": patch ---- - -Allow falsy `location.state` values passed to `` diff --git a/packages/react-router-dom-v5-compat/CHANGELOG.md b/packages/react-router-dom-v5-compat/CHANGELOG.md index f8bae5a42f..e661a1f149 100644 --- a/packages/react-router-dom-v5-compat/CHANGELOG.md +++ b/packages/react-router-dom-v5-compat/CHANGELOG.md @@ -1,14 +1,14 @@ # `react-router-dom-v5-compat` -## 6.24.0-pre.0 +## 6.24.0 ### Patch Changes - Allow falsy `location.state` values passed to `` ([#11495](https://github.com/remix-run/react-router/pull/11495)) - Updated dependencies: - - `react-router-dom@6.24.0-pre.0` - - `react-router@6.24.0-pre.0` - - `@remix-run/router@1.17.0-pre.0` + - `react-router-dom@6.24.0` + - `react-router@6.24.0` + - `@remix-run/router@1.17.0` ## 6.23.1 diff --git a/packages/react-router-dom-v5-compat/package.json b/packages/react-router-dom-v5-compat/package.json index 1e17659140..16ada3792c 100644 --- a/packages/react-router-dom-v5-compat/package.json +++ b/packages/react-router-dom-v5-compat/package.json @@ -1,6 +1,6 @@ { "name": "react-router-dom-v5-compat", - "version": "6.24.0-pre.0", + "version": "6.24.0", "description": "Migration path to React Router v6 from v4/5", "keywords": [ "react", diff --git a/packages/react-router-dom/CHANGELOG.md b/packages/react-router-dom/CHANGELOG.md index a9ab3a70d0..3cdf61b89d 100644 --- a/packages/react-router-dom/CHANGELOG.md +++ b/packages/react-router-dom/CHANGELOG.md @@ -1,21 +1,21 @@ # `react-router-dom` -## 6.24.0-pre.0 +## 6.24.0 ### Minor Changes - Add support for Lazy Route Discovery (a.k.a. Fog of War) ([#11626](https://github.com/remix-run/react-router/pull/11626)) - - RFC: https://github.com/remix-run/react-router/discussions/11113 - - `unstable_patchRoutesOnMiss` docs: https://reactrouter.com/en/main/routers/create-browser-router + - RFC: + - `unstable_patchRoutesOnMiss` docs: ### Patch Changes - Fix `fetcher.submit` types - remove incorrect `navigate`/`fetcherKey`/`unstable_viewTransition` options because they are only relevant for `useSubmit` ([#11631](https://github.com/remix-run/react-router/pull/11631)) - Allow falsy `location.state` values passed to `` ([#11495](https://github.com/remix-run/react-router/pull/11495)) - Updated dependencies: - - `react-router@6.24.0-pre.0` - - `@remix-run/router@1.17.0-pre.0` + - `react-router@6.24.0` + - `@remix-run/router@1.17.0` ## 6.23.1 diff --git a/packages/react-router-dom/package.json b/packages/react-router-dom/package.json index 1aff97e2dc..510f8e5b18 100644 --- a/packages/react-router-dom/package.json +++ b/packages/react-router-dom/package.json @@ -1,6 +1,6 @@ { "name": "react-router-dom", - "version": "6.24.0-pre.0", + "version": "6.24.0", "description": "Declarative routing for React web applications", "keywords": [ "react", diff --git a/packages/react-router-native/CHANGELOG.md b/packages/react-router-native/CHANGELOG.md index 6fbc33a72b..6ef1db310b 100644 --- a/packages/react-router-native/CHANGELOG.md +++ b/packages/react-router-native/CHANGELOG.md @@ -1,11 +1,11 @@ # `react-router-native` -## 6.24.0-pre.0 +## 6.24.0 ### Patch Changes - Updated dependencies: - - `react-router@6.24.0-pre.0` + - `react-router@6.24.0` ## 6.23.1 diff --git a/packages/react-router-native/package.json b/packages/react-router-native/package.json index fb29e024ed..9582990289 100644 --- a/packages/react-router-native/package.json +++ b/packages/react-router-native/package.json @@ -1,6 +1,6 @@ { "name": "react-router-native", - "version": "6.24.0-pre.0", + "version": "6.24.0", "description": "Declarative routing for React Native applications", "keywords": [ "react", diff --git a/packages/react-router/CHANGELOG.md b/packages/react-router/CHANGELOG.md index 580ec7823e..84b6b33fa8 100644 --- a/packages/react-router/CHANGELOG.md +++ b/packages/react-router/CHANGELOG.md @@ -1,18 +1,18 @@ # `react-router` -## 6.24.0-pre.0 +## 6.24.0 ### Minor Changes - Add support for Lazy Route Discovery (a.k.a. Fog of War) ([#11626](https://github.com/remix-run/react-router/pull/11626)) - - RFC: https://github.com/remix-run/react-router/discussions/11113 - - `unstable_patchRoutesOnMiss` docs: https://reactrouter.com/en/main/routers/create-browser-router + - RFC: + - `unstable_patchRoutesOnMiss` docs: ### Patch Changes - Updated dependencies: - - `@remix-run/router@1.17.0-pre.0` + - `@remix-run/router@1.17.0` ## 6.23.1 diff --git a/packages/react-router/package.json b/packages/react-router/package.json index 1a0b256592..021a6a1209 100644 --- a/packages/react-router/package.json +++ b/packages/react-router/package.json @@ -1,6 +1,6 @@ { "name": "react-router", - "version": "6.24.0-pre.0", + "version": "6.24.0", "description": "Declarative routing for React", "keywords": [ "react", diff --git a/packages/router/CHANGELOG.md b/packages/router/CHANGELOG.md index d75f80d5b5..850224768f 100644 --- a/packages/router/CHANGELOG.md +++ b/packages/router/CHANGELOG.md @@ -1,13 +1,13 @@ # `@remix-run/router` -## 1.17.0-pre.0 +## 1.17.0 ### Minor Changes - Add support for Lazy Route Discovery (a.k.a. Fog of War) ([#11626](https://github.com/remix-run/react-router/pull/11626)) - - RFC: https://github.com/remix-run/react-router/discussions/11113 - - `unstable_patchRoutesOnMiss` docs: https://reactrouter.com/en/main/routers/create-browser-router + - RFC: + - `unstable_patchRoutesOnMiss` docs: ## 1.16.1 diff --git a/packages/router/package.json b/packages/router/package.json index 247e8e0b37..b58c4435de 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/router", - "version": "1.17.0-pre.0", + "version": "1.17.0", "description": "Nested/Data-driven/Framework-agnostic Routing", "keywords": [ "remix", From 7a060e420da89fbd2b52d16c53f996e3ffdc18b2 Mon Sep 17 00:00:00 2001 From: Matt Brophy Date: Mon, 24 Jun 2024 14:28:31 -0400 Subject: [PATCH 2/3] Update changelog --- CHANGELOG.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8118274d22..d2e56030d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ We manage release notes in this file instead of the paginated Github Releases Pa - [React Router Releases](#react-router-releases) - [v6.24.0](#v6240) - [What's Changed](#whats-changed) - - [Lazy Route Discovery (a.k.a. Fog of War)](#lazy-route-discovery-aka-fog-of-war) + - [Lazy Route Discovery (a.k.a. "Fog of War")](#lazy-route-discovery-aka-fog-of-war) - [Minor Changes](#minor-changes) - [Patch Changes](#patch-changes) - [v6.23.1](#v6231) @@ -86,7 +86,7 @@ We manage release notes in this file instead of the paginated Github Releases Pa - [Patch Changes](#patch-changes-19) - [v6.13.0](#v6130) - [What's Changed](#whats-changed-8) - - [v7_startTransition](#v7_starttransition) + - [v7\_startTransition](#v7_starttransition) - [Minor Changes](#minor-changes-11) - [Patch Changes](#patch-changes-20) - [v6.12.1](#v6121) @@ -106,7 +106,7 @@ We manage release notes in this file instead of the paginated Github Releases Pa - [v6.10.0](#v6100) - [What's Changed](#whats-changed-10) - [Minor Changes](#minor-changes-14) - - [future.v7_normalizeFormMethod](#futurev7_normalizeformmethod) + - [future.v7\_normalizeFormMethod](#futurev7_normalizeformmethod) - [Patch Changes](#patch-changes-26) - [v6.9.0](#v690) - [What's Changed](#whats-changed-11) @@ -193,15 +193,15 @@ Date: YYYY-MM-DD ## v6.24.0 -Date: 2024-06-18 +Date: 2024-06-24 ### What's Changed -#### Lazy Route Discovery (a.k.a. Fog of War) +#### Lazy Route Discovery (a.k.a. "Fog of War") -We're really excited to release our new API for "Lazy Route Discovery" in v6.24.0! For some background information, please check out the original [RFC](https://github.com/remix-run/react-router/discussions/11113). The tl;dr; is that ever since we introduced the Data APIs in v6.4 via ``, we've been a little bummed that one of the tradeoffs was the lack of a compelling code-splitting story mirroring what we had in the ``/`` apps. We took a baby-step towards improving that story with `route.lazy` in v6.9, but with v6.24 we've gone the rest of the way. +We're really excited to release our new API for "Lazy Route Discovery" in `v6.24.0`! For some background information, please check out the original [RFC](https://github.com/remix-run/react-router/discussions/11113). The **tl;dr;** is that ever since we introduced the Data APIs in v6.4 via ``, we've been a little bummed that one of the tradeoffs was the lack of a compelling code-splitting story mirroring what we had in the ``/`` apps. We took a baby-step towards improving that story with `route.lazy` in `v6.9.0`, but with `v6.24.0` we've gone the rest of the way. -With 6.24, you can now load portions of the route tree lazily via the new `unstable_patchRoutesOnMiss` option passed to `createBrowserRouter` (and it's memory/hash counterparts). This gives you a way to hook into spots where React Router is unable to match a given path and patch new routes into the route tree during the navigation (or fetcher call). +With "Fog of War", you can now load portions of the route tree lazily via the new `unstable_patchRoutesOnMiss` option passed to `createBrowserRouter` (and it's memory/hash counterparts). This gives you a way to hook into spots where React Router is unable to match a given path and patch new routes into the route tree during the navigation (or fetcher call). Here's a very small example, but please refer to the [documentation](https://reactrouter.com/en/main/routers/create-browser-router#unstable_patchroutesonmiss) for more information and use cases: @@ -229,7 +229,7 @@ const router = createBrowserRouter( ### Minor Changes -- Add support for Lazy Route Discovery (a.k.a. Fog of War) ([#11626](https://github.com/remix-run/react-router/pull/11626)) +- Add support for Lazy Route Discovery (a.k.a. "Fog of War") ([#11626](https://github.com/remix-run/react-router/pull/11626)) ### Patch Changes From 5dedfec7e4a2cb7f3a78982d4a46884ab313f9db Mon Sep 17 00:00:00 2001 From: Matt Brophy Date: Mon, 24 Jun 2024 14:32:32 -0400 Subject: [PATCH 3/3] Update docs --- docs/routers/create-browser-router.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/routers/create-browser-router.md b/docs/routers/create-browser-router.md index a4a54e415d..4935a044ca 100644 --- a/docs/routers/create-browser-router.md +++ b/docs/routers/create-browser-router.md @@ -430,7 +430,8 @@ const router = createBrowserRouter( async unstable_patchRoutesOnMiss({ path, patch }) { if (path === "/a") { // Load/patch the `a` route as a child of the route with id `root` - let route = await getARoute(); // { path: 'a', Component: A } + let route = await getARoute(); + // ^ { path: 'a', Component: A } patch("root", [route]); } }, @@ -456,8 +457,9 @@ const router = createBrowserRouter( { async unstable_patchRoutesOnMiss({ path, patch }) { if (path === "/root-sibling") { - // Load/patch the `/sibling` route at the top - let route = await getRootSiblingRoute(); // { path: '/sibling', Component: Sibling } + // Load/patch the `/root-sibling` route as a sibling of the root route + let route = await getRootSiblingRoute(); + // ^ { path: '/root-sibling', Component: RootSibling } patch(null, [route]); } },