From 4ec107a69b2c6b2ea7482a5a5138c035ce0ab8c2 Mon Sep 17 00:00:00 2001 From: Logan McAnsh Date: Fri, 10 Mar 2023 09:53:21 -0500 Subject: [PATCH] chore: Update version for release (#10185) --- .changeset/compat-data-router-exports.md | 5 -- .changeset/component-and-error-boundary.md | 42 ------------- .changeset/fix-generate-path.md | 6 -- .changeset/improve-context-memoization.md | 5 -- .changeset/lazy-route-modules.md | 63 ------------------- .changeset/pre.json | 18 ------ .../react-router-dom-v5-compat/CHANGELOG.md | 11 ++-- .../react-router-dom-v5-compat/package.json | 4 +- packages/react-router-dom/CHANGELOG.md | 8 +-- packages/react-router-dom/package.json | 6 +- packages/react-router-native/CHANGELOG.md | 6 +- packages/react-router-native/package.json | 4 +- packages/react-router/CHANGELOG.md | 7 ++- packages/react-router/package.json | 4 +- packages/router/CHANGELOG.md | 2 +- packages/router/package.json | 2 +- 16 files changed, 28 insertions(+), 165 deletions(-) delete mode 100644 .changeset/compat-data-router-exports.md delete mode 100644 .changeset/component-and-error-boundary.md delete mode 100644 .changeset/fix-generate-path.md delete mode 100644 .changeset/improve-context-memoization.md delete mode 100644 .changeset/lazy-route-modules.md delete mode 100644 .changeset/pre.json diff --git a/.changeset/compat-data-router-exports.md b/.changeset/compat-data-router-exports.md deleted file mode 100644 index a7509a9323..0000000000 --- a/.changeset/compat-data-router-exports.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router-dom-v5-compat": patch ---- - -Add missed data router API re-exports diff --git a/.changeset/component-and-error-boundary.md b/.changeset/component-and-error-boundary.md deleted file mode 100644 index 8f85e98e79..0000000000 --- a/.changeset/component-and-error-boundary.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -"react-router": minor -"react-router-dom": minor ---- - -React Router now supports an alternative way to define your route `element` and `errorElement` fields as React Components instead of React Elements. You can instead pass a React Component to the new `Component` and `ErrorBoundary` fields if you choose. There is no functional difference between the two, so use whichever approach you prefer 😀. You shouldn't be defining both, but if you do `Component`/`ErrorBoundary` will "win". - -**Example JSON Syntax** - -```jsx -// Both of these work the same: -const elementRoutes = [{ - path: '/', - element: , - errorElement: , -}] - -const componentRoutes = [{ - path: '/', - Component: Home, - ErrorBoundary: HomeError, -}] - -function Home() { ... } -function HomeError() { ... } -``` - -**Example JSX Syntax** - -```jsx -// Both of these work the same: -const elementRoutes = createRoutesFromElements( - } errorElement={ } /> -); - -const componentRoutes = createRoutesFromElements( - -); - -function Home() { ... } -function HomeError() { ... } -``` diff --git a/.changeset/fix-generate-path.md b/.changeset/fix-generate-path.md deleted file mode 100644 index 1728d6dcf8..0000000000 --- a/.changeset/fix-generate-path.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@remix-run/router": patch -"react-router": patch ---- - -Fix `generatePath` incorrectly applying parameters in some cases diff --git a/.changeset/improve-context-memoization.md b/.changeset/improve-context-memoization.md deleted file mode 100644 index d351a371c3..0000000000 --- a/.changeset/improve-context-memoization.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router": patch ---- - -Improve memoization for context providers to avoid unnecessary re-renders diff --git a/.changeset/lazy-route-modules.md b/.changeset/lazy-route-modules.md deleted file mode 100644 index 67deeafaa8..0000000000 --- a/.changeset/lazy-route-modules.md +++ /dev/null @@ -1,63 +0,0 @@ ---- -"react-router": minor -"react-router-dom": minor -"@remix-run/router": minor ---- - -**Introducing Lazy Route Modules!** - -In order to keep your application bundles small and support code-splitting of your routes, we've introduced a new `lazy()` route property. This is an async function that resolves the non-route-matching portions of your route definition (`loader`, `action`, `element`/`Component`, `errorElement`/`ErrorBoundary`, `shouldRevalidate`, `handle`). - -Lazy routes are resolved on initial load and during the `loading` or `submitting` phase of a navigation or fetcher call. You cannot lazily define route-matching properties (`path`, `index`, `children`) since we only execute your lazy route functions after we've matched known routes. - -Your `lazy` functions will typically return the result of a dynamic import. - -```jsx -// In this example, we assume most folks land on the homepage so we include that -// in our critical-path bundle, but then we lazily load modules for /a and /b so -// they don't load until the user navigates to those routes -let routes = createRoutesFromElements( - }> - } /> - import("./a")} /> - import("./b")} /> - -); -``` - -Then in your lazy route modules, export the properties you want defined for the route: - -```jsx -export async function loader({ request }) { - let data = await fetchData(request); - return json(data); -} - -// Export a `Component` directly instead of needing to create a React Element from it -export function Component() { - let data = useLoaderData(); - - return ( - <> -

You made it!

-

{data}

- - ); -} - -// Export an `ErrorBoundary` directly instead of needing to create a React Element from it -export function ErrorBoundary() { - let error = useRouteError(); - return isRouteErrorResponse(error) ? ( -

- {error.status} {error.statusText} -

- ) : ( -

{error.message || error}

- ); -} -``` - -An example of this in action can be found in the [`examples/lazy-loading-router-provider`](https://github.com/remix-run/react-router/tree/main/examples/lazy-loading-router-provider) directory of the repository. - -🙌 Huge thanks to @rossipedia for the [Initial Proposal](https://github.com/remix-run/react-router/discussions/9826) and [POC Implementation](https://github.com/remix-run/react-router/pull/9830). diff --git a/.changeset/pre.json b/.changeset/pre.json deleted file mode 100644 index d9c8d4cf9d..0000000000 --- a/.changeset/pre.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "mode": "exit", - "tag": "pre", - "initialVersions": { - "react-router": "6.8.2", - "react-router-dom": "6.8.2", - "react-router-dom-v5-compat": "6.8.2", - "react-router-native": "6.8.2", - "@remix-run/router": "1.3.3" - }, - "changesets": [ - "compat-data-router-exports", - "component-and-error-boundary", - "fix-generate-path", - "improve-context-memoization", - "lazy-route-modules" - ] -} diff --git a/packages/react-router-dom-v5-compat/CHANGELOG.md b/packages/react-router-dom-v5-compat/CHANGELOG.md index c51052efca..ffd61436ad 100644 --- a/packages/react-router-dom-v5-compat/CHANGELOG.md +++ b/packages/react-router-dom-v5-compat/CHANGELOG.md @@ -1,13 +1,16 @@ # `react-router-dom-v5-compat` -## 6.9.0-pre.0 +## 6.9.0 + +### Minor Changes + +- Updated dependencies: + - `react-router@6.9.0` + - `react-router-dom@6.9.0` ### Patch Changes - Add missed data router API re-exports ([#10171](https://github.com/remix-run/react-router/pull/10171)) -- Updated dependencies: - - `react-router@6.9.0-pre.0` - - `react-router-dom@6.9.0-pre.0` ## 6.8.2 diff --git a/packages/react-router-dom-v5-compat/package.json b/packages/react-router-dom-v5-compat/package.json index b9fa50aa3c..aaa7d44c4e 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.9.0-pre.0", + "version": "6.9.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.9.0-pre.0" + "react-router": "6.9.0" }, "peerDependencies": { "react": ">=16.8", diff --git a/packages/react-router-dom/CHANGELOG.md b/packages/react-router-dom/CHANGELOG.md index 4100e6c476..516b60eeeb 100644 --- a/packages/react-router-dom/CHANGELOG.md +++ b/packages/react-router-dom/CHANGELOG.md @@ -1,6 +1,6 @@ # `react-router-dom` -## 6.9.0-pre.0 +## 6.9.0 ### Minor Changes @@ -100,11 +100,9 @@ 🙌 Huge thanks to @rossipedia for the [Initial Proposal](https://github.com/remix-run/react-router/discussions/9826) and [POC Implementation](https://github.com/remix-run/react-router/pull/9830). -### Patch Changes - - Updated dependencies: - - `react-router@6.9.0-pre.0` - - `@remix-run/router@1.4.0-pre.0` + - `react-router@6.9.0` + - `@remix-run/router@1.4.0` ## 6.8.2 diff --git a/packages/react-router-dom/package.json b/packages/react-router-dom/package.json index 72af4f9143..6f85f3d8be 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.9.0-pre.0", + "version": "6.9.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.4.0-pre.0", - "react-router": "6.9.0-pre.0" + "@remix-run/router": "1.4.0", + "react-router": "6.9.0" }, "devDependencies": { "react": "^18.2.0", diff --git a/packages/react-router-native/CHANGELOG.md b/packages/react-router-native/CHANGELOG.md index 9d1ced4f47..28e162cbeb 100644 --- a/packages/react-router-native/CHANGELOG.md +++ b/packages/react-router-native/CHANGELOG.md @@ -1,11 +1,11 @@ # `react-router-native` -## 6.9.0-pre.0 +## 6.9.0 -### Patch Changes +### Minor Changes - Updated dependencies: - - `react-router@6.9.0-pre.0` + - `react-router@6.9.0` ## 6.8.2 diff --git a/packages/react-router-native/package.json b/packages/react-router-native/package.json index a4f6097926..98090f0d72 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.9.0-pre.0", + "version": "6.9.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.9.0-pre.0" + "react-router": "6.9.0" }, "devDependencies": { "react": "^18.2.0", diff --git a/packages/react-router/CHANGELOG.md b/packages/react-router/CHANGELOG.md index beb555256d..0ecb794246 100644 --- a/packages/react-router/CHANGELOG.md +++ b/packages/react-router/CHANGELOG.md @@ -1,6 +1,6 @@ # `react-router` -## 6.9.0-pre.0 +## 6.9.0 ### Minor Changes @@ -100,12 +100,13 @@ 🙌 Huge thanks to @rossipedia for the [Initial Proposal](https://github.com/remix-run/react-router/discussions/9826) and [POC Implementation](https://github.com/remix-run/react-router/pull/9830). +- Updated dependencies: + - `@remix-run/router@1.4.0` + ### Patch Changes - Fix `generatePath` incorrectly applying parameters in some cases ([`bc6fefa1`](https://github.com/remix-run/react-router/commit/bc6fefa19019ce9f5250c8b5af9b8c5d3390e9d1)) - Improve memoization for context providers to avoid unnecessary re-renders ([`bc6fefa1`](https://github.com/remix-run/react-router/commit/bc6fefa19019ce9f5250c8b5af9b8c5d3390e9d1)) -- Updated dependencies: - - `@remix-run/router@1.4.0-pre.0` ## 6.8.2 diff --git a/packages/react-router/package.json b/packages/react-router/package.json index 989e21b37a..91ee522311 100644 --- a/packages/react-router/package.json +++ b/packages/react-router/package.json @@ -1,6 +1,6 @@ { "name": "react-router", - "version": "6.9.0-pre.0", + "version": "6.9.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.4.0-pre.0" + "@remix-run/router": "1.4.0" }, "devDependencies": { "react": "^18.2.0" diff --git a/packages/router/CHANGELOG.md b/packages/router/CHANGELOG.md index 2bdb2006f5..ece0089c6b 100644 --- a/packages/router/CHANGELOG.md +++ b/packages/router/CHANGELOG.md @@ -1,6 +1,6 @@ # `@remix-run/router` -## 1.4.0-pre.0 +## 1.4.0 ### Minor Changes diff --git a/packages/router/package.json b/packages/router/package.json index 884e3ce169..9d40452755 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/router", - "version": "1.4.0-pre.0", + "version": "1.4.0", "description": "Nested/Data-driven/Framework-agnostic Routing", "keywords": [ "remix",