From e1b29c8a5251074e2c9dac12e942555eca2b83f2 Mon Sep 17 00:00:00 2001 From: Matt Brophy Date: Thu, 30 Jan 2025 11:27:24 -0500 Subject: [PATCH 01/10] fix release script to use v6 tag --- scripts/changesets-release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/changesets-release.sh b/scripts/changesets-release.sh index 2f88225d3b..607e85f98c 100755 --- a/scripts/changesets-release.sh +++ b/scripts/changesets-release.sh @@ -4,7 +4,7 @@ MODE=$(node -e "console.log(require('./.changeset/pre.json').mode)") # Can only provide a custom --tag when not in prerelease mode # The prerelease tags come from the pre.json "tag" field -if [ $MODE == "exit" ]; then +if [ "${MODE}" == "exit" ]; then pnpm exec changeset publish --tag v6 else pnpm exec changeset publish From d9ed8241d677de006a9bfe808d32fe4582184dad Mon Sep 17 00:00:00 2001 From: Matt Brophy Date: Thu, 30 Jan 2025 12:27:04 -0500 Subject: [PATCH 02/10] Fix up changelogs --- .../react-router-dom-v5-compat/CHANGELOG.md | 26 ---------------- packages/react-router-dom/CHANGELOG.md | 30 ------------------- packages/react-router-native/CHANGELOG.md | 21 ------------- packages/react-router/CHANGELOG.md | 28 ----------------- packages/router/CHANGELOG.md | 20 ------------- scripts/remove-prerelease-changelogs.mjs | 2 +- 6 files changed, 1 insertion(+), 126 deletions(-) diff --git a/packages/react-router-dom-v5-compat/CHANGELOG.md b/packages/react-router-dom-v5-compat/CHANGELOG.md index 61ae6f0775..74aba07639 100644 --- a/packages/react-router-dom-v5-compat/CHANGELOG.md +++ b/packages/react-router-dom-v5-compat/CHANGELOG.md @@ -9,32 +9,6 @@ - `react-router@6.29.0` - `@remix-run/router@1.22.0` -## 6.29.0-pre-v6.2 - -### Patch Changes - -- Updated dependencies: - - `@remix-run/router@1.22.0-pre-v6.1` - - `react-router@6.29.0-pre-v6.2` - - `react-router-dom@6.29.0-pre-v6.2` - -## 6.28.3-pre-v6.1 - -### Patch Changes - -- Updated dependencies: - - `react-router@6.28.3-pre-v6.1` - - `react-router-dom@6.28.3-pre-v6.1` - -## 6.28.3-pre-v6.0 - -### Patch Changes - -- Updated dependencies: - - `react-router-dom@6.28.3-pre-v6.0` - - `react-router@6.28.3-pre-v6.0` - - `@remix-run/router@1.21.2-pre-v6.0` - ## 6.28.2 ### Patch Changes diff --git a/packages/react-router-dom/CHANGELOG.md b/packages/react-router-dom/CHANGELOG.md index d5ecccbf2c..4bc3eaec0e 100644 --- a/packages/react-router-dom/CHANGELOG.md +++ b/packages/react-router-dom/CHANGELOG.md @@ -15,36 +15,6 @@ - `react-router@6.29.0` - `@remix-run/router@1.22.0` -## 6.29.0-pre-v6.2 - -### Minor Changes - -- Provide the request `signal` as a parameter to `patchRoutesOnNavigation` ([#12900](https://github.com/remix-run/react-router/pull/12900)) - - - This can be used to abort any manifest fetches if the in-flight navigation/fetcher is aborted - -### Patch Changes - -- Updated dependencies: - - `@remix-run/router@1.22.0-pre-v6.1` - - `react-router@6.29.0-pre-v6.2` - -## 6.28.3-pre-v6.1 - -### Patch Changes - -- Updated dependencies: - - `react-router@6.28.3-pre-v6.1` - -## 6.28.3-pre-v6.0 - -### Patch Changes - -- Do not log v7 deprecation warnings in production builds ([#12794](https://github.com/remix-run/react-router/pull/12794)) -- Updated dependencies: - - `react-router@6.28.3-pre-v6.0` - - `@remix-run/router@1.21.2-pre-v6.0` - ## 6.28.2 ### Patch Changes diff --git a/packages/react-router-native/CHANGELOG.md b/packages/react-router-native/CHANGELOG.md index 615f234b37..5b0425ab14 100644 --- a/packages/react-router-native/CHANGELOG.md +++ b/packages/react-router-native/CHANGELOG.md @@ -7,27 +7,6 @@ - Updated dependencies: - `react-router@6.29.0` -## 6.29.0-pre-v6.2 - -### Patch Changes - -- Updated dependencies: - - `react-router@6.29.0-pre-v6.2` - -## 6.28.3-pre-v6.1 - -### Patch Changes - -- Updated dependencies: - - `react-router@6.28.3-pre-v6.1` - -## 6.28.3-pre-v6.0 - -### Patch Changes - -- Updated dependencies: - - `react-router@6.28.3-pre-v6.0` - ## 6.28.2 ### Patch Changes diff --git a/packages/react-router/CHANGELOG.md b/packages/react-router/CHANGELOG.md index 27c3629dd6..6d7c108245 100644 --- a/packages/react-router/CHANGELOG.md +++ b/packages/react-router/CHANGELOG.md @@ -16,34 +16,6 @@ - Updated dependencies: - `@remix-run/router@1.22.0` -## 6.29.0-pre-v6.2 - -### Minor Changes - -- Provide the request `signal` as a parameter to `patchRoutesOnNavigation` ([#12900](https://github.com/remix-run/react-router/pull/12900)) - - - This can be used to abort any manifest fetches if the in-flight navigation/fetcher is aborted - -### Patch Changes - -- Updated dependencies: - - `@remix-run/router@1.22.0-pre-v6.1` - -## 6.28.3-pre-v6.1 - -### Patch Changes - -- Limit matchRoutes optimization to client side routers ([#12881](https://github.com/remix-run/react-router/pull/12881)) - -## 6.28.3-pre-v6.0 - -### Patch Changes - -- Do not log v7 deprecation warnings in production builds ([#12794](https://github.com/remix-run/react-router/pull/12794)) -- Optimize route matching by skipping redundant `matchRoutes` calls when possible ([#12169](https://github.com/remix-run/react-router/pull/12169)) -- Updated dependencies: - - `@remix-run/router@1.21.2-pre-v6.0` - ## 6.28.2 ### Patch Changes diff --git a/packages/router/CHANGELOG.md b/packages/router/CHANGELOG.md index d00955bee6..b32af0b5bc 100644 --- a/packages/router/CHANGELOG.md +++ b/packages/router/CHANGELOG.md @@ -15,26 +15,6 @@ - Properly bubble headers when throwing a `data()` result ([#12845](https://github.com/remix-run/react-router/pull/12845)) - Optimize route matching by skipping redundant `matchRoutes` calls when possible ([#12169](https://github.com/remix-run/react-router/pull/12169)) -## 1.22.0-pre-v6.1 - -### Minor Changes - -- Provide the request `signal` as a parameter to `patchRoutesOnNavigation` ([#12900](https://github.com/remix-run/react-router/pull/12900)) - - - This can be used to abort any manifest fetches if the in-flight navigation/fetcher is aborted - -### Patch Changes - -- Strip search parameters from `patchRoutesOnNavigation` `path` param for fetcher calls ([#12899](https://github.com/remix-run/react-router/pull/12899)) - -## 1.21.2-pre-v6.0 - -### Patch Changes - -- Do not log v7 deprecation warnings in production builds ([#12794](https://github.com/remix-run/react-router/pull/12794)) -- Properly bubble headers when throwing a `data()` result ([#12845](https://github.com/remix-run/react-router/pull/12845)) -- Optimize route matching by skipping redundant `matchRoutes` calls when possible ([#12169](https://github.com/remix-run/react-router/pull/12169)) - ## 1.21.1 ### Patch Changes diff --git a/scripts/remove-prerelease-changelogs.mjs b/scripts/remove-prerelease-changelogs.mjs index 61e658ed0a..997262701e 100644 --- a/scripts/remove-prerelease-changelogs.mjs +++ b/scripts/remove-prerelease-changelogs.mjs @@ -110,7 +110,7 @@ function removePreReleaseSectionFromMarkdown() { * @returns */ function isPrereleaseVersion(str) { - return /^(v?\d+\.){2}\d+-[a-z]+\.\d+$/i.test(str.trim()); + return /^v?\d+\.\d+\.\d+-pre(-v6)?\.\d+$/i.test(str.trim()); } function isPrereleaseMode() { From b39b749e2f1d2379ed6e937a4d39d340bf99b7fb Mon Sep 17 00:00:00 2001 From: Matt Brophy Date: Tue, 25 Feb 2025 09:43:16 -0500 Subject: [PATCH 03/10] Add playground/ to clean-v7-artifacts.sh --- scripts/clean-v7-artifacts.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/clean-v7-artifacts.sh b/scripts/clean-v7-artifacts.sh index 8477d847b1..a8af044da9 100755 --- a/scripts/clean-v7-artifacts.sh +++ b/scripts/clean-v7-artifacts.sh @@ -18,6 +18,7 @@ rm -rf packages/react-router-remix-routes-option-adapter/ rm -rf packages/react-router-serve/ rm -rf packages/react-router/.wireit/ rm -rf integration/ +rm -rf playground/ rm -rf playground-local/ set +x From 4f930367cd66f4c48a5dff9b77bda93314f4c958 Mon Sep 17 00:00:00 2001 From: Matt Brophy Date: Tue, 25 Feb 2025 10:03:54 -0500 Subject: [PATCH 04/10] Fix hash issue for matchRoutes optimization (#13108) --- .changeset/witty-birds-fetch.md | 5 +++ packages/router/__tests__/navigation-test.ts | 43 +++++++++++++++++++- packages/router/router.ts | 33 +++++++-------- 3 files changed, 64 insertions(+), 17 deletions(-) create mode 100644 .changeset/witty-birds-fetch.md diff --git a/.changeset/witty-birds-fetch.md b/.changeset/witty-birds-fetch.md new file mode 100644 index 0000000000..26506cb773 --- /dev/null +++ b/.changeset/witty-birds-fetch.md @@ -0,0 +1,5 @@ +--- +"@remix-run/router": patch +--- + +Fix regression introduced in `6.29.0` via [#12169](https://github.com/remix-run/react-router/pull/12169) that caused issues navigating to hash routes inside splat routes for applications using Lazy Route Discovery (`patchRoutesOnNavigation`) diff --git a/packages/router/__tests__/navigation-test.ts b/packages/router/__tests__/navigation-test.ts index 5ae18d5115..0441cd63e3 100644 --- a/packages/router/__tests__/navigation-test.ts +++ b/packages/router/__tests__/navigation-test.ts @@ -1,5 +1,5 @@ import type { HydrationState } from "../index"; -import { json } from "../index"; +import { createMemoryHistory, createRouter, json } from "../index"; import { cleanup, setup } from "./utils/data-router-setup"; import { createFormData } from "./utils/utils"; @@ -434,6 +434,47 @@ describe("navigations", () => { }); }); + it("does not use fog of war partial matches for hash change only navigations", async () => { + let router = createRouter({ + history: createMemoryHistory(), + routes: [ + { + path: "/", + children: [ + { + path: "*", + }, + ], + }, + ], + // This is what enables the partialMatches logic + patchRoutesOnNavigation: () => {}, + }).initialize(); + expect(router.state.location).toMatchObject({ + pathname: "/", + hash: "", + }); + expect(router.state.matches).toMatchObject([{ route: { path: "/" } }]); + await router.navigate("/foo"); + expect(router.state.location).toMatchObject({ + pathname: "/foo", + hash: "", + }); + expect(router.state.matches).toMatchObject([ + { route: { path: "/" } }, + { route: { path: "*" } }, + ]); + await router.navigate("/foo#bar"); + expect(router.state.location).toMatchObject({ + pathname: "/foo", + hash: "#bar", + }); + expect(router.state.matches).toMatchObject([ + { route: { path: "/" } }, + { route: { path: "*" } }, + ]); + }); + it("redirects from loaders (throw)", async () => { let t = initializeTest(); diff --git a/packages/router/router.ts b/packages/router/router.ts index 933c283dca..ccdecb215e 100644 --- a/packages/router/router.ts +++ b/packages/router/router.ts @@ -1534,6 +1534,23 @@ export function createRouter(init: RouterInit): Router { : matchRoutes(routesToUse, location, basename); let flushSync = (opts && opts.flushSync) === true; + // Short circuit if it's only a hash change and not a revalidation or + // mutation submission. + // + // Ignore on initial page loads because since the initial hydration will always + // be "same hash". For example, on /page#hash and submit a
+ // which will default to a navigation to /page + if ( + matches && + state.initialized && + !isRevalidationRequired && + isHashChangeOnly(state.location, location) && + !(opts && opts.submission && isMutationMethod(opts.submission.formMethod)) + ) { + completeNavigation(location, { matches }, { flushSync }); + return; + } + let fogOfWar = checkFogOfWar(matches, routesToUse, location.pathname); if (fogOfWar.active && fogOfWar.matches) { matches = fogOfWar.matches; @@ -1558,22 +1575,6 @@ export function createRouter(init: RouterInit): Router { return; } - // Short circuit if it's only a hash change and not a revalidation or - // mutation submission. - // - // Ignore on initial page loads because since the initial hydration will always - // be "same hash". For example, on /page#hash and submit a - // which will default to a navigation to /page - if ( - state.initialized && - !isRevalidationRequired && - isHashChangeOnly(state.location, location) && - !(opts && opts.submission && isMutationMethod(opts.submission.formMethod)) - ) { - completeNavigation(location, { matches }, { flushSync }); - return; - } - // Create a controller/Request for this navigation pendingNavigationController = new AbortController(); let request = createClientSideRequest( From 2585e54ecf98185fb07dfd1abd1b2da6effd3eb4 Mon Sep 17 00:00:00 2001 From: Matt Brophy Date: Tue, 25 Feb 2025 10:04:07 -0500 Subject: [PATCH 05/10] Add fetcherKey as parameter to patchRoutesOnNavigation (#13109) --- .changeset/tokyo-manifest-drift.md | 7 +++++++ packages/router/router.ts | 10 +++++++--- packages/router/utils.ts | 1 + 3 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 .changeset/tokyo-manifest-drift.md diff --git a/.changeset/tokyo-manifest-drift.md b/.changeset/tokyo-manifest-drift.md new file mode 100644 index 0000000000..7b7f17be9f --- /dev/null +++ b/.changeset/tokyo-manifest-drift.md @@ -0,0 +1,7 @@ +--- +"@remix-run/router": minor +"react-router": minor +"react-router-dom": minor +--- + +Add `fetcherKey` as a parameter to `patchRoutesOnNavigation` diff --git a/packages/router/router.ts b/packages/router/router.ts index ccdecb215e..5bcadfc78d 100644 --- a/packages/router/router.ts +++ b/packages/router/router.ts @@ -2266,7 +2266,8 @@ export function createRouter(init: RouterInit): Router { let discoverResult = await discoverRoutes( requestMatches, new URL(fetchRequest.url).pathname, - fetchRequest.signal + fetchRequest.signal, + key ); if (discoverResult.type === "aborted") { @@ -2558,7 +2559,8 @@ export function createRouter(init: RouterInit): Router { let discoverResult = await discoverRoutes( matches, new URL(fetchRequest.url).pathname, - fetchRequest.signal + fetchRequest.signal, + key ); if (discoverResult.type === "aborted") { @@ -3281,7 +3283,8 @@ export function createRouter(init: RouterInit): Router { async function discoverRoutes( matches: AgnosticDataRouteMatch[], pathname: string, - signal: AbortSignal + signal: AbortSignal, + fetcherKey?: string ): Promise { if (!patchRoutesOnNavigationImpl) { return { type: "success", matches }; @@ -3297,6 +3300,7 @@ export function createRouter(init: RouterInit): Router { signal, path: pathname, matches: partialMatches, + fetcherKey, patch: (routeId, children) => { if (signal.aborted) return; patchRoutesImpl( diff --git a/packages/router/utils.ts b/packages/router/utils.ts index e9a0ba9e43..8e2a8f33f0 100644 --- a/packages/router/utils.ts +++ b/packages/router/utils.ts @@ -262,6 +262,7 @@ export type AgnosticPatchRoutesOnNavigationFunctionArgs< signal: AbortSignal; path: string; matches: M[]; + fetcherKey: string | undefined; patch: (routeId: string | null, children: O[]) => void; }; From 2e18cafcab9c0dbb37bde365178301dff915282e Mon Sep 17 00:00:00 2001 From: Matt Brophy Date: Tue, 25 Feb 2025 10:17:31 -0500 Subject: [PATCH 06/10] Enter prerelease mode --- .changeset/pre.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .changeset/pre.json diff --git a/.changeset/pre.json b/.changeset/pre.json new file mode 100644 index 0000000000..e3fa68aa1b --- /dev/null +++ b/.changeset/pre.json @@ -0,0 +1,12 @@ +{ + "mode": "pre", + "tag": "pre-v6", + "initialVersions": { + "react-router": "6.29.0", + "react-router-dom": "6.29.0", + "react-router-dom-v5-compat": "6.29.0", + "react-router-native": "6.29.0", + "@remix-run/router": "1.22.0" + }, + "changesets": [] +} From f0bc784ce8951cc5ed67bf6d48d9c132b9bdc621 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 25 Feb 2025 10:33:10 -0500 Subject: [PATCH 07/10] chore: Update version for release (pre-v6) (#13111) * chore: Update version for release (pre-v6) * Add logging to release script --------- Co-authored-by: github-actions[bot] Co-authored-by: Matt Brophy --- .changeset/pre.json | 5 ++++- packages/react-router-dom-v5-compat/CHANGELOG.md | 9 +++++++++ packages/react-router-dom-v5-compat/package.json | 2 +- packages/react-router-dom/CHANGELOG.md | 12 ++++++++++++ packages/react-router-dom/package.json | 2 +- packages/react-router-native/CHANGELOG.md | 7 +++++++ packages/react-router-native/package.json | 2 +- packages/react-router/CHANGELOG.md | 11 +++++++++++ packages/react-router/package.json | 2 +- packages/router/CHANGELOG.md | 10 ++++++++++ packages/router/package.json | 2 +- scripts/changesets-release.sh | 2 ++ 12 files changed, 60 insertions(+), 6 deletions(-) diff --git a/.changeset/pre.json b/.changeset/pre.json index e3fa68aa1b..10fc120735 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -8,5 +8,8 @@ "react-router-native": "6.29.0", "@remix-run/router": "1.22.0" }, - "changesets": [] + "changesets": [ + "tokyo-manifest-drift", + "witty-birds-fetch" + ] } diff --git a/packages/react-router-dom-v5-compat/CHANGELOG.md b/packages/react-router-dom-v5-compat/CHANGELOG.md index 74aba07639..60ce3fccec 100644 --- a/packages/react-router-dom-v5-compat/CHANGELOG.md +++ b/packages/react-router-dom-v5-compat/CHANGELOG.md @@ -1,5 +1,14 @@ # `react-router-dom-v5-compat` +## 6.30.0-pre-v6.0 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/router@1.23.0-pre-v6.0` + - `react-router@6.30.0-pre-v6.0` + - `react-router-dom@6.30.0-pre-v6.0` + ## 6.29.0 ### Patch Changes diff --git a/packages/react-router-dom-v5-compat/package.json b/packages/react-router-dom-v5-compat/package.json index c39392ca62..97459a2630 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.29.0", + "version": "6.30.0-pre-v6.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 4bc3eaec0e..9b7a6d49f8 100644 --- a/packages/react-router-dom/CHANGELOG.md +++ b/packages/react-router-dom/CHANGELOG.md @@ -1,5 +1,17 @@ # `react-router-dom` +## 6.30.0-pre-v6.0 + +### Minor Changes + +- Add `fetcherKey` as a parameter to `patchRoutesOnNavigation` ([#13109](https://github.com/remix-run/react-router/pull/13109)) + +### Patch Changes + +- Updated dependencies: + - `@remix-run/router@1.23.0-pre-v6.0` + - `react-router@6.30.0-pre-v6.0` + ## 6.29.0 ### Minor Changes diff --git a/packages/react-router-dom/package.json b/packages/react-router-dom/package.json index 689aed1ca2..206e6ecf68 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.29.0", + "version": "6.30.0-pre-v6.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 5b0425ab14..daf071d2e2 100644 --- a/packages/react-router-native/CHANGELOG.md +++ b/packages/react-router-native/CHANGELOG.md @@ -1,5 +1,12 @@ # `react-router-native` +## 6.30.0-pre-v6.0 + +### Patch Changes + +- Updated dependencies: + - `react-router@6.30.0-pre-v6.0` + ## 6.29.0 ### Patch Changes diff --git a/packages/react-router-native/package.json b/packages/react-router-native/package.json index f850bbc3a5..70f234a29c 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.29.0", + "version": "6.30.0-pre-v6.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 6d7c108245..e5718ef92f 100644 --- a/packages/react-router/CHANGELOG.md +++ b/packages/react-router/CHANGELOG.md @@ -1,5 +1,16 @@ # `react-router` +## 6.30.0-pre-v6.0 + +### Minor Changes + +- Add `fetcherKey` as a parameter to `patchRoutesOnNavigation` ([#13109](https://github.com/remix-run/react-router/pull/13109)) + +### Patch Changes + +- Updated dependencies: + - `@remix-run/router@1.23.0-pre-v6.0` + ## 6.29.0 ### Minor Changes diff --git a/packages/react-router/package.json b/packages/react-router/package.json index 32b823d719..f729f2a6ad 100644 --- a/packages/react-router/package.json +++ b/packages/react-router/package.json @@ -1,6 +1,6 @@ { "name": "react-router", - "version": "6.29.0", + "version": "6.30.0-pre-v6.0", "description": "Declarative routing for React", "keywords": [ "react", diff --git a/packages/router/CHANGELOG.md b/packages/router/CHANGELOG.md index b32af0b5bc..4f01952773 100644 --- a/packages/router/CHANGELOG.md +++ b/packages/router/CHANGELOG.md @@ -1,5 +1,15 @@ # `@remix-run/router` +## 1.23.0-pre-v6.0 + +### Minor Changes + +- Add `fetcherKey` as a parameter to `patchRoutesOnNavigation` ([#13109](https://github.com/remix-run/react-router/pull/13109)) + +### Patch Changes + +- Fix regression introduced in `6.29.0` via [#12169](https://github.com/remix-run/react-router/pull/12169) that caused issues navigating to hash routes inside splat routes for applications using Lazy Route Discovery (`patchRoutesOnNavigation`) ([#13108](https://github.com/remix-run/react-router/pull/13108)) + ## 1.22.0 ### Minor Changes diff --git a/packages/router/package.json b/packages/router/package.json index 981c8373bf..c6ca62b79f 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/router", - "version": "1.22.0", + "version": "1.23.0-pre-v6.0", "description": "Nested/Data-driven/Framework-agnostic Routing", "keywords": [ "remix", diff --git a/scripts/changesets-release.sh b/scripts/changesets-release.sh index 607e85f98c..ec85891a83 100755 --- a/scripts/changesets-release.sh +++ b/scripts/changesets-release.sh @@ -5,7 +5,9 @@ MODE=$(node -e "console.log(require('./.changeset/pre.json').mode)") # Can only provide a custom --tag when not in prerelease mode # The prerelease tags come from the pre.json "tag" field if [ "${MODE}" == "exit" ]; then + echo "Publishing with v6 tag (stable release)" pnpm exec changeset publish --tag v6 else + echo "Publishing with default changesets tag (pre-release)" pnpm exec changeset publish fi From 8d29b29ea5e56a716be710a8b255964ec4145791 Mon Sep 17 00:00:00 2001 From: Matt Brophy Date: Thu, 27 Feb 2025 10:03:14 -0500 Subject: [PATCH 08/10] Release notes --- CHANGELOG.md | 185 +++++++++++++++++++--------------- scripts/clean-v7-artifacts.sh | 1 + 2 files changed, 102 insertions(+), 84 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea4d6ac93f..de08d367e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,193 +13,196 @@ We manage release notes in this file instead of the paginated Github Releases Pa Table of Contents - [React Router Releases](#react-router-releases) - - [v6.29.0](#v6290) + - [v6.30.0](#v6300) - [Minor Changes](#minor-changes) - [Patch Changes](#patch-changes) - - [v6.28.2](#v6282) + - [v6.29.0](#v6290) + - [Minor Changes](#minor-changes-1) - [Patch Changes](#patch-changes-1) - - [v6.28.1](#v6281) + - [v6.28.2](#v6282) - [Patch Changes](#patch-changes-2) + - [v6.28.1](#v6281) + - [Patch Changes](#patch-changes-3) - [v6.28.0](#v6280) - [What's Changed](#whats-changed) - - [Minor Changes](#minor-changes-1) - - [Patch Changes](#patch-changes-3) + - [Minor Changes](#minor-changes-2) + - [Patch Changes](#patch-changes-4) - [v6.27.0](#v6270) - [What's Changed](#whats-changed-1) - [Stabilized APIs](#stabilized-apis) - - [Minor Changes](#minor-changes-2) - - [Patch Changes](#patch-changes-4) - - [v6.26.2](#v6262) + - [Minor Changes](#minor-changes-3) - [Patch Changes](#patch-changes-5) - - [v6.26.1](#v6261) + - [v6.26.2](#v6262) - [Patch Changes](#patch-changes-6) - - [v6.26.0](#v6260) - - [Minor Changes](#minor-changes-3) + - [v6.26.1](#v6261) - [Patch Changes](#patch-changes-7) - - [v6.25.1](#v6251) + - [v6.26.0](#v6260) + - [Minor Changes](#minor-changes-4) - [Patch Changes](#patch-changes-8) + - [v6.25.1](#v6251) + - [Patch Changes](#patch-changes-9) - [v6.25.0](#v6250) - [What's Changed](#whats-changed-2) - [Stabilized `v7_skipActionErrorRevalidation`](#stabilized-v7_skipactionerrorrevalidation) - - [Minor Changes](#minor-changes-4) - - [Patch Changes](#patch-changes-9) - - [v6.24.1](#v6241) + - [Minor Changes](#minor-changes-5) - [Patch Changes](#patch-changes-10) + - [v6.24.1](#v6241) + - [Patch Changes](#patch-changes-11) - [v6.24.0](#v6240) - [What's Changed](#whats-changed-3) - [Lazy Route Discovery (a.k.a. "Fog of War")](#lazy-route-discovery-aka-fog-of-war) - - [Minor Changes](#minor-changes-5) - - [Patch Changes](#patch-changes-11) - - [v6.23.1](#v6231) + - [Minor Changes](#minor-changes-6) - [Patch Changes](#patch-changes-12) + - [v6.23.1](#v6231) + - [Patch Changes](#patch-changes-13) - [v6.23.0](#v6230) - [What's Changed](#whats-changed-4) - [Data Strategy (unstable)](#data-strategy-unstable) - [Skip Action Error Revalidation (unstable)](#skip-action-error-revalidation-unstable) - - [Minor Changes](#minor-changes-6) + - [Minor Changes](#minor-changes-7) - [v6.22.3](#v6223) - - [Patch Changes](#patch-changes-13) - - [v6.22.2](#v6222) - [Patch Changes](#patch-changes-14) - - [v6.22.1](#v6221) + - [v6.22.2](#v6222) - [Patch Changes](#patch-changes-15) + - [v6.22.1](#v6221) + - [Patch Changes](#patch-changes-16) - [v6.22.0](#v6220) - [What's Changed](#whats-changed-5) - [Core Web Vitals Technology Report Flag](#core-web-vitals-technology-report-flag) - - [Minor Changes](#minor-changes-7) - - [Patch Changes](#patch-changes-16) - - [v6.21.3](#v6213) + - [Minor Changes](#minor-changes-8) - [Patch Changes](#patch-changes-17) - - [v6.21.2](#v6212) + - [v6.21.3](#v6213) - [Patch Changes](#patch-changes-18) - - [v6.21.1](#v6211) + - [v6.21.2](#v6212) - [Patch Changes](#patch-changes-19) + - [v6.21.1](#v6211) + - [Patch Changes](#patch-changes-20) - [v6.21.0](#v6210) - [What's Changed](#whats-changed-6) - [`future.v7_relativeSplatPath`](#futurev7_relativesplatpath) - [Partial Hydration](#partial-hydration) - - [Minor Changes](#minor-changes-8) - - [Patch Changes](#patch-changes-20) - - [v6.20.1](#v6201) - - [Patch Changes](#patch-changes-21) - - [v6.20.0](#v6200) - [Minor Changes](#minor-changes-9) + - [Patch Changes](#patch-changes-21) + - [v6.20.1](#v6201) - [Patch Changes](#patch-changes-22) + - [v6.20.0](#v6200) + - [Minor Changes](#minor-changes-10) + - [Patch Changes](#patch-changes-23) - [v6.19.0](#v6190) - [What's Changed](#whats-changed-7) - [`unstable_flushSync` API](#unstable_flushsync-api) - - [Minor Changes](#minor-changes-10) - - [Patch Changes](#patch-changes-23) + - [Minor Changes](#minor-changes-11) + - [Patch Changes](#patch-changes-24) - [v6.18.0](#v6180) - [What's Changed](#whats-changed-8) - [New Fetcher APIs](#new-fetcher-apis) - [Persistence Future Flag (`future.v7_fetcherPersist`)](#persistence-future-flag-futurev7_fetcherpersist) - - [Minor Changes](#minor-changes-11) - - [Patch Changes](#patch-changes-24) + - [Minor Changes](#minor-changes-12) + - [Patch Changes](#patch-changes-25) - [v6.17.0](#v6170) - [What's Changed](#whats-changed-9) - [View Transitions 🚀](#view-transitions-) - - [Minor Changes](#minor-changes-12) - - [Patch Changes](#patch-changes-25) - - [v6.16.0](#v6160) - [Minor Changes](#minor-changes-13) - [Patch Changes](#patch-changes-26) - - [v6.15.0](#v6150) + - [v6.16.0](#v6160) - [Minor Changes](#minor-changes-14) - [Patch Changes](#patch-changes-27) - - [v6.14.2](#v6142) + - [v6.15.0](#v6150) + - [Minor Changes](#minor-changes-15) - [Patch Changes](#patch-changes-28) - - [v6.14.1](#v6141) + - [v6.14.2](#v6142) - [Patch Changes](#patch-changes-29) + - [v6.14.1](#v6141) + - [Patch Changes](#patch-changes-30) - [v6.14.0](#v6140) - [What's Changed](#whats-changed-10) - [JSON/Text Submissions](#jsontext-submissions) - - [Minor Changes](#minor-changes-15) - - [Patch Changes](#patch-changes-30) + - [Minor Changes](#minor-changes-16) + - [Patch Changes](#patch-changes-31) - [v6.13.0](#v6130) - [What's Changed](#whats-changed-11) - [`future.v7_startTransition`](#futurev7_starttransition) - - [Minor Changes](#minor-changes-16) - - [Patch Changes](#patch-changes-31) - - [v6.12.1](#v6121) + - [Minor Changes](#minor-changes-17) - [Patch Changes](#patch-changes-32) + - [v6.12.1](#v6121) + - [Patch Changes](#patch-changes-33) - [v6.12.0](#v6120) - [What's Changed](#whats-changed-12) - [`React.startTransition` support](#reactstarttransition-support) - - [Minor Changes](#minor-changes-17) - - [Patch Changes](#patch-changes-33) - - [v6.11.2](#v6112) + - [Minor Changes](#minor-changes-18) - [Patch Changes](#patch-changes-34) - - [v6.11.1](#v6111) + - [v6.11.2](#v6112) - [Patch Changes](#patch-changes-35) - - [v6.11.0](#v6110) - - [Minor Changes](#minor-changes-18) + - [v6.11.1](#v6111) - [Patch Changes](#patch-changes-36) + - [v6.11.0](#v6110) + - [Minor Changes](#minor-changes-19) + - [Patch Changes](#patch-changes-37) - [v6.10.0](#v6100) - [What's Changed](#whats-changed-13) - - [Minor Changes](#minor-changes-19) + - [Minor Changes](#minor-changes-20) - [`future.v7_normalizeFormMethod`](#futurev7_normalizeformmethod) - - [Patch Changes](#patch-changes-37) + - [Patch Changes](#patch-changes-38) - [v6.9.0](#v690) - [What's Changed](#whats-changed-14) - [`Component`/`ErrorBoundary` route properties](#componenterrorboundary-route-properties) - [Introducing Lazy Route Modules](#introducing-lazy-route-modules) - - [Minor Changes](#minor-changes-20) - - [Patch Changes](#patch-changes-38) - - [v6.8.2](#v682) + - [Minor Changes](#minor-changes-21) - [Patch Changes](#patch-changes-39) - - [v6.8.1](#v681) + - [v6.8.2](#v682) - [Patch Changes](#patch-changes-40) - - [v6.8.0](#v680) - - [Minor Changes](#minor-changes-21) + - [v6.8.1](#v681) - [Patch Changes](#patch-changes-41) - - [v6.7.0](#v670) + - [v6.8.0](#v680) - [Minor Changes](#minor-changes-22) - [Patch Changes](#patch-changes-42) - - [v6.6.2](#v662) + - [v6.7.0](#v670) + - [Minor Changes](#minor-changes-23) - [Patch Changes](#patch-changes-43) - - [v6.6.1](#v661) + - [v6.6.2](#v662) - [Patch Changes](#patch-changes-44) + - [v6.6.1](#v661) + - [Patch Changes](#patch-changes-45) - [v6.6.0](#v660) - [What's Changed](#whats-changed-15) - - [Minor Changes](#minor-changes-23) - - [Patch Changes](#patch-changes-45) - - [v6.5.0](#v650) - - [What's Changed](#whats-changed-16) - [Minor Changes](#minor-changes-24) - [Patch Changes](#patch-changes-46) - - [v6.4.5](#v645) + - [v6.5.0](#v650) + - [What's Changed](#whats-changed-16) + - [Minor Changes](#minor-changes-25) - [Patch Changes](#patch-changes-47) - - [v6.4.4](#v644) + - [v6.4.5](#v645) - [Patch Changes](#patch-changes-48) - - [v6.4.3](#v643) + - [v6.4.4](#v644) - [Patch Changes](#patch-changes-49) - - [v6.4.2](#v642) + - [v6.4.3](#v643) - [Patch Changes](#patch-changes-50) - - [v6.4.1](#v641) + - [v6.4.2](#v642) - [Patch Changes](#patch-changes-51) + - [v6.4.1](#v641) + - [Patch Changes](#patch-changes-52) - [v6.4.0](#v640) - [What's Changed](#whats-changed-17) - [Remix Data APIs](#remix-data-apis) - - [Patch Changes](#patch-changes-52) + - [Patch Changes](#patch-changes-53) - [v6.3.0](#v630) - - [Minor Changes](#minor-changes-25) + - [Minor Changes](#minor-changes-26) - [v6.2.2](#v622) - - [Patch Changes](#patch-changes-53) - - [v6.2.1](#v621) - [Patch Changes](#patch-changes-54) - - [v6.2.0](#v620) - - [Minor Changes](#minor-changes-26) + - [v6.2.1](#v621) - [Patch Changes](#patch-changes-55) - - [v6.1.1](#v611) - - [Patch Changes](#patch-changes-56) - - [v6.1.0](#v610) + - [v6.2.0](#v620) - [Minor Changes](#minor-changes-27) + - [Patch Changes](#patch-changes-56) + - [v6.1.1](#v611) - [Patch Changes](#patch-changes-57) - - [v6.0.2](#v602) + - [v6.1.0](#v610) + - [Minor Changes](#minor-changes-28) - [Patch Changes](#patch-changes-58) - - [v6.0.1](#v601) + - [v6.0.2](#v602) - [Patch Changes](#patch-changes-59) + - [v6.0.1](#v601) + - [Patch Changes](#patch-changes-60) - [v6.0.0](#v600) @@ -223,6 +226,20 @@ 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.30.0 + +Date: 2025-02-27 + +### Minor Changes + +- Add `fetcherKey` as a parameter to `patchRoutesOnNavigation` ([#13109](https://github.com/remix-run/react-router/pull/13109)) + +### Patch Changes + +- Fix regression introduced in `6.29.0` via [#12169](https://github.com/remix-run/react-router/pull/12169) that caused issues navigating to hash routes inside splat routes for applications using Lazy Route Discovery (`patchRoutesOnNavigation`) ([#13108](https://github.com/remix-run/react-router/pull/13108)) + +**Full Changelog**: [`v6.29.0...v6.30.0`](https://github.com/remix-run/react-router/compare/react-router@6.29.0...react-router@6.30.0) + ## v6.29.0 Date: 2025-01-30 diff --git a/scripts/clean-v7-artifacts.sh b/scripts/clean-v7-artifacts.sh index a8af044da9..f297110ceb 100755 --- a/scripts/clean-v7-artifacts.sh +++ b/scripts/clean-v7-artifacts.sh @@ -20,6 +20,7 @@ rm -rf packages/react-router/.wireit/ rm -rf integration/ rm -rf playground/ rm -rf playground-local/ +rm -rf public/dev/ # v7 API docs set +x echo "Installing and building..." From 9ec0566f9a23944fa648ba91b020b6f9314a0231 Mon Sep 17 00:00:00 2001 From: Matt Brophy Date: Thu, 27 Feb 2025 10:55:33 -0500 Subject: [PATCH 09/10] Exit prerelease mode --- .changeset/pre.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/pre.json b/.changeset/pre.json index 10fc120735..94072e23ce 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -1,5 +1,5 @@ { - "mode": "pre", + "mode": "exit", "tag": "pre-v6", "initialVersions": { "react-router": "6.29.0", From e4ba5224c911e070b1eabd12cff2aa581270dfb3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 11:05:04 -0500 Subject: [PATCH 10/10] chore: Update version for release (#13128) Co-authored-by: github-actions[bot] --- .changeset/pre.json | 15 --------------- .changeset/tokyo-manifest-drift.md | 7 ------- .changeset/witty-birds-fetch.md | 5 ----- packages/react-router-dom-v5-compat/CHANGELOG.md | 8 ++++---- packages/react-router-dom-v5-compat/package.json | 2 +- packages/react-router-dom/CHANGELOG.md | 6 +++--- 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 | 4 ++-- packages/react-router/package.json | 2 +- packages/router/CHANGELOG.md | 2 +- packages/router/package.json | 2 +- 13 files changed, 17 insertions(+), 44 deletions(-) delete mode 100644 .changeset/pre.json delete mode 100644 .changeset/tokyo-manifest-drift.md delete mode 100644 .changeset/witty-birds-fetch.md diff --git a/.changeset/pre.json b/.changeset/pre.json deleted file mode 100644 index 94072e23ce..0000000000 --- a/.changeset/pre.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "mode": "exit", - "tag": "pre-v6", - "initialVersions": { - "react-router": "6.29.0", - "react-router-dom": "6.29.0", - "react-router-dom-v5-compat": "6.29.0", - "react-router-native": "6.29.0", - "@remix-run/router": "1.22.0" - }, - "changesets": [ - "tokyo-manifest-drift", - "witty-birds-fetch" - ] -} diff --git a/.changeset/tokyo-manifest-drift.md b/.changeset/tokyo-manifest-drift.md deleted file mode 100644 index 7b7f17be9f..0000000000 --- a/.changeset/tokyo-manifest-drift.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@remix-run/router": minor -"react-router": minor -"react-router-dom": minor ---- - -Add `fetcherKey` as a parameter to `patchRoutesOnNavigation` diff --git a/.changeset/witty-birds-fetch.md b/.changeset/witty-birds-fetch.md deleted file mode 100644 index 26506cb773..0000000000 --- a/.changeset/witty-birds-fetch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remix-run/router": patch ---- - -Fix regression introduced in `6.29.0` via [#12169](https://github.com/remix-run/react-router/pull/12169) that caused issues navigating to hash routes inside splat routes for applications using Lazy Route Discovery (`patchRoutesOnNavigation`) diff --git a/packages/react-router-dom-v5-compat/CHANGELOG.md b/packages/react-router-dom-v5-compat/CHANGELOG.md index 60ce3fccec..447942328d 100644 --- a/packages/react-router-dom-v5-compat/CHANGELOG.md +++ b/packages/react-router-dom-v5-compat/CHANGELOG.md @@ -1,13 +1,13 @@ # `react-router-dom-v5-compat` -## 6.30.0-pre-v6.0 +## 6.30.0 ### Patch Changes - Updated dependencies: - - `@remix-run/router@1.23.0-pre-v6.0` - - `react-router@6.30.0-pre-v6.0` - - `react-router-dom@6.30.0-pre-v6.0` + - `@remix-run/router@1.23.0` + - `react-router@6.30.0` + - `react-router-dom@6.30.0` ## 6.29.0 diff --git a/packages/react-router-dom-v5-compat/package.json b/packages/react-router-dom-v5-compat/package.json index 97459a2630..2c259e573b 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.30.0-pre-v6.0", + "version": "6.30.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 9b7a6d49f8..75993ea135 100644 --- a/packages/react-router-dom/CHANGELOG.md +++ b/packages/react-router-dom/CHANGELOG.md @@ -1,6 +1,6 @@ # `react-router-dom` -## 6.30.0-pre-v6.0 +## 6.30.0 ### Minor Changes @@ -9,8 +9,8 @@ ### Patch Changes - Updated dependencies: - - `@remix-run/router@1.23.0-pre-v6.0` - - `react-router@6.30.0-pre-v6.0` + - `@remix-run/router@1.23.0` + - `react-router@6.30.0` ## 6.29.0 diff --git a/packages/react-router-dom/package.json b/packages/react-router-dom/package.json index 206e6ecf68..d760e8d988 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.30.0-pre-v6.0", + "version": "6.30.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 daf071d2e2..60db2406ae 100644 --- a/packages/react-router-native/CHANGELOG.md +++ b/packages/react-router-native/CHANGELOG.md @@ -1,11 +1,11 @@ # `react-router-native` -## 6.30.0-pre-v6.0 +## 6.30.0 ### Patch Changes - Updated dependencies: - - `react-router@6.30.0-pre-v6.0` + - `react-router@6.30.0` ## 6.29.0 diff --git a/packages/react-router-native/package.json b/packages/react-router-native/package.json index 70f234a29c..d58a346119 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.30.0-pre-v6.0", + "version": "6.30.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 e5718ef92f..3857b3e135 100644 --- a/packages/react-router/CHANGELOG.md +++ b/packages/react-router/CHANGELOG.md @@ -1,6 +1,6 @@ # `react-router` -## 6.30.0-pre-v6.0 +## 6.30.0 ### Minor Changes @@ -9,7 +9,7 @@ ### Patch Changes - Updated dependencies: - - `@remix-run/router@1.23.0-pre-v6.0` + - `@remix-run/router@1.23.0` ## 6.29.0 diff --git a/packages/react-router/package.json b/packages/react-router/package.json index f729f2a6ad..447141ca2c 100644 --- a/packages/react-router/package.json +++ b/packages/react-router/package.json @@ -1,6 +1,6 @@ { "name": "react-router", - "version": "6.30.0-pre-v6.0", + "version": "6.30.0", "description": "Declarative routing for React", "keywords": [ "react", diff --git a/packages/router/CHANGELOG.md b/packages/router/CHANGELOG.md index 4f01952773..9e2c69ad2c 100644 --- a/packages/router/CHANGELOG.md +++ b/packages/router/CHANGELOG.md @@ -1,6 +1,6 @@ # `@remix-run/router` -## 1.23.0-pre-v6.0 +## 1.23.0 ### Minor Changes diff --git a/packages/router/package.json b/packages/router/package.json index c6ca62b79f..09dc908596 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/router", - "version": "1.23.0-pre-v6.0", + "version": "1.23.0", "description": "Nested/Data-driven/Framework-agnostic Routing", "keywords": [ "remix",