diff --git a/.changeset/console-log-loader-error.md b/.changeset/console-log-loader-error.md deleted file mode 100644 index 907f28cc76..0000000000 --- a/.changeset/console-log-loader-error.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router": patch ---- - -Log loader/action errors to the console in dev for easier stack trace evaluation diff --git a/.changeset/descendant-routes-data-errors.md b/.changeset/descendant-routes-data-errors.md deleted file mode 100644 index 0d1949df3c..0000000000 --- a/.changeset/descendant-routes-data-errors.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router": patch ---- - -Fix bug preventing rendering of descendant `` when `RouterProvider` errors existed diff --git a/.changeset/disallow-return-undefined-type.md b/.changeset/disallow-return-undefined-type.md deleted file mode 100644 index b6c446a2dc..0000000000 --- a/.changeset/disallow-return-undefined-type.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remix-run/router": patch ---- - -Enhance `LoaderFunction`/`ActionFunction` return type to prevent `undefined` from being a valid return value diff --git a/.changeset/fetcher-404.md b/.changeset/fetcher-404.md deleted file mode 100644 index ce885ca279..0000000000 --- a/.changeset/fetcher-404.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remix-run/router": patch ---- - -Ensure proper 404 error on `fetcher.load` call to a route without a `loader` diff --git a/.changeset/fetcher-basename.md b/.changeset/fetcher-basename.md deleted file mode 100644 index 5c6ded420c..0000000000 --- a/.changeset/fetcher-basename.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -"react-router-dom": minor -"@remix-run/router": minor ---- - -- Enable relative routing in the `@remix-run/router` when providing a source route ID from which the path is relative to: - - - Example: `router.navigate("../path", { fromRouteId: "some-route" })`. - - This also applies to `router.fetch` which already receives a source route ID - -- Introduce a new `@remix-run/router` `future.v7_prependBasename` flag to enable `basename` prefixing to all paths coming into `router.navigate` and `router.fetch`. - - Previously the `basename` was prepended in the React Router layer, but now that relative routing is being handled by the router we need prepend the `basename` _after_ resolving any relative paths - - This also enables `basename` support in `useFetcher` as well diff --git a/.changeset/fix-component-rerenders-router.md b/.changeset/fix-component-rerenders-router.md deleted file mode 100644 index ddb74f5a0a..0000000000 --- a/.changeset/fix-component-rerenders-router.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remix-run/router": patch ---- - -Deprecate the `createRouter` `detectErrorBoundary` option in favor of the new `mapRouteProperties` option for converting a framework-agnostic route to a framework-aware route. This allows us to set more than just the `hasErrorBoundary` property during route pre-processing, and is now used for mapping `Component -> element` and `ErrorBoundary -> errorElement` in `react-router`. diff --git a/.changeset/fix-component-rerenders.md b/.changeset/fix-component-rerenders.md deleted file mode 100644 index 1dd8d12ac5..0000000000 --- a/.changeset/fix-component-rerenders.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"react-router": patch -"react-router-dom": patch ---- - -Fix inadvertent re-renders when using `Component` instead of `element` on a route definition diff --git a/.changeset/fix-fetcher-revalidation.md b/.changeset/fix-fetcher-revalidation.md deleted file mode 100644 index c150a2b12b..0000000000 --- a/.changeset/fix-fetcher-revalidation.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remix-run/router": patch ---- - -Fixed a bug where fetchers were incorrectly attempting to revalidate on search params changes or routing to the same URL (using the same logic for route `loader` revalidations). However, since fetchers have a static href, they should only revalidate on `action` submissions or `router.revalidate` calls. diff --git a/.changeset/invalid-link-to.md b/.changeset/invalid-link-to.md deleted file mode 100644 index 309699aaf8..0000000000 --- a/.changeset/invalid-link-to.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router-dom": patch ---- - -Fail gracefully on `` and other invalid URL values diff --git a/.changeset/navigate-in-effect.md b/.changeset/navigate-in-effect.md deleted file mode 100644 index bffcb59964..0000000000 --- a/.changeset/navigate-in-effect.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router": patch ---- - -Fix detection of `useNavigate` in the render cycle by setting the `activeRef` in a layout effect, allowing the `navigate` function to be passed to child components and called in a `useEffect` there. diff --git a/.changeset/pre.json b/.changeset/pre.json deleted file mode 100644 index 6106aafa52..0000000000 --- a/.changeset/pre.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "mode": "exit", - "tag": "pre", - "initialVersions": { - "react-router": "6.10.0", - "react-router-dom": "6.10.0", - "react-router-dom-v5-compat": "6.10.0", - "react-router-native": "6.10.0", - "@remix-run/router": "1.5.0" - }, - "changesets": [ - "console-log-loader-error", - "descendant-routes-data-errors", - "disallow-return-undefined-type", - "fetcher-404", - "fetcher-basename", - "fix-component-rerenders-router", - "fix-component-rerenders", - "fix-fetcher-revalidation", - "invalid-link-to", - "navigate-in-effect", - "remove-use-sync-external-store", - "revalidate-error-boundary", - "revalidating-fetcher-controller", - "silent-stingrays-boil", - "soft-moons-sneeze", - "stable-navigate-submit" - ] -} diff --git a/.changeset/remove-use-sync-external-store.md b/.changeset/remove-use-sync-external-store.md deleted file mode 100644 index 5760c0e4b1..0000000000 --- a/.changeset/remove-use-sync-external-store.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"react-router": patch -"react-router-dom": patch ---- - -Switched from `useSyncExternalStore` to `useState` for internal `@remix-run/router` router state syncing in ``. We found some [subtle bugs](https://codesandbox.io/s/use-sync-external-store-loop-9g7b81) where router state updates got propagated _before_ other normal `useState` updates, which could lead to footguns in `useEffect` calls. diff --git a/.changeset/revalidate-error-boundary.md b/.changeset/revalidate-error-boundary.md deleted file mode 100644 index 77fb52f5cd..0000000000 --- a/.changeset/revalidate-error-boundary.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router": patch ---- - -Allow `useRevalidator()` to resolve a loader-driven error boundary scenario diff --git a/.changeset/revalidating-fetcher-controller.md b/.changeset/revalidating-fetcher-controller.md deleted file mode 100644 index 663eb9b3e3..0000000000 --- a/.changeset/revalidating-fetcher-controller.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remix-run/router": patch ---- - -Decouple `AbortController` usage between revalidating fetchers and the thing that triggered them such that the unmount/deletion of a revalidating fetcher doesn't impact the ongoing triggering navigation/revalidation diff --git a/.changeset/silent-stingrays-boil.md b/.changeset/silent-stingrays-boil.md deleted file mode 100644 index cb0320278e..0000000000 --- a/.changeset/silent-stingrays-boil.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router": patch ---- - -Avoid uneccesary unsubscribe/resubscribes on router state changes diff --git a/.changeset/soft-moons-sneeze.md b/.changeset/soft-moons-sneeze.md deleted file mode 100644 index 9c342862a8..0000000000 --- a/.changeset/soft-moons-sneeze.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router-dom": patch ---- - -Add static prop to `StaticRouterProvider`'s internal `Router` component diff --git a/.changeset/stable-navigate-submit.md b/.changeset/stable-navigate-submit.md deleted file mode 100644 index 3ef42d8254..0000000000 --- a/.changeset/stable-navigate-submit.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"react-router": patch -"react-router-dom": patch ---- - -When using a `RouterProvider`, `useNavigate`/`useSubmit`/`fetcher.submit` are now stable across location changes, since we can handle relative routing via the `@remix-run/router` instance and get rid of our dependence on `useLocation()`. When using `BrowserRouter`, these hooks remain unstable across location changes because they still rely on `useLocation()`. diff --git a/packages/react-router-dom-v5-compat/CHANGELOG.md b/packages/react-router-dom-v5-compat/CHANGELOG.md index 187a042c54..b521e81bd5 100644 --- a/packages/react-router-dom-v5-compat/CHANGELOG.md +++ b/packages/react-router-dom-v5-compat/CHANGELOG.md @@ -1,28 +1,12 @@ # `react-router-dom-v5-compat` -## 6.11.0-pre.2 +## 6.11.0 ### Patch Changes - Updated dependencies: - - `react-router@6.11.0-pre.2` - - `react-router-dom@6.11.0-pre.2` - -## 6.11.0-pre.1 - -### Patch Changes - -- Updated dependencies: - - `react-router-dom@6.11.0-pre.1` - - `react-router@6.11.0-pre.1` - -## 6.11.0-pre.0 - -### Patch Changes - -- Updated dependencies: - - `react-router@6.11.0-pre.0` - - `react-router-dom@6.11.0-pre.0` + - `react-router@6.11.0` + - `react-router-dom@6.11.0` ## 6.10.0 diff --git a/packages/react-router-dom-v5-compat/package.json b/packages/react-router-dom-v5-compat/package.json index 54b1c915b5..2f49ab041b 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.11.0-pre.2", + "version": "6.11.0", "description": "Migration path to React Router v6 from v4/5", "keywords": [ "react", @@ -24,7 +24,7 @@ "types": "./dist/index.d.ts", "dependencies": { "history": "^5.3.0", - "react-router": "6.11.0-pre.2" + "react-router": "6.11.0" }, "peerDependencies": { "react": ">=16.8", diff --git a/packages/react-router-dom/CHANGELOG.md b/packages/react-router-dom/CHANGELOG.md index c3b647e955..5b06df8660 100644 --- a/packages/react-router-dom/CHANGELOG.md +++ b/packages/react-router-dom/CHANGELOG.md @@ -1,42 +1,22 @@ # `react-router-dom` -## 6.11.0-pre.2 - -### Patch Changes - -- Updated dependencies: - - `react-router@6.11.0-pre.2` - -## 6.11.0-pre.1 - -### Patch Changes - -- Add static prop to `StaticRouterProvider`'s internal `Router` component ([#10401](https://github.com/remix-run/react-router/pull/10401)) -- Updated dependencies: - - `react-router@6.11.0-pre.1` - -## 6.11.0-pre.0 +## 6.11.0 ### Minor Changes -- - Enable relative routing in the `@remix-run/router` when providing a source route ID from which the path is relative to: ([#10336](https://github.com/remix-run/react-router/pull/10336)) - - - Example: `router.navigate("../path", { fromRouteId: "some-route" })`. - - This also applies to `router.fetch` which already receives a source route ID - - - Introduce a new `@remix-run/router` `future.v7_prependBasename` flag to enable `basename` prefixing to all paths coming into `router.navigate` and `router.fetch`. - - Previously the `basename` was prepended in the React Router layer, but now that relative routing is being handled by the router we need prepend the `basename` _after_ resolving any relative paths - - This also enables `basename` support in `useFetcher` as well +- Enable `basename` support in `useFetcher` ([#10336](https://github.com/remix-run/react-router/pull/10336)) + - If you were previously working around this issue by manually prepending the `basename` then you will need to remove the manually prepended `basename` from your `fetcher` calls (`fetcher.load('/basename/route') -> fetcher.load('/route')`) ### Patch Changes - Fix inadvertent re-renders when using `Component` instead of `element` on a route definition ([#10287](https://github.com/remix-run/react-router/pull/10287)) - Fail gracefully on `` and other invalid URL values ([#10367](https://github.com/remix-run/react-router/pull/10367)) -- Switched from `useSyncExternalStore` to `useState` for internal `@remix-run/router` router state syncing in ``. We found some [subtle bugs](https://codesandbox.io/s/use-sync-external-store-loop-9g7b81) where router state updates got propagated _before_ other normal `useState` updates, which could lead to footguns in `useEffect` calls. ([#10377](https://github.com/remix-run/react-router/pull/10377)) +- Switched from `useSyncExternalStore` to `useState` for internal `@remix-run/router` router state syncing in ``. We found some [subtle bugs](https://codesandbox.io/s/use-sync-external-store-loop-9g7b81) where router state updates got propagated _before_ other normal `useState` updates, which could lead to footguns in `useEffect` calls. ([#10377](https://github.com/remix-run/react-router/pull/10377), [#10409](https://github.com/remix-run/react-router/pull/10409)) +- Add static prop to `StaticRouterProvider`'s internal `Router` component ([#10401](https://github.com/remix-run/react-router/pull/10401)) - When using a `RouterProvider`, `useNavigate`/`useSubmit`/`fetcher.submit` are now stable across location changes, since we can handle relative routing via the `@remix-run/router` instance and get rid of our dependence on `useLocation()`. When using `BrowserRouter`, these hooks remain unstable across location changes because they still rely on `useLocation()`. ([#10336](https://github.com/remix-run/react-router/pull/10336)) - Updated dependencies: - - `react-router@6.11.0-pre.0` - - `@remix-run/router@1.6.0-pre.0` + - `react-router@6.11.0` + - `@remix-run/router@1.6.0` ## 6.10.0 diff --git a/packages/react-router-dom/package.json b/packages/react-router-dom/package.json index e630574356..59a560fcd4 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.11.0-pre.2", + "version": "6.11.0", "description": "Declarative routing for React web applications", "keywords": [ "react", @@ -23,8 +23,8 @@ "module": "./dist/index.js", "types": "./dist/index.d.ts", "dependencies": { - "@remix-run/router": "1.6.0-pre.0", - "react-router": "6.11.0-pre.2" + "@remix-run/router": "1.6.0", + "react-router": "6.11.0" }, "devDependencies": { "react": "^18.2.0", diff --git a/packages/react-router-native/CHANGELOG.md b/packages/react-router-native/CHANGELOG.md index f59b6c4141..0cfefb0371 100644 --- a/packages/react-router-native/CHANGELOG.md +++ b/packages/react-router-native/CHANGELOG.md @@ -1,25 +1,11 @@ # `react-router-native` -## 6.11.0-pre.2 +## 6.11.0 ### Patch Changes - Updated dependencies: - - `react-router@6.11.0-pre.2` - -## 6.11.0-pre.1 - -### Patch Changes - -- Updated dependencies: - - `react-router@6.11.0-pre.1` - -## 6.11.0-pre.0 - -### Patch Changes - -- Updated dependencies: - - `react-router@6.11.0-pre.0` + - `react-router@6.11.0` ## 6.10.0 diff --git a/packages/react-router-native/package.json b/packages/react-router-native/package.json index 5b407e0227..b8ac1eeef0 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.11.0-pre.2", + "version": "6.11.0", "description": "Declarative routing for React Native applications", "keywords": [ "react", @@ -22,7 +22,7 @@ "types": "./dist/index.d.ts", "dependencies": { "@ungap/url-search-params": "^0.1.4", - "react-router": "6.11.0-pre.2" + "react-router": "6.11.0" }, "devDependencies": { "react": "^18.2.0", diff --git a/packages/react-router/CHANGELOG.md b/packages/react-router/CHANGELOG.md index 371336a1ca..6fb8511f62 100644 --- a/packages/react-router/CHANGELOG.md +++ b/packages/react-router/CHANGELOG.md @@ -1,14 +1,6 @@ # `react-router` -## 6.11.0-pre.2 - -### Patch Changes - -- Avoid uneccesary unsubscribe/resubscribes on router state changes ([#10409](https://github.com/remix-run/react-router/pull/10409)) - -## 6.11.0-pre.1 - -## 6.11.0-pre.0 +## 6.11.0 ### Patch Changes @@ -16,11 +8,12 @@ - Fix bug preventing rendering of descendant `` when `RouterProvider` errors existed ([#10374](https://github.com/remix-run/react-router/pull/10374)) - Fix inadvertent re-renders when using `Component` instead of `element` on a route definition ([#10287](https://github.com/remix-run/react-router/pull/10287)) - Fix detection of `useNavigate` in the render cycle by setting the `activeRef` in a layout effect, allowing the `navigate` function to be passed to child components and called in a `useEffect` there. ([#10394](https://github.com/remix-run/react-router/pull/10394)) -- Switched from `useSyncExternalStore` to `useState` for internal `@remix-run/router` router state syncing in ``. We found some [subtle bugs](https://codesandbox.io/s/use-sync-external-store-loop-9g7b81) where router state updates got propagated _before_ other normal `useState` updates, which could lead to footguns in `useEffect` calls. ([#10377](https://github.com/remix-run/react-router/pull/10377)) +- Switched from `useSyncExternalStore` to `useState` for internal `@remix-run/router` router state syncing in ``. We found some [subtle bugs](https://codesandbox.io/s/use-sync-external-store-loop-9g7b81) where router state updates got propagated _before_ other normal `useState` updates, which could lead to footguns in `useEffect` calls. ([#10377](https://github.com/remix-run/react-router/pull/10377), [#10409](https://github.com/remix-run/react-router/pull/10409)) - Allow `useRevalidator()` to resolve a loader-driven error boundary scenario ([#10369](https://github.com/remix-run/react-router/pull/10369)) +- Avoid unnecessary unsubscribe/resubscribes on router state changes ([#10409](https://github.com/remix-run/react-router/pull/10409)) - When using a `RouterProvider`, `useNavigate`/`useSubmit`/`fetcher.submit` are now stable across location changes, since we can handle relative routing via the `@remix-run/router` instance and get rid of our dependence on `useLocation()`. When using `BrowserRouter`, these hooks remain unstable across location changes because they still rely on `useLocation()`. ([#10336](https://github.com/remix-run/react-router/pull/10336)) - Updated dependencies: - - `@remix-run/router@1.6.0-pre.0` + - `@remix-run/router@1.6.0` ## 6.10.0 diff --git a/packages/react-router/package.json b/packages/react-router/package.json index 79d8887851..c822c3b6a4 100644 --- a/packages/react-router/package.json +++ b/packages/react-router/package.json @@ -1,6 +1,6 @@ { "name": "react-router", - "version": "6.11.0-pre.2", + "version": "6.11.0", "description": "Declarative routing for React", "keywords": [ "react", @@ -23,7 +23,7 @@ "module": "./dist/index.js", "types": "./dist/index.d.ts", "dependencies": { - "@remix-run/router": "1.6.0-pre.0" + "@remix-run/router": "1.6.0" }, "devDependencies": { "react": "^18.2.0" diff --git a/packages/router/CHANGELOG.md b/packages/router/CHANGELOG.md index 019c923653..8d182c203e 100644 --- a/packages/router/CHANGELOG.md +++ b/packages/router/CHANGELOG.md @@ -1,17 +1,18 @@ # `@remix-run/router` -## 1.6.0-pre.0 +## 1.6.0 ### Minor Changes -- - Enable relative routing in the `@remix-run/router` when providing a source route ID from which the path is relative to: ([#10336](https://github.com/remix-run/react-router/pull/10336)) +- Enable relative routing in the `@remix-run/router` when providing a source route ID from which the path is relative to: ([#10336](https://github.com/remix-run/react-router/pull/10336)) - - Example: `router.navigate("../path", { fromRouteId: "some-route" })`. - - This also applies to `router.fetch` which already receives a source route ID + - Example: `router.navigate("../path", { fromRouteId: "some-route" })`. + - This also applies to `router.fetch` which already receives a source route ID - - Introduce a new `@remix-run/router` `future.v7_prependBasename` flag to enable `basename` prefixing to all paths coming into `router.navigate` and `router.fetch`. - - Previously the `basename` was prepended in the React Router layer, but now that relative routing is being handled by the router we need prepend the `basename` _after_ resolving any relative paths - - This also enables `basename` support in `useFetcher` as well +- Introduce a new `@remix-run/router` `future.v7_prependBasename` flag to enable `basename` prefixing to all paths coming into `router.navigate` and `router.fetch`. + + - Previously the `basename` was prepended in the React Router layer, but now that relative routing is being handled by the router we need prepend the `basename` _after_ resolving any relative paths + - This also enables `basename` support in `useFetcher` as well ### Patch Changes diff --git a/packages/router/package.json b/packages/router/package.json index 54d7951d2a..a2ba2e01bf 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/router", - "version": "1.6.0-pre.0", + "version": "1.6.0", "description": "Nested/Data-driven/Framework-agnostic Routing", "keywords": [ "remix",