From 0668fcaa80f82c640a9780e24d416a27c638d045 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 22 Nov 2024 06:28:58 +0000 Subject: [PATCH 1/2] chore: Update version for release --- .changeset/angry-papayas-flow.md | 15 - .changeset/calm-frogs-tie.md | 5 - .changeset/chilled-masks-search.md | 12 - .changeset/collapse-packages.md | 8 - .changeset/create-remix-router.md | 5 - .changeset/curvy-teachers-explain.md | 10 - .changeset/drop-node-16.md | 5 - .changeset/early-beds-obey.md | 6 - .changeset/eighty-boats-vanish.md | 5 - .changeset/eighty-dolls-juggle.md | 5 - .changeset/empty-glasses-dream.md | 5 - .changeset/expose-promises.md | 10 - .changeset/fair-beans-design.md | 5 - .changeset/fair-cheetahs-hope.md | 6 - .changeset/fast-plums-peel.md | 22 -- .changeset/few-stingrays-explain.md | 5 - .changeset/five-cheetahs-press.md | 5 - .changeset/fluffy-ducks-try.md | 5 - .changeset/four-needles-search.md | 6 - .changeset/fuzzy-worms-applaud.md | 5 - .changeset/gold-suns-march.md | 36 --- .changeset/kind-mirrors-hang.md | 6 - .changeset/kind-timers-refuse.md | 10 - .changeset/late-buckets-turn.md | 6 - .changeset/lemon-files-care.md | 5 - .changeset/link-prefetching.md | 5 - .changeset/little-cooks-pull.md | 5 - .changeset/long-peas-doubt.md | 15 - .changeset/moody-kids-count.md | 6 - .changeset/nice-pillows-hunt.md | 10 - .changeset/nine-peas-change.md | 6 - .changeset/nine-ravens-work.md | 10 - .changeset/odd-beds-behave.md | 5 - .changeset/pre.json | 95 ------- .changeset/prerendering.md | 26 -- .changeset/purple-poems-laugh.md | 5 - .changeset/rare-plums-chew.md | 8 - .changeset/red-feet-shop.md | 7 - .changeset/red-olives-compare.md | 6 - .changeset/remix-scroll-restoration.md | 5 - .changeset/remove-build-end-public-path.md | 5 - .changeset/remove-manifest-option.md | 25 -- .changeset/remove-prefetchpagedescriptor.md | 5 - .changeset/route-component-export-props.md | 13 - .changeset/router-provider-hydration.md | 5 - .changeset/serious-beds-approve.md | 5 - .changeset/serious-ravens-appear.md | 5 - .changeset/shiny-cameras-try.md | 6 - .changeset/silly-papayas-trade.md | 5 - .changeset/silver-cats-shave.md | 5 - .changeset/sour-cycles-lie.md | 11 - .changeset/strange-jeans-give.md | 7 - .changeset/stupid-days-heal.md | 13 - .changeset/tall-mangos-add.md | 5 - .changeset/tasty-penguins-live.md | 11 - .changeset/thin-nails-turn.md | 5 - .changeset/three-seals-play.md | 5 - .changeset/tidy-clouds-lay.md | 5 - .changeset/tidy-pens-help.md | 10 - .changeset/tough-pens-brush.md | 10 - .changeset/twelve-bees-sin.md | 5 - .changeset/twelve-cheetahs-pretend.md | 8 - .changeset/twenty-carrots-yawn.md | 5 - .changeset/two-countries-yell.md | 5 - .changeset/typesafety.md | 39 --- .changeset/violet-beds-swim.md | 5 - .changeset/vite-manifest-location.md | 7 - .changeset/warm-melons-shop.md | 5 - .changeset/weak-goats-cross.md | 12 - .changeset/weak-otters-dance.md | 6 - .changeset/wet-actors-act.md | 5 - packages/create-react-router/CHANGELOG.md | 4 +- packages/create-react-router/package.json | 2 +- packages/react-router-architect/CHANGELOG.md | 54 +--- packages/react-router-architect/package.json | 2 +- packages/react-router-cloudflare/CHANGELOG.md | 46 +-- packages/react-router-cloudflare/package.json | 2 +- packages/react-router-dev/CHANGELOG.md | 258 +++-------------- packages/react-router-dev/package.json | 2 +- packages/react-router-dom/CHANGELOG.md | 60 +--- packages/react-router-dom/package.json | 2 +- packages/react-router-express/CHANGELOG.md | 65 +---- packages/react-router-express/package.json | 2 +- packages/react-router-fs-routes/CHANGELOG.md | 46 +-- packages/react-router-fs-routes/package.json | 2 +- packages/react-router-node/CHANGELOG.md | 63 +---- packages/react-router-node/package.json | 2 +- .../CHANGELOG.md | 46 +-- .../package.json | 2 +- packages/react-router-serve/CHANGELOG.md | 69 +---- packages/react-router-serve/package.json | 2 +- packages/react-router/CHANGELOG.md | 267 ++++++------------ packages/react-router/package.json | 2 +- 93 files changed, 187 insertions(+), 1503 deletions(-) delete mode 100644 .changeset/angry-papayas-flow.md delete mode 100644 .changeset/calm-frogs-tie.md delete mode 100644 .changeset/chilled-masks-search.md delete mode 100644 .changeset/collapse-packages.md delete mode 100644 .changeset/create-remix-router.md delete mode 100644 .changeset/curvy-teachers-explain.md delete mode 100644 .changeset/drop-node-16.md delete mode 100644 .changeset/early-beds-obey.md delete mode 100644 .changeset/eighty-boats-vanish.md delete mode 100644 .changeset/eighty-dolls-juggle.md delete mode 100644 .changeset/empty-glasses-dream.md delete mode 100644 .changeset/expose-promises.md delete mode 100644 .changeset/fair-beans-design.md delete mode 100644 .changeset/fair-cheetahs-hope.md delete mode 100644 .changeset/fast-plums-peel.md delete mode 100644 .changeset/few-stingrays-explain.md delete mode 100644 .changeset/five-cheetahs-press.md delete mode 100644 .changeset/fluffy-ducks-try.md delete mode 100644 .changeset/four-needles-search.md delete mode 100644 .changeset/fuzzy-worms-applaud.md delete mode 100644 .changeset/gold-suns-march.md delete mode 100644 .changeset/kind-mirrors-hang.md delete mode 100644 .changeset/kind-timers-refuse.md delete mode 100644 .changeset/late-buckets-turn.md delete mode 100644 .changeset/lemon-files-care.md delete mode 100644 .changeset/link-prefetching.md delete mode 100644 .changeset/little-cooks-pull.md delete mode 100644 .changeset/long-peas-doubt.md delete mode 100644 .changeset/moody-kids-count.md delete mode 100644 .changeset/nice-pillows-hunt.md delete mode 100644 .changeset/nine-peas-change.md delete mode 100644 .changeset/nine-ravens-work.md delete mode 100644 .changeset/odd-beds-behave.md delete mode 100644 .changeset/pre.json delete mode 100644 .changeset/prerendering.md delete mode 100644 .changeset/purple-poems-laugh.md delete mode 100644 .changeset/rare-plums-chew.md delete mode 100644 .changeset/red-feet-shop.md delete mode 100644 .changeset/red-olives-compare.md delete mode 100644 .changeset/remix-scroll-restoration.md delete mode 100644 .changeset/remove-build-end-public-path.md delete mode 100644 .changeset/remove-manifest-option.md delete mode 100644 .changeset/remove-prefetchpagedescriptor.md delete mode 100644 .changeset/route-component-export-props.md delete mode 100644 .changeset/router-provider-hydration.md delete mode 100644 .changeset/serious-beds-approve.md delete mode 100644 .changeset/serious-ravens-appear.md delete mode 100644 .changeset/shiny-cameras-try.md delete mode 100644 .changeset/silly-papayas-trade.md delete mode 100644 .changeset/silver-cats-shave.md delete mode 100644 .changeset/sour-cycles-lie.md delete mode 100644 .changeset/strange-jeans-give.md delete mode 100644 .changeset/stupid-days-heal.md delete mode 100644 .changeset/tall-mangos-add.md delete mode 100644 .changeset/tasty-penguins-live.md delete mode 100644 .changeset/thin-nails-turn.md delete mode 100644 .changeset/three-seals-play.md delete mode 100644 .changeset/tidy-clouds-lay.md delete mode 100644 .changeset/tidy-pens-help.md delete mode 100644 .changeset/tough-pens-brush.md delete mode 100644 .changeset/twelve-bees-sin.md delete mode 100644 .changeset/twelve-cheetahs-pretend.md delete mode 100644 .changeset/twenty-carrots-yawn.md delete mode 100644 .changeset/two-countries-yell.md delete mode 100644 .changeset/typesafety.md delete mode 100644 .changeset/violet-beds-swim.md delete mode 100644 .changeset/vite-manifest-location.md delete mode 100644 .changeset/warm-melons-shop.md delete mode 100644 .changeset/weak-goats-cross.md delete mode 100644 .changeset/weak-otters-dance.md delete mode 100644 .changeset/wet-actors-act.md diff --git a/.changeset/angry-papayas-flow.md b/.changeset/angry-papayas-flow.md deleted file mode 100644 index d7b586ecd9..0000000000 --- a/.changeset/angry-papayas-flow.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -"@react-router/dev": major ---- - -For Remix consumers migrating to React Router, the `vitePlugin` and `cloudflareDevProxyVitePlugin` exports have been renamed and moved. - -```diff --import { -- vitePlugin as remix, -- cloudflareDevProxyVitePlugin, --} from "@remix/dev"; - -+import { reactRouter } from "@react-router/dev/vite"; -+import { cloudflareDevProxy } from "@react-router/dev/vite/cloudflare"; -``` diff --git a/.changeset/calm-frogs-tie.md b/.changeset/calm-frogs-tie.md deleted file mode 100644 index f7f7b34b94..0000000000 --- a/.changeset/calm-frogs-tie.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@react-router/cloudflare": major ---- - -For Remix consumers migrating to React Router, all exports from `@remix-run/cloudflare-pages` are now provided for React Router consumers in the `@react-router/cloudflare` package. There is no longer a separate package for Cloudflare Pages. diff --git a/.changeset/chilled-masks-search.md b/.changeset/chilled-masks-search.md deleted file mode 100644 index 2dfd04cf76..0000000000 --- a/.changeset/chilled-masks-search.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -"react-router-dom": major -"react-router": major ---- - -Remove the original `defer` implementation in favor of using raw promises via single fetch and `turbo-stream`. This removes these exports from React Router: - -- `defer` -- `AbortedDeferredError` -- `type TypedDeferredData` -- `UNSAFE_DeferredData` -- `UNSAFE_DEFERRED_SYMBOL`, diff --git a/.changeset/collapse-packages.md b/.changeset/collapse-packages.md deleted file mode 100644 index 0903b92255..0000000000 --- a/.changeset/collapse-packages.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"react-router": major ---- - -- Collapse `@remix-run/router` into `react-router` -- Collapse `react-router-dom` into `react-router` -- Collapse `@remix-run/server-runtime` into `react-router` -- Collapse `@remix-run/testing` into `react-router` diff --git a/.changeset/create-remix-router.md b/.changeset/create-remix-router.md deleted file mode 100644 index 8c13e9371f..0000000000 --- a/.changeset/create-remix-router.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router-dom": major ---- - -Use `createRemixRouter`/`RouterProvider` in `entry.client` instead of `RemixBrowser` diff --git a/.changeset/curvy-teachers-explain.md b/.changeset/curvy-teachers-explain.md deleted file mode 100644 index d039d91976..0000000000 --- a/.changeset/curvy-teachers-explain.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"react-router-dom": major -"@react-router/express": major -"react-router": major -"@react-router/serve": major -"@react-router/node": major -"@react-router/dev": major ---- - -Remove single_fetch future flag. diff --git a/.changeset/drop-node-16.md b/.changeset/drop-node-16.md deleted file mode 100644 index be3759da73..0000000000 --- a/.changeset/drop-node-16.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router": major ---- - -Drop support for Node 16, React Router SSR now requires Node 18 or higher diff --git a/.changeset/early-beds-obey.md b/.changeset/early-beds-obey.md deleted file mode 100644 index bac0cbcbf6..0000000000 --- a/.changeset/early-beds-obey.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"react-router-dom": major -"react-router": major ---- - -Remove `future.v7_startTransition` flag diff --git a/.changeset/eighty-boats-vanish.md b/.changeset/eighty-boats-vanish.md deleted file mode 100644 index 21c68a1beb..0000000000 --- a/.changeset/eighty-boats-vanish.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router": patch ---- - -No changes diff --git a/.changeset/eighty-dolls-juggle.md b/.changeset/eighty-dolls-juggle.md deleted file mode 100644 index 80416d4a76..0000000000 --- a/.changeset/eighty-dolls-juggle.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@react-router/dev": patch ---- - -Enable prerendering for resource routes diff --git a/.changeset/empty-glasses-dream.md b/.changeset/empty-glasses-dream.md deleted file mode 100644 index 0caa2812f1..0000000000 --- a/.changeset/empty-glasses-dream.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@react-router/dev": patch ---- - -chore: warn instead of error for min node version in CLI diff --git a/.changeset/expose-promises.md b/.changeset/expose-promises.md deleted file mode 100644 index 43bf5fbd63..0000000000 --- a/.changeset/expose-promises.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"react-router": major ---- - -- Expose the underlying router promises from the following APIs for compsition in React 19 APIs: - - `useNavigate()` - - `useSubmit` - - `useFetcher().load` - - `useFetcher().submit` - - `useRevalidator.revalidate` diff --git a/.changeset/fair-beans-design.md b/.changeset/fair-beans-design.md deleted file mode 100644 index a2d2fc494c..0000000000 --- a/.changeset/fair-beans-design.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@react-router/cloudflare": minor ---- - -The `@remix-run/cloudflare-workers` package has been deprecated. Remix consumers migrating to React Router should use the `@react-router/cloudflare` package directly. For guidance on how to use `@react-router/cloudflare` within a Cloudflare Workers context, refer to the Cloudflare Workers template. diff --git a/.changeset/fair-cheetahs-hope.md b/.changeset/fair-cheetahs-hope.md deleted file mode 100644 index e0503d468d..0000000000 --- a/.changeset/fair-cheetahs-hope.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"react-router-dom": major -"react-router": major ---- - -Remove `future.v7_normalizeFormMethod` future flag diff --git a/.changeset/fast-plums-peel.md b/.changeset/fast-plums-peel.md deleted file mode 100644 index a533cd425f..0000000000 --- a/.changeset/fast-plums-peel.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -"@react-router/architect": major -"@react-router/cloudflare": major -"@react-router/node": major -"react-router": major ---- - -For Remix consumers migrating to React Router, the `crypto` global from the [Web Crypto API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API) is now required when using cookie and session APIs. This means that the following APIs are provided from `react-router` rather than platform-specific packages: - -- `createCookie` -- `createCookieSessionStorage` -- `createMemorySessionStorage` -- `createSessionStorage` - -For consumers running older versions of Node, the `installGlobals` function from `@remix-run/node` has been updated to define `globalThis.crypto`, using [Node's `require('node:crypto').webcrypto` implementation.](https://nodejs.org/api/webcrypto.html) - -Since platform-specific packages no longer need to implement this API, the following low-level APIs have been removed: - -- `createCookieFactory` -- `createSessionStorageFactory` -- `createCookieSessionStorageFactory` -- `createMemorySessionStorageFactory` diff --git a/.changeset/few-stingrays-explain.md b/.changeset/few-stingrays-explain.md deleted file mode 100644 index 55e3cbd2f8..0000000000 --- a/.changeset/few-stingrays-explain.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router": patch ---- - -[REMOVE] Changeset to bump pre.4 release diff --git a/.changeset/five-cheetahs-press.md b/.changeset/five-cheetahs-press.md deleted file mode 100644 index b9c1dbd0f6..0000000000 --- a/.changeset/five-cheetahs-press.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@react-router/node": patch ---- - -Add createRequestListener to @react-router/node diff --git a/.changeset/fluffy-ducks-try.md b/.changeset/fluffy-ducks-try.md deleted file mode 100644 index 6761871eec..0000000000 --- a/.changeset/fluffy-ducks-try.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router-dom": major ---- - -Allow returning `undefined` from actions and loaders diff --git a/.changeset/four-needles-search.md b/.changeset/four-needles-search.md deleted file mode 100644 index a66be92f07..0000000000 --- a/.changeset/four-needles-search.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@react-router/dev": patch -"react-router": patch ---- - -chore: re-enable development warnings through a `development` exports condition. diff --git a/.changeset/fuzzy-worms-applaud.md b/.changeset/fuzzy-worms-applaud.md deleted file mode 100644 index 2bc32ba093..0000000000 --- a/.changeset/fuzzy-worms-applaud.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router-dom": patch ---- - -Memoize some `RouterProvider` internals to reduce uneccesary re-renders diff --git a/.changeset/gold-suns-march.md b/.changeset/gold-suns-march.md deleted file mode 100644 index b695f5b7f6..0000000000 --- a/.changeset/gold-suns-march.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -"react-router": major ---- - -Imports/Exports cleanup - -- Removed the following exports that were previously public API from `@remix-run/router` - - types - - `AgnosticDataIndexRouteObject` - - `AgnosticDataNonIndexRouteObject` - - `AgnosticDataRouteMatch` - - `AgnosticDataRouteObject` - - `AgnosticIndexRouteObject` - - `AgnosticNonIndexRouteObject` - - `AgnosticRouteMatch` - - `AgnosticRouteObject` - - `TrackedPromise` - - `unstable_AgnosticPatchRoutesOnMissFunction` - - `Action` -> exported as `NavigationType` via `react-router` - - `Router` exported as `DataRouter` to differentiate from RR's `` - - API - - `getToPathname` (`@private`) - - `joinPaths` (`@private`) - - `normalizePathname` (`@private`) - - `resolveTo` (`@private`) - - `stripBasename` (`@private`) - - `createBrowserHistory` -> in favor of `createBrowserRouter` - - `createHashHistory` -> in favor of `createHashRouter` - - `createMemoryHistory` -> in favor of `createMemoryRouter` - - `createRouter` - - `createStaticHandler` -> in favor of wrapper `createStaticHandler` in RR Dom - - `getStaticContextFromError` -- Removed the following exports that were previously public API from `react-router` - - `Hash` - - `Pathname` - - `Search` diff --git a/.changeset/kind-mirrors-hang.md b/.changeset/kind-mirrors-hang.md deleted file mode 100644 index 9754754a35..0000000000 --- a/.changeset/kind-mirrors-hang.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@react-router/node": patch -"react-router": patch ---- - -Remove unstable upload handler. diff --git a/.changeset/kind-timers-refuse.md b/.changeset/kind-timers-refuse.md deleted file mode 100644 index e9c18d5e17..0000000000 --- a/.changeset/kind-timers-refuse.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"react-router-dom": major -"@react-router/express": major -"react-router": major -"@react-router/serve": major -"@react-router/node": major -"@react-router/dev": major ---- - -update minimum node version to 18 diff --git a/.changeset/late-buckets-turn.md b/.changeset/late-buckets-turn.md deleted file mode 100644 index c3a23566ab..0000000000 --- a/.changeset/late-buckets-turn.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"react-router-dom": major -"react-router": major ---- - -Remove `future.v7_prependBasename` from the ionternalized `@remix-run/router` package diff --git a/.changeset/lemon-files-care.md b/.changeset/lemon-files-care.md deleted file mode 100644 index 6d584d2489..0000000000 --- a/.changeset/lemon-files-care.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@react-router/dev": patch ---- - -include root "react-dom" module for optimization diff --git a/.changeset/link-prefetching.md b/.changeset/link-prefetching.md deleted file mode 100644 index 0482a5c1b2..0000000000 --- a/.changeset/link-prefetching.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router-dom": minor ---- - -Add prefetching support to `Link`/`NavLink` when using Remix SSR diff --git a/.changeset/little-cooks-pull.md b/.changeset/little-cooks-pull.md deleted file mode 100644 index a221a5b2eb..0000000000 --- a/.changeset/little-cooks-pull.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router": patch ---- - -[PRERELEASE] Fix typegen for routes with a client loader but no server loader diff --git a/.changeset/long-peas-doubt.md b/.changeset/long-peas-doubt.md deleted file mode 100644 index 67d9fa1952..0000000000 --- a/.changeset/long-peas-doubt.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -"react-router": major ---- - -Migrate Remix type generics to React Router - -- These generics are provided for Remix v2 migration purposes -- These generics and the APIs they exist on should be considered informally deprecated in favor of the new `Route.*` types -- Anyone migrating from React Router v6 should probably not leverage these new generics and should migrate straight to the `Route.*` types -- For React Router v6 users, these generics are new and should not impact your app, with one exception - - `useFetcher` previously had an optional generic (used primarily by Remix v2) that expected the data type - - This has been updated in v7 to expect the type of the function that generates the data (i.e., `typeof loader`/`typeof action`) - - Therefore, you should update your usages: - - ❌ `useFetcher()` - - ✅ `useFetcher()` diff --git a/.changeset/moody-kids-count.md b/.changeset/moody-kids-count.md deleted file mode 100644 index bac5e026db..0000000000 --- a/.changeset/moody-kids-count.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"react-router-dom": major -"react-router": major ---- - -Remove `future.v7_throwAbortReason` from internalized `@remix-run/router` package diff --git a/.changeset/nice-pillows-hunt.md b/.changeset/nice-pillows-hunt.md deleted file mode 100644 index cebc13fa69..0000000000 --- a/.changeset/nice-pillows-hunt.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"@react-router/express": major -"@react-router/serve": major -"@react-router/node": major -"@react-router/dev": major -"react-router-dom": major -"react-router": major ---- - -Add `exports` field to all packages diff --git a/.changeset/nine-peas-change.md b/.changeset/nine-peas-change.md deleted file mode 100644 index 0c87673eb6..0000000000 --- a/.changeset/nine-peas-change.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@react-router/node": patch -"react-router": patch ---- - -Remove unneeded dependency on @web3-storage/multipart-parser diff --git a/.changeset/nine-ravens-work.md b/.changeset/nine-ravens-work.md deleted file mode 100644 index faa55cd7fd..0000000000 --- a/.changeset/nine-ravens-work.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"react-router-dom": major -"@react-router/express": major -"react-router": major -"@react-router/serve": major -"@react-router/node": major -"@react-router/dev": major ---- - -node package no longer re-exports from react-router diff --git a/.changeset/odd-beds-behave.md b/.changeset/odd-beds-behave.md deleted file mode 100644 index 0a499191a9..0000000000 --- a/.changeset/odd-beds-behave.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router": major ---- - -renamed RemixContext to FrameworkContext diff --git a/.changeset/pre.json b/.changeset/pre.json deleted file mode 100644 index 30371e25dd..0000000000 --- a/.changeset/pre.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "mode": "exit", - "tag": "pre", - "initialVersions": { - "integration": "0.0.0", - "integration-vite-cloudflare-template": "0.0.0", - "integration-vite-template": "0.0.0", - "create-react-router": "7.0.0-pre.4", - "react-router": "7.0.0-pre.4", - "@react-router/architect": "7.0.0-pre.4", - "@react-router/cloudflare": "7.0.0-pre.4", - "@react-router/dev": "7.0.0-pre.4", - "react-router-dom": "7.0.0-pre.4", - "@react-router/express": "7.0.0-pre.4", - "@react-router/fs-routes": "7.0.0-pre.4", - "@react-router/node": "7.0.0-pre.4", - "@react-router/remix-routes-option-adapter": "7.0.0-pre.4", - "@react-router/serve": "7.0.0-pre.4", - "@playground/compiler": "0.0.0", - "@playground/compiler-express": "0.0.0", - "@playground/compiler-spa": "0.0.0" - }, - "changesets": [ - "angry-papayas-flow", - "calm-frogs-tie", - "chilled-masks-search", - "collapse-packages", - "create-remix-router", - "curvy-teachers-explain", - "drop-node-16", - "early-beds-obey", - "eighty-boats-vanish", - "eighty-dolls-juggle", - "empty-glasses-dream", - "expose-promises", - "fair-beans-design", - "fair-cheetahs-hope", - "fast-plums-peel", - "few-stingrays-explain", - "five-cheetahs-press", - "fluffy-ducks-try", - "four-needles-search", - "fuzzy-worms-applaud", - "gold-suns-march", - "kind-mirrors-hang", - "kind-timers-refuse", - "late-buckets-turn", - "lemon-files-care", - "link-prefetching", - "little-cooks-pull", - "long-peas-doubt", - "moody-kids-count", - "nice-pillows-hunt", - "nine-peas-change", - "nine-ravens-work", - "odd-beds-behave", - "prerendering", - "purple-poems-laugh", - "rare-plums-chew", - "red-feet-shop", - "red-olives-compare", - "remix-scroll-restoration", - "remove-build-end-public-path", - "remove-manifest-option", - "remove-prefetchpagedescriptor", - "route-component-export-props", - "router-provider-hydration", - "serious-beds-approve", - "serious-ravens-appear", - "shiny-cameras-try", - "silly-papayas-trade", - "silver-cats-shave", - "sour-cycles-lie", - "strange-jeans-give", - "stupid-days-heal", - "tall-mangos-add", - "tasty-penguins-live", - "thin-nails-turn", - "three-seals-play", - "tidy-clouds-lay", - "tidy-pens-help", - "tough-pens-brush", - "twelve-bees-sin", - "twelve-cheetahs-pretend", - "twenty-carrots-yawn", - "two-countries-yell", - "typesafety", - "violet-beds-swim", - "vite-manifest-location", - "warm-melons-shop", - "weak-goats-cross", - "weak-otters-dance", - "wet-actors-act" - ] -} diff --git a/.changeset/prerendering.md b/.changeset/prerendering.md deleted file mode 100644 index 8ddf01b043..0000000000 --- a/.changeset/prerendering.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -"react-router": minor ---- - -- Add support for `prerender` config in the React Router vite plugin, to support existing SSG use-cases - - You can use the `prerender` config to pre-render your `.html` and `.data` files at build time and then serve them statically at runtime (either from a running server or a CDN) - - `prerender` can either be an array of string paths, or a function (sync or async) that returns an array of strings so that you can dynamically generate the paths by talking to your CMS, etc. - -```ts -// react-router.config.ts -import type { Config } from "@react-router/dev/config"; - -export default { - async prerender() { - let slugs = await fakeGetSlugsFromCms(); - // Prerender these paths into `.html` files at build time, and `.data` - // files if they have loaders - return ["/", "/about", ...slugs.map((slug) => `/product/${slug}`)]; - }, -} satisfies Config; - -async function fakeGetSlugsFromCms() { - await new Promise((r) => setTimeout(r, 1000)); - return ["shirt", "hat"]; -} -``` diff --git a/.changeset/purple-poems-laugh.md b/.changeset/purple-poems-laugh.md deleted file mode 100644 index b4501690e9..0000000000 --- a/.changeset/purple-poems-laugh.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router": patch ---- - -Fix redirects returned from loaders/actions using `data()` diff --git a/.changeset/rare-plums-chew.md b/.changeset/rare-plums-chew.md deleted file mode 100644 index 7f071c8186..0000000000 --- a/.changeset/rare-plums-chew.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@react-router/serve": patch -"@react-router/dev": patch -"react-router": patch ---- - -- [PRERELEASE] Fix `react-router-serve` handling of prerendered HTML files by removing the `redirect: false` option so it now falls back on the default `redirect: true` behavior of redirecting from `/folder` -> `/folder/` which will then pick up `/folder/index.html` from disk. See https://expressjs.com/en/resources/middleware/serve-static.html -- [PRERELEASE] Proxy prerendered loader data into prerender pass for HTML files to avoid double-invocations of the loader at build time diff --git a/.changeset/red-feet-shop.md b/.changeset/red-feet-shop.md deleted file mode 100644 index 3916605351..0000000000 --- a/.changeset/red-feet-shop.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"react-router": minor ---- - -[REMOVE] Allow returning undefined from loaders/actions part 2 - -- This is a follow up to #11680 which missed some of the Remix codepaths diff --git a/.changeset/red-olives-compare.md b/.changeset/red-olives-compare.md deleted file mode 100644 index 72c8383725..0000000000 --- a/.changeset/red-olives-compare.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"react-router-dom": major -"react-router": major ---- - -updates the minimum React version to 18 diff --git a/.changeset/remix-scroll-restoration.md b/.changeset/remix-scroll-restoration.md deleted file mode 100644 index 88e9a4eecc..0000000000 --- a/.changeset/remix-scroll-restoration.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router-dom": minor ---- - -Enhance `ScrollRestoration` so it can restore properly on an SSR'd document load diff --git a/.changeset/remove-build-end-public-path.md b/.changeset/remove-build-end-public-path.md deleted file mode 100644 index 56b396c863..0000000000 --- a/.changeset/remove-build-end-public-path.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@react-router/dev": major ---- - -For Remix consumers migrating to React Router who used the Vite plugin's `buildEnd` hook, the resolved `reactRouterConfig` object no longer contains a `publicPath` property since this belongs to Vite, not React Router. diff --git a/.changeset/remove-manifest-option.md b/.changeset/remove-manifest-option.md deleted file mode 100644 index 94173c6c9a..0000000000 --- a/.changeset/remove-manifest-option.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -"@react-router/dev": major ---- - -For Remix consumers migrating to React Router, the Vite plugin's `manifest` option has been removed. - -The `manifest` option been superseded by the more powerful `buildEnd` hook since it's passed the `buildManifest` argument. You can still write the build manifest to disk if needed, but you'll most likely find it more convenient to write any logic depending on the build manifest within the `buildEnd` hook itself. - -If you were using the `manifest` option, you can replace it with a `buildEnd` hook that writes the manifest to disk like this: - -```ts -// react-router.config.ts -import type { Config } from "@react-router/dev/config"; -import { writeFile } from "node:fs/promises"; - -export default { - async buildEnd({ buildManifest }) { - await writeFile( - "build/manifest.json", - JSON.stringify(buildManifest, null, 2), - "utf-8" - ); - }, -} satisfies Config; -``` diff --git a/.changeset/remove-prefetchpagedescriptor.md b/.changeset/remove-prefetchpagedescriptor.md deleted file mode 100644 index c88fbf5aea..0000000000 --- a/.changeset/remove-prefetchpagedescriptor.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router": major ---- - -PrefetchPageDescriptor replaced by PageLinkDescriptor diff --git a/.changeset/route-component-export-props.md b/.changeset/route-component-export-props.md deleted file mode 100644 index 8ed1ce9de5..0000000000 --- a/.changeset/route-component-export-props.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -"@react-router/dev": minor -"react-router": minor ---- - -Params, loader data, and action data as props for route component exports - -```tsx -export default function Component({ params, loaderData, actionData }) {} - -export function HydrateFallback({ params }) {} -export function ErrorBoundary({ params, loaderData, actionData }) {} -``` diff --git a/.changeset/router-provider-hydration.md b/.changeset/router-provider-hydration.md deleted file mode 100644 index 06b3a66ea7..0000000000 --- a/.changeset/router-provider-hydration.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router-dom": minor ---- - -Add built-in Remix-style hydration support to `RouterProvider`. When running from a Remix-SSR'd HTML payload with the proper `window` variables (`__remixContext`, `__remixManifest`, `__remixRouteModules`), you don't need to pass a `router` prop and `RouterProvider` will create the `router` for you internally. ([#11396](https://github.com/remix-run/react-router/pull/11396)) diff --git a/.changeset/serious-beds-approve.md b/.changeset/serious-beds-approve.md deleted file mode 100644 index 0e0611ba10..0000000000 --- a/.changeset/serious-beds-approve.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@react-router/dev": patch ---- - -resolve config directory relative to flat output file structure diff --git a/.changeset/serious-ravens-appear.md b/.changeset/serious-ravens-appear.md deleted file mode 100644 index 3de6ab93b1..0000000000 --- a/.changeset/serious-ravens-appear.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@react-router/dev": patch ---- - -if we are in SAP mode, always render the `index.html` for hydration diff --git a/.changeset/shiny-cameras-try.md b/.changeset/shiny-cameras-try.md deleted file mode 100644 index 1f3c6f798b..0000000000 --- a/.changeset/shiny-cameras-try.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@react-router/dev": patch -"react-router": patch ---- - -fix(react-router): (v7) fix static prerender of non-ascii characters diff --git a/.changeset/silly-papayas-trade.md b/.changeset/silly-papayas-trade.md deleted file mode 100644 index 4cd5ade31c..0000000000 --- a/.changeset/silly-papayas-trade.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router": patch ---- - -[REMOVE] Rename RemixRouter->DataRouter diff --git a/.changeset/silver-cats-shave.md b/.changeset/silver-cats-shave.md deleted file mode 100644 index 698836f2c7..0000000000 --- a/.changeset/silver-cats-shave.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router": patch ---- - -Replace `substr` with `substring` diff --git a/.changeset/sour-cycles-lie.md b/.changeset/sour-cycles-lie.md deleted file mode 100644 index 6cc890d54e..0000000000 --- a/.changeset/sour-cycles-lie.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"@react-router/dev": major -"react-router": major ---- - -- Consolidate types previously duplicated across `@remix-run/router`, `@remix-run/server-runtime`, and `@remix-run/react` now that they all live in `react-router` - - Examples: `LoaderFunction`, `LoaderFunctionArgs`, `ActionFunction`, `ActionFunctionArgs`, `DataFunctionArgs`, `RouteManifest`, `LinksFunction`, `Route`, `EntryRoute` - - The `RouteManifest` type used by the "remix" code is now slightly stricter because it is using the former `@remix-run/router` `RouteManifest` - - `Record -> Record` - - Removed `AppData` type in favor of inlining `unknown` in the few locations it was used - - Removed `ServerRuntimeMeta*` types in favor of the `Meta*` types they were duplicated from diff --git a/.changeset/strange-jeans-give.md b/.changeset/strange-jeans-give.md deleted file mode 100644 index a33c69d1a3..0000000000 --- a/.changeset/strange-jeans-give.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"react-router": patch ---- - -Remove the deprecated `json` utility - -- You can use [`Response.json`](https://developer.mozilla.org/en-US/docs/Web/API/Response/json_static) if you still need to construct JSON responses in your app diff --git a/.changeset/stupid-days-heal.md b/.changeset/stupid-days-heal.md deleted file mode 100644 index fecd283a9c..0000000000 --- a/.changeset/stupid-days-heal.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -"@react-router/dev": major ---- - -Update default `isbot` version to v5 and drop support for `isbot@3` - -- If you have `isbot@4` or `isbot@5` in your `package.json`: - - You do not need to make any changes -- If you have `isbot@3` in your `package.json` and you have your own `entry.server.tsx` file in your repo - - You do not need to make any changes - - You can upgrade to `isbot@5` independent of the React Router v7 upgrade -- If you have `isbot@3` in your `package.json` and you do not have your own `entry.server.tsx` file in your repo - - You are using the internal default entry provided by React Router v7 and you will need to upgrade to `isbot@5` in your `package.json` diff --git a/.changeset/tall-mangos-add.md b/.changeset/tall-mangos-add.md deleted file mode 100644 index 7a960eeeaa..0000000000 --- a/.changeset/tall-mangos-add.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@react-router/dev": minor ---- - -Remove internal entry.server.spa.tsx implementation diff --git a/.changeset/tasty-penguins-live.md b/.changeset/tasty-penguins-live.md deleted file mode 100644 index 4ffae59f61..0000000000 --- a/.changeset/tasty-penguins-live.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"react-router-dom": major -"react-router": major ---- - -- Remove the `future.v7_partialHydration` flag - - This also removes the `` prop - - To migrate, move the `fallbackElement` to a `hydrateFallbackElement`/`HydrateFallback` on your root route - - Also worth nothing there is a related breaking changer with this future flag: - - Without `future.v7_partialHydration` (when using `fallbackElement`), `state.navigation` was populated during the initial load - - With `future.v7_partialHydration`, `state.navigation` remains in an `"idle"` state during the initial load diff --git a/.changeset/thin-nails-turn.md b/.changeset/thin-nails-turn.md deleted file mode 100644 index cfe12d7c0b..0000000000 --- a/.changeset/thin-nails-turn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router": minor ---- - -Remove duplicate `RouterProvider` impliementations diff --git a/.changeset/three-seals-play.md b/.changeset/three-seals-play.md deleted file mode 100644 index 59ab4af832..0000000000 --- a/.changeset/three-seals-play.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@react-router/dev": minor ---- - -Add `prefix` route config helper to `@react-router/dev/routes` diff --git a/.changeset/tidy-clouds-lay.md b/.changeset/tidy-clouds-lay.md deleted file mode 100644 index 304c25d6f4..0000000000 --- a/.changeset/tidy-clouds-lay.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router": major ---- - -Remove `v7_relativeSplatPath` future flag diff --git a/.changeset/tidy-pens-help.md b/.changeset/tidy-pens-help.md deleted file mode 100644 index 5db3b598d6..0000000000 --- a/.changeset/tidy-pens-help.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"@react-router/express": major -"@react-router/node": major -"@react-router/dev": major -"react-router": major ---- - -Drop support for Node 18, update minimum Node vestion to 20 - -- Remove `installGlobals()` as this should no longer be necessary diff --git a/.changeset/tough-pens-brush.md b/.changeset/tough-pens-brush.md deleted file mode 100644 index 2927281795..0000000000 --- a/.changeset/tough-pens-brush.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"@react-router/serve": patch ---- - -Update `express.static` configurations to support prerendering - -- Assets in the `build/client/assets` folder are served as before, with a 1-year immutable `Cache-Control` header -- Static files outside of assets, such as pre-rendered `.html` and `.data` files are not served with a specific `Cache-Control` header -- `.data` files are served with `Content-Type: text/x-turbo` - - For some reason, when adding this via `express.static`, it seems to also add a `Cache-Control: public, max-age=0` to `.data` files diff --git a/.changeset/twelve-bees-sin.md b/.changeset/twelve-bees-sin.md deleted file mode 100644 index bc90c3289d..0000000000 --- a/.changeset/twelve-bees-sin.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router": patch ---- - -Remove unneeded dependency on source-map diff --git a/.changeset/twelve-cheetahs-pretend.md b/.changeset/twelve-cheetahs-pretend.md deleted file mode 100644 index 0ec37aa33e..0000000000 --- a/.changeset/twelve-cheetahs-pretend.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"react-router": major ---- - -Remove remaining future flags - -- React Router `v7_skipActionErrorRevalidation` -- Remix `v3_fetcherPersist`, `v3_relativeSplatPath`, `v3_throwAbortReason` diff --git a/.changeset/twenty-carrots-yawn.md b/.changeset/twenty-carrots-yawn.md deleted file mode 100644 index 98c0abdedc..0000000000 --- a/.changeset/twenty-carrots-yawn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router": major ---- - -rename createRemixStub to createRoutesStub diff --git a/.changeset/two-countries-yell.md b/.changeset/two-countries-yell.md deleted file mode 100644 index de7d6d5098..0000000000 --- a/.changeset/two-countries-yell.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router": major ---- - -Remove `@remix-run/router` deprecated `detectErrorBoundary` option in favor of `mapRouteProperties` diff --git a/.changeset/typesafety.md b/.changeset/typesafety.md deleted file mode 100644 index b8c69333f5..0000000000 --- a/.changeset/typesafety.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -"@react-router/dev": minor -"react-router": minor ---- - -### Typesafety improvements - -React Router now generates types for each of your route modules. -You can access those types by importing them from `./+types.`. -For example: - -```ts -// app/routes/product.tsx -import type * as Route from "./+types.product"; - -export function loader({ params }: Route.LoaderArgs) {} - -export default function Component({ loaderData }: Route.ComponentProps) {} -``` - -This initial implementation targets type inference for: - -- `Params` : Path parameters from your routing config in `routes.ts` including file-based routing -- `LoaderData` : Loader data from `loader` and/or `clientLoader` within your route module -- `ActionData` : Action data from `action` and/or `clientAction` within your route module - -In the future, we plan to add types for the rest of the route module exports: `meta`, `links`, `headers`, `shouldRevalidate`, etc. -We also plan to generate types for typesafe `Link`s: - -```tsx - -// ^^^^^^^^^^^^^ ^^^^^^^^^ -// typesafe `to` and `params` based on the available routes in your app -``` - -Check out our docs for more: - -- [_Explanations > Type Safety_](https://reactrouter.com/dev/guides/explanation/type-safety) -- [_How-To > Setting up type safety_](https://reactrouter.com/dev/guides/how-to/setting-up-type-safety) diff --git a/.changeset/violet-beds-swim.md b/.changeset/violet-beds-swim.md deleted file mode 100644 index 1acd1fdaa0..0000000000 --- a/.changeset/violet-beds-swim.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router": minor ---- - -Stabilize `unstable_dataStrategy` diff --git a/.changeset/vite-manifest-location.md b/.changeset/vite-manifest-location.md deleted file mode 100644 index 31fdb73e0d..0000000000 --- a/.changeset/vite-manifest-location.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@react-router/dev": major ---- - -For Remix consumers migrating to React Router, Vite manifests (i.e. `.vite/manifest.json`) are now written within each build subdirectory, e.g. `build/client/.vite/manifest.json` and `build/server/.vite/manifest.json` instead of `build/.vite/client-manifest.json` and `build/.vite/server-manifest.json`. This means that the build output is now much closer to what you'd expect from a typical Vite project. - -Originally the Remix Vite plugin moved all Vite manifests to a root-level `build/.vite` directory to avoid accidentally serving them in production, particularly from the client build. This was later improved with additional logic that deleted these Vite manifest files at the end of the build process unless Vite's `build.manifest` had been enabled within the app's Vite config. This greatly reduced the risk of accidentally serving the Vite manifests in production since they're only present when explicitly asked for. As a result, we can now assume that consumers will know that they need to manage these additional files themselves, and React Router can safely generate a more standard Vite build output. diff --git a/.changeset/warm-melons-shop.md b/.changeset/warm-melons-shop.md deleted file mode 100644 index 4d73f59df9..0000000000 --- a/.changeset/warm-melons-shop.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router": minor ---- - -Stabilize `unstable_patchRoutesOnNavigation` diff --git a/.changeset/weak-goats-cross.md b/.changeset/weak-goats-cross.md deleted file mode 100644 index b7792dd3a5..0000000000 --- a/.changeset/weak-goats-cross.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -"react-router": major ---- - -Add `react-router/dom` subpath export to properly enable `react-dom` as an optional `peerDependency` - -- This ensures that we don't blindly `import ReactDOM from "react-dom"` in `` in order to access `ReactDOM.flushSync()`, since that would break `createMemoryRouter` use cases in non-DOM environments -- DOM environments should import from `react-router/dom` to get the proper component that makes `ReactDOM.flushSync()` available: - - If you are using the Vite plugin, use this in your `entry.client.tsx`: - - `import { HydratedRouter } from 'react-router/dom'` - - If you are not using the Vite plugin and are manually calling `createBrowserRouter`/`createHashRouter`: - - `import { RouterProvider } from "react-router/dom"` diff --git a/.changeset/weak-otters-dance.md b/.changeset/weak-otters-dance.md deleted file mode 100644 index fbe5d5ad2b..0000000000 --- a/.changeset/weak-otters-dance.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"react-router-dom": major -"react-router": major ---- - -Remove `future.v7_fetcherPersist` flag diff --git a/.changeset/wet-actors-act.md b/.changeset/wet-actors-act.md deleted file mode 100644 index 0171c0f48e..0000000000 --- a/.changeset/wet-actors-act.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router": major ---- - -Update `cookie` dependency to `^1.0.1` - please see the [release notes](https://github.com/jshttp/cookie/releases) for any breaking changes diff --git a/packages/create-react-router/CHANGELOG.md b/packages/create-react-router/CHANGELOG.md index 5f73a8cb38..a529000de5 100644 --- a/packages/create-react-router/CHANGELOG.md +++ b/packages/create-react-router/CHANGELOG.md @@ -1,5 +1,3 @@ # create-react-router -## 7.0.0-pre.6 - -## 7.0.0-pre.5 +## 7.0.0 diff --git a/packages/create-react-router/package.json b/packages/create-react-router/package.json index 4770179e23..24515680be 100644 --- a/packages/create-react-router/package.json +++ b/packages/create-react-router/package.json @@ -1,6 +1,6 @@ { "name": "create-react-router", - "version": "7.0.0-pre.6", + "version": "7.0.0", "description": "Create a new React Router app", "homepage": "https://reactrouter.com", "bugs": { diff --git a/packages/react-router-architect/CHANGELOG.md b/packages/react-router-architect/CHANGELOG.md index 4d1dd44a24..8d5f746013 100644 --- a/packages/react-router-architect/CHANGELOG.md +++ b/packages/react-router-architect/CHANGELOG.md @@ -1,54 +1,6 @@ # @react-router/architect -## 7.0.0-pre.6 - -### Patch Changes - -- Updated dependencies: - - `@react-router/node@7.0.0-pre.6` - - `react-router@7.0.0-pre.6` - -## 7.0.0-pre.5 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.0.0-pre.5` - - `@react-router/node@7.0.0-pre.5` - -## 7.0.0-pre.4 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.0.0-pre.4` - - `@react-router/node@7.0.0-pre.4` - -## 7.0.0-pre.3 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.0.0-pre.3` - - `@react-router/node@7.0.0-pre.3` - -## 7.0.0-pre.2 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.0.0-pre.2` - - `@react-router/node@7.0.0-pre.2` - -## 7.0.0-pre.1 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.0.0-pre.1` - - `@react-router/node@7.0.0-pre.1` - -## 7.0.0-pre.0 +## 7.0.0 ### Major Changes @@ -71,5 +23,5 @@ ### Patch Changes - Updated dependencies: - - `react-router@7.0.0-pre.0` - - `@react-router/node@7.0.0-pre.0` + - `react-router@7.0.0` + - `@react-router/node@7.0.0` diff --git a/packages/react-router-architect/package.json b/packages/react-router-architect/package.json index 57072005cf..74650fafef 100644 --- a/packages/react-router-architect/package.json +++ b/packages/react-router-architect/package.json @@ -1,6 +1,6 @@ { "name": "@react-router/architect", - "version": "7.0.0-pre.6", + "version": "7.0.0", "description": "Architect server request handler for React Router", "bugs": { "url": "https://github.com/remix-run/react-router/issues" diff --git a/packages/react-router-cloudflare/CHANGELOG.md b/packages/react-router-cloudflare/CHANGELOG.md index 84fa20cdb9..02ebfdc5f3 100644 --- a/packages/react-router-cloudflare/CHANGELOG.md +++ b/packages/react-router-cloudflare/CHANGELOG.md @@ -1,48 +1,6 @@ # @react-router/cloudflare -## 7.0.0-pre.6 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.0.0-pre.6` - -## 7.0.0-pre.5 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.0.0-pre.5` - -## 7.0.0-pre.4 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.0.0-pre.4` - -## 7.0.0-pre.3 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.0.0-pre.3` - -## 7.0.0-pre.2 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.0.0-pre.2` - -## 7.0.0-pre.1 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.0.0-pre.1` - -## 7.0.0-pre.0 +## 7.0.0 ### Major Changes @@ -70,4 +28,4 @@ ### Patch Changes - Updated dependencies: - - `react-router@7.0.0-pre.0` + - `react-router@7.0.0` diff --git a/packages/react-router-cloudflare/package.json b/packages/react-router-cloudflare/package.json index 6aaeeef5fd..43b442a51e 100644 --- a/packages/react-router-cloudflare/package.json +++ b/packages/react-router-cloudflare/package.json @@ -1,6 +1,6 @@ { "name": "@react-router/cloudflare", - "version": "7.0.0-pre.6", + "version": "7.0.0", "description": "Cloudflare platform abstractions for React Router", "bugs": { "url": "https://github.com/remix-run/react-router/issues" diff --git a/packages/react-router-dev/CHANGELOG.md b/packages/react-router-dev/CHANGELOG.md index ff00d16600..4fc0f81376 100644 --- a/packages/react-router-dev/CHANGELOG.md +++ b/packages/react-router-dev/CHANGELOG.md @@ -1,84 +1,6 @@ # `@remix-run/dev` -## 7.0.0-pre.6 - -### Patch Changes - -- chore: warn instead of error for min node version in CLI ([#12270](https://github.com/remix-run/react-router/pull/12270)) -- chore: re-enable development warnings through a `development` exports condition. ([#12269](https://github.com/remix-run/react-router/pull/12269)) -- if we are in SAP mode, always render the `index.html` for hydration ([#12268](https://github.com/remix-run/react-router/pull/12268)) -- fix(react-router): (v7) fix static prerender of non-ascii characters ([#12161](https://github.com/remix-run/react-router/pull/12161)) -- Updated dependencies: - - `@react-router/node@7.0.0-pre.6` - - `react-router@7.0.0-pre.6` - - `@react-router/serve@7.0.0-pre.6` - -## 7.0.0-pre.5 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.0.0-pre.5` - - `@react-router/node@7.0.0-pre.5` - - `@react-router/serve@7.0.0-pre.5` - -## 7.0.0-pre.4 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.0.0-pre.4` - - `@react-router/node@7.0.0-pre.4` - - `@react-router/serve@7.0.0-pre.4` - -## 7.0.0-pre.3 - -### Patch Changes - -- Enable prerendering for resource routes ([#12200](https://github.com/remix-run/react-router/pull/12200)) -- resolve config directory relative to flat output file structure ([#12187](https://github.com/remix-run/react-router/pull/12187)) -- Updated dependencies: - - `react-router@7.0.0-pre.3` - - `@react-router/node@7.0.0-pre.3` - - `@react-router/serve@7.0.0-pre.3` - -## 7.0.0-pre.2 - -### Major Changes - -- - Consolidate types previously duplicated across `@remix-run/router`, `@remix-run/server-runtime`, and `@remix-run/react` now that they all live in `react-router` ([#12177](https://github.com/remix-run/react-router/pull/12177)) - - Examples: `LoaderFunction`, `LoaderFunctionArgs`, `ActionFunction`, `ActionFunctionArgs`, `DataFunctionArgs`, `RouteManifest`, `LinksFunction`, `Route`, `EntryRoute` - - The `RouteManifest` type used by the "remix" code is now slightly stricter because it is using the former `@remix-run/router` `RouteManifest` - - `Record -> Record` - - Removed `AppData` type in favor of inlining `unknown` in the few locations it was used - - Removed `ServerRuntimeMeta*` types in favor of the `Meta*` types they were duplicated from -- Drop support for Node 18, update minimum Node vestion to 20 ([#12171](https://github.com/remix-run/react-router/pull/12171)) - - - Remove `installGlobals()` as this should no longer be necessary - -### Patch Changes - -- Updated dependencies: - - `react-router@7.0.0-pre.2` - - `@react-router/node@7.0.0-pre.2` - - `@react-router/serve@7.0.0-pre.2` - -## 7.0.0-pre.1 - -### Minor Changes - -- Add `prefix` route config helper to `@react-router/dev/routes` ([#12094](https://github.com/remix-run/react-router/pull/12094)) - -### Patch Changes - -- - Fix `react-router-serve` handling of prerendered HTML files by removing the `redirect: false` option so it now falls back on the default `redirect: true` behavior of redirecting from `/folder` -> `/folder/` which will then pick up `/folder/index.html` from disk. See https://expressjs.com/en/resources/middleware/serve-static.html ([#12071](https://github.com/remix-run/react-router/pull/12071)) - - Proxy prerendered loader data into prerender pass for HTML files to avoid double-invocations of the loader at build time -- Updated dependencies: - - `react-router@7.0.0-pre.1` - - `@react-router/serve@7.0.0-pre.1` - - `@react-router/node@7.0.0-pre.1` - -## 7.0.0-pre.0 +## 7.0.0 ### Major Changes @@ -94,36 +16,45 @@ +import { cloudflareDevProxy } from "@react-router/dev/vite/cloudflare"; ``` -- Remove single_fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522)) +- Remove single\_fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522)) + - update minimum node version to 18 ([#11690](https://github.com/remix-run/react-router/pull/11690)) + - Add `exports` field to all packages ([#11675](https://github.com/remix-run/react-router/pull/11675)) + - node package no longer re-exports from react-router ([#11702](https://github.com/remix-run/react-router/pull/11702)) + - For Remix consumers migrating to React Router who used the Vite plugin's `buildEnd` hook, the resolved `reactRouterConfig` object no longer contains a `publicPath` property since this belongs to Vite, not React Router. ([#11575](https://github.com/remix-run/react-router/pull/11575)) + - For Remix consumers migrating to React Router, the Vite plugin's `manifest` option has been removed. ([#11573](https://github.com/remix-run/react-router/pull/11573)) The `manifest` option been superseded by the more powerful `buildEnd` hook since it's passed the `buildManifest` argument. You can still write the build manifest to disk if needed, but you'll most likely find it more convenient to write any logic depending on the build manifest within the `buildEnd` hook itself. If you were using the `manifest` option, you can replace it with a `buildEnd` hook that writes the manifest to disk like this: - ```js - import { reactRouter } from "@react-router/dev/vite"; + ```ts + // react-router.config.ts + import type { Config } from "@react-router/dev/config"; import { writeFile } from "node:fs/promises"; export default { - plugins: [ - reactRouter({ - async buildEnd({ buildManifest }) { - await writeFile( - "build/manifest.json", - JSON.stringify(buildManifest, null, 2), - "utf-8" - ); - }, - }), - ], - }; + async buildEnd({ buildManifest }) { + await writeFile( + "build/manifest.json", + JSON.stringify(buildManifest, null, 2), + "utf-8" + ); + }, + } satisfies Config; ``` +- - Consolidate types previously duplicated across `@remix-run/router`, `@remix-run/server-runtime`, and `@remix-run/react` now that they all live in `react-router` ([#12177](https://github.com/remix-run/react-router/pull/12177)) + - Examples: `LoaderFunction`, `LoaderFunctionArgs`, `ActionFunction`, `ActionFunctionArgs`, `DataFunctionArgs`, `RouteManifest`, `LinksFunction`, `Route`, `EntryRoute` + - The `RouteManifest` type used by the "remix" code is now slightly stricter because it is using the former `@remix-run/router` `RouteManifest` + - `Record -> Record` + - Removed `AppData` type in favor of inlining `unknown` in the few locations it was used + - Removed `ServerRuntimeMeta*` types in favor of the `Meta*` types they were duplicated from + - Update default `isbot` version to v5 and drop support for `isbot@3` ([#11770](https://github.com/remix-run/react-router/pull/11770)) - If you have `isbot@4` or `isbot@5` in your `package.json`: @@ -134,6 +65,10 @@ - If you have `isbot@3` in your `package.json` and you do not have your own `entry.server.tsx` file in your repo - You are using the internal default entry provided by React Router v7 and you will need to upgrade to `isbot@5` in your `package.json` +- Drop support for Node 18, update minimum Node vestion to 20 ([#12171](https://github.com/remix-run/react-router/pull/12171)) + + - Remove `installGlobals()` as this should no longer be necessary + - For Remix consumers migrating to React Router, Vite manifests (i.e. `.vite/manifest.json`) are now written within each build subdirectory, e.g. `build/client/.vite/manifest.json` and `build/server/.vite/manifest.json` instead of `build/.vite/client-manifest.json` and `build/.vite/server-manifest.json`. This means that the build output is now much closer to what you'd expect from a typical Vite project. ([#11573](https://github.com/remix-run/react-router/pull/11573)) Originally the Remix Vite plugin moved all Vite manifests to a root-level `build/.vite` directory to avoid accidentally serving them in production, particularly from the client build. This was later improved with additional logic that deleted these Vite manifest files at the end of the build process unless Vite's `build.manifest` had been enabled within the app's Vite config. This greatly reduced the risk of accidentally serving the Vite manifests in production since they're only present when explicitly asked for. As a result, we can now assume that consumers will know that they need to manage these additional files themselves, and React Router can safely generate a more standard Vite build output. @@ -150,6 +85,9 @@ ``` - Remove internal entry.server.spa.tsx implementation ([#11681](https://github.com/remix-run/react-router/pull/11681)) + +- Add `prefix` route config helper to `@react-router/dev/routes` ([#12094](https://github.com/remix-run/react-router/pull/12094)) + - ### Typesafety improvements ([#12019](https://github.com/remix-run/react-router/pull/12019)) React Router now generates types for each of your route modules. @@ -171,16 +109,6 @@ - `LoaderData` : Loader data from `loader` and/or `clientLoader` within your route module - `ActionData` : Action data from `action` and/or `clientAction` within your route module - These types are then used to create types for route export args and props: - - - `LoaderArgs` - - `ClientLoaderArgs` - - `ActionArgs` - - `ClientActionArgs` - - `HydrateFallbackProps` - - `ComponentProps` (for the `default` export) - - `ErrorBoundaryProps` - In the future, we plan to add types for the rest of the route module exports: `meta`, `links`, `headers`, `shouldRevalidate`, etc. We also plan to generate types for typesafe `Link`s: @@ -190,120 +118,26 @@ // typesafe `to` and `params` based on the available routes in your app ``` - #### Setup - - React Router will generate types into a `.react-router/` directory at the root of your app. - This directory is fully managed by React Router and is derived based on your route config (`routes.ts`). - - 👉 **Add `.react-router/` to `.gitignore`** - - ```txt - .react-router - ``` - - You should also ensure that generated types for routes are always present before running typechecking, - especially for running typechecking in CI. - - 👉 **Add `react-router typegen` to your `typecheck` command in `package.json`** - - ```json - { - "scripts": { - "typecheck": "react-router typegen && tsc" - } - } - ``` - - To get TypeScript to use those generated types, you'll need to add them to `include` in `tsconfig.json`. - And to be able to import them as if they files next to your route modules, you'll also need to configure `rootDirs`. - - 👉 **Configure `tsconfig.json` for generated types** - - ```json - { - "include": [".react-router/types/**/*"], - "compilerOptions": { - "rootDirs": [".", "./.react-router/types"] - } - } - ``` - - #### `typegen` command + Check out our docs for more: - You can manually generate types with the new `typegen` command: - - ```sh - react-router typegen - ``` - - However, manual type generation is tedious and types can get out of sync quickly if you ever forget to run `typegen`. - Instead, we recommend that you setup our new TypeScript plugin which will automatically generate fresh types whenever routes change. - That way, you'll always have up-to-date types. - - #### TypeScript plugin - - To get automatic type generation, you can use our new TypeScript plugin. - - 👉 **Add the TypeScript plugin to `tsconfig.json`** - - ```json - { - "compilerOptions": { - "plugins": [{ "name": "@react-router/dev" }] - } - } - ``` - - We plan to add some other goodies to our TypeScript plugin soon, including: - - - Automatic `jsdoc` for route exports that include links to official docs - - Autocomplete for route exports - - Warnings for non-HMR compliant exports - - ##### VSCode - - TypeScript looks for plugins registered in `tsconfig.json` in the local `node_modules/`, - but VSCode ships with its own copy of TypeScript that is installed outside of your project. - For TypeScript plugins to work, you'll need to tell VSCode to use the local workspace version of TypeScript. - For security reasons, [VSCode won't use the workspace version of TypeScript](https://code.visualstudio.com/docs/typescript/typescript-compiling#_using-the-workspace-version-of-typescript) until you manually opt-in. - - Your project should have a `.vscode/settings.json` with the following settings: - - ```json - { - "typescript.tsdk": "node_modules/typescript/lib", - "typescript.enablePromptUseWorkspaceTsdk": true - } - ``` - - That way [VSCode will ask you](https://code.visualstudio.com/updates/v1_45#_prompt-users-to-switch-to-the-workspace-version-of-typescript) if you want to use the workspace version of TypeScript the first time you open a TS file in that project. - - > [!IMPORTANT] - > You'll need to install dependencies first so that the workspace version of TypeScript is available. - - 👉 **Select "Allow" when VSCode asks if you want to use the workspace version of TypeScript** - - Otherwise, you can also manually opt-in to the workspace version: - - 1. Open up any TypeScript file in your project - 2. Open up the VSCode Command Palette (Cmd+Shift+P) - 3. Search for `Select TypeScript Version` - 4. Choose `Use Workspace Version` - 5. Quit and reopen VSCode - - ##### Troubleshooting - - In VSCode, open up any TypeScript file in your project and then use CMD+SHIFT+P to select `Open TS Server log`. - There should be a log for `[react-router] setup` that indicates that the plugin was resolved correctly. - Then look for any errors in the log. + - [_Explanations > Type Safety_](https://reactrouter.com/dev/guides/explanation/type-safety) + - [_How-To > Setting up type safety_](https://reactrouter.com/dev/guides/how-to/setting-up-type-safety) ### Patch Changes +- Enable prerendering for resource routes ([#12200](https://github.com/remix-run/react-router/pull/12200)) +- chore: warn instead of error for min node version in CLI ([#12270](https://github.com/remix-run/react-router/pull/12270)) +- chore: re-enable development warnings through a `development` exports condition. ([#12269](https://github.com/remix-run/react-router/pull/12269)) - include root "react-dom" module for optimization ([#12060](https://github.com/remix-run/react-router/pull/12060)) +- - \[PRERELEASE] Fix `react-router-serve` handling of prerendered HTML files by removing the `redirect: false` option so it now falls back on the default `redirect: true` behavior of redirecting from `/folder` -> `/folder/` which will then pick up `/folder/index.html` from disk. See ([#12071](https://github.com/remix-run/react-router/pull/12071)) + - \[PRERELEASE] Proxy prerendered loader data into prerender pass for HTML files to avoid double-invocations of the loader at build time +- resolve config directory relative to flat output file structure ([#12187](https://github.com/remix-run/react-router/pull/12187)) +- if we are in SAP mode, always render the `index.html` for hydration ([#12268](https://github.com/remix-run/react-router/pull/12268)) +- fix(react-router): (v7) fix static prerender of non-ascii characters ([#12161](https://github.com/remix-run/react-router/pull/12161)) - Updated dependencies: - - `react-router@7.0.0-pre.0` - - `@react-router/serve@7.0.0-pre.0` - - `@react-router/node@7.0.0-pre.0` + - `react-router@7.0.0` + - `@react-router/serve@7.0.0` + - `@react-router/node@7.0.0` ## 2.9.0 diff --git a/packages/react-router-dev/package.json b/packages/react-router-dev/package.json index 92e86b4da1..6e96c41877 100644 --- a/packages/react-router-dev/package.json +++ b/packages/react-router-dev/package.json @@ -1,6 +1,6 @@ { "name": "@react-router/dev", - "version": "7.0.0-pre.6", + "version": "7.0.0", "description": "Dev tools and CLI for React Router", "homepage": "https://reactrouter.com", "bugs": { diff --git a/packages/react-router-dom/CHANGELOG.md b/packages/react-router-dom/CHANGELOG.md index a994563030..ec70fc3bf9 100644 --- a/packages/react-router-dom/CHANGELOG.md +++ b/packages/react-router-dom/CHANGELOG.md @@ -1,48 +1,6 @@ # react-router-dom -## 7.0.0-pre.6 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.0.0-pre.6` - -## 7.0.0-pre.5 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.0.0-pre.5` - -## 7.0.0-pre.4 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.0.0-pre.4` - -## 7.0.0-pre.3 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.0.0-pre.3` - -## 7.0.0-pre.2 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.0.0-pre.2` - -## 7.0.0-pre.1 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.0.0-pre.1` - -## 7.0.0-pre.0 +## 7.0.0 ### Major Changes @@ -55,22 +13,34 @@ - `UNSAFE_DEFERRED_SYMBOL`, - Use `createRemixRouter`/`RouterProvider` in `entry.client` instead of `RemixBrowser` ([#11469](https://github.com/remix-run/react-router/pull/11469)) -- Remove single_fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522)) + +- Remove single\_fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522)) + - Remove `future.v7_startTransition` flag ([#11696](https://github.com/remix-run/react-router/pull/11696)) + - Remove `future.v7_normalizeFormMethod` future flag ([#11697](https://github.com/remix-run/react-router/pull/11697)) + - Allow returning `undefined` from actions and loaders ([#11680](https://github.com/remix-run/react-router/pull/11680)) + - update minimum node version to 18 ([#11690](https://github.com/remix-run/react-router/pull/11690)) + - Remove `future.v7_prependBasename` from the ionternalized `@remix-run/router` package ([#11726](https://github.com/remix-run/react-router/pull/11726)) + - Remove `future.v7_throwAbortReason` from internalized `@remix-run/router` package ([#11728](https://github.com/remix-run/react-router/pull/11728)) + - Add `exports` field to all packages ([#11675](https://github.com/remix-run/react-router/pull/11675)) + - node package no longer re-exports from react-router ([#11702](https://github.com/remix-run/react-router/pull/11702)) + - updates the minimum React version to 18 ([#11689](https://github.com/remix-run/react-router/pull/11689)) + - - Remove the `future.v7_partialHydration` flag ([#11725](https://github.com/remix-run/react-router/pull/11725)) - This also removes the `` prop - To migrate, move the `fallbackElement` to a `hydrateFallbackElement`/`HydrateFallback` on your root route - Also worth nothing there is a related breaking changer with this future flag: - Without `future.v7_partialHydration` (when using `fallbackElement`), `state.navigation` was populated during the initial load - With `future.v7_partialHydration`, `state.navigation` remains in an `"idle"` state during the initial load + - Remove `future.v7_fetcherPersist` flag ([#11731](https://github.com/remix-run/react-router/pull/11731)) ### Minor Changes @@ -83,4 +53,4 @@ - Memoize some `RouterProvider` internals to reduce uneccesary re-renders ([#11817](https://github.com/remix-run/react-router/pull/11817)) - Updated dependencies: - - `react-router@7.0.0-pre.0` + - `react-router@7.0.0` diff --git a/packages/react-router-dom/package.json b/packages/react-router-dom/package.json index cac5aaace0..612cd7e7c9 100644 --- a/packages/react-router-dom/package.json +++ b/packages/react-router-dom/package.json @@ -1,6 +1,6 @@ { "name": "react-router-dom", - "version": "7.0.0-pre.6", + "version": "7.0.0", "description": "Declarative routing for React web applications", "keywords": [ "react", diff --git a/packages/react-router-express/CHANGELOG.md b/packages/react-router-express/CHANGELOG.md index 6691024849..6845f8db8a 100644 --- a/packages/react-router-express/CHANGELOG.md +++ b/packages/react-router-express/CHANGELOG.md @@ -1,73 +1,22 @@ # `@remix-run/express` -## 7.0.0-pre.6 - -### Patch Changes - -- Updated dependencies: - - `@react-router/node@7.0.0-pre.6` - - `react-router@7.0.0-pre.6` - -## 7.0.0-pre.5 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.0.0-pre.5` - - `@react-router/node@7.0.0-pre.5` - -## 7.0.0-pre.4 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.0.0-pre.4` - - `@react-router/node@7.0.0-pre.4` - -## 7.0.0-pre.3 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.0.0-pre.3` - - `@react-router/node@7.0.0-pre.3` - -## 7.0.0-pre.2 +## 7.0.0 ### Major Changes -- Drop support for Node 18, update minimum Node vestion to 20 ([#12171](https://github.com/remix-run/react-router/pull/12171)) - - - Remove `installGlobals()` as this should no longer be necessary - -### Patch Changes - -- Updated dependencies: - - `react-router@7.0.0-pre.2` - - `@react-router/node@7.0.0-pre.2` - -## 7.0.0-pre.1 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.0.0-pre.1` - - `@react-router/node@7.0.0-pre.1` - -## 7.0.0-pre.0 - -### Major Changes - -- Remove single_fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522)) +- Remove single\_fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522)) - update minimum node version to 18 ([#11690](https://github.com/remix-run/react-router/pull/11690)) - Add `exports` field to all packages ([#11675](https://github.com/remix-run/react-router/pull/11675)) - node package no longer re-exports from react-router ([#11702](https://github.com/remix-run/react-router/pull/11702)) +- Drop support for Node 18, update minimum Node vestion to 20 ([#12171](https://github.com/remix-run/react-router/pull/12171)) + + - Remove `installGlobals()` as this should no longer be necessary ### Patch Changes - Updated dependencies: - - `react-router@7.0.0-pre.0` - - `@react-router/node@7.0.0-pre.0` + - `react-router@7.0.0` + - `@react-router/node@7.0.0` ## 2.9.0 diff --git a/packages/react-router-express/package.json b/packages/react-router-express/package.json index 21e7d92d2a..dbf9d52485 100644 --- a/packages/react-router-express/package.json +++ b/packages/react-router-express/package.json @@ -1,6 +1,6 @@ { "name": "@react-router/express", - "version": "7.0.0-pre.6", + "version": "7.0.0", "description": "Express server request handler for React Router", "bugs": { "url": "https://github.com/remix-run/react-router/issues" diff --git a/packages/react-router-fs-routes/CHANGELOG.md b/packages/react-router-fs-routes/CHANGELOG.md index 7c2c0ef8f4..31fb9fb7a2 100644 --- a/packages/react-router-fs-routes/CHANGELOG.md +++ b/packages/react-router-fs-routes/CHANGELOG.md @@ -1,50 +1,8 @@ # @react-router/fs-routes -## 7.0.0-pre.6 +## 7.0.0 ### Patch Changes - Updated dependencies: - - `@react-router/dev@7.0.0-pre.6` - -## 7.0.0-pre.5 - -### Patch Changes - -- Updated dependencies: - - `@react-router/dev@7.0.0-pre.5` - -## 7.0.0-pre.4 - -### Patch Changes - -- Updated dependencies: - - `@react-router/dev@7.0.0-pre.4` - -## 7.0.0-pre.3 - -### Patch Changes - -- Updated dependencies: - - `@react-router/dev@7.0.0-pre.3` - -## 7.0.0-pre.2 - -### Patch Changes - -- Updated dependencies: - - `@react-router/dev@7.0.0-pre.2` - -## 7.0.0-pre.1 - -### Patch Changes - -- Updated dependencies: - - `@react-router/dev@7.0.0-pre.1` - -## 7.0.0-pre.0 - -### Patch Changes - -- Updated dependencies: - - `@react-router/dev@7.0.0-pre.0` + - `@react-router/dev@7.0.0` diff --git a/packages/react-router-fs-routes/package.json b/packages/react-router-fs-routes/package.json index 5f64c9b7c7..e584775d6f 100644 --- a/packages/react-router-fs-routes/package.json +++ b/packages/react-router-fs-routes/package.json @@ -1,6 +1,6 @@ { "name": "@react-router/fs-routes", - "version": "7.0.0-pre.6", + "version": "7.0.0", "description": "File system routing conventions for React Router, for use within routes.ts", "bugs": { "url": "https://github.com/remix-run/react-router/issues" diff --git a/packages/react-router-node/CHANGELOG.md b/packages/react-router-node/CHANGELOG.md index b61fb6e98c..c1c31cefc3 100644 --- a/packages/react-router-node/CHANGELOG.md +++ b/packages/react-router-node/CHANGELOG.md @@ -1,60 +1,11 @@ # `@remix-run/node` -## 7.0.0-pre.6 - -### Patch Changes - -- Add createRequestListener to @react-router/node ([`6c1344247`](https://github.com/remix-run/react-router/commit/6c134424770aeb7ec3478902d730cc815070ed06)) -- Remove unneeded dependency on @web3-storage/multipart-parser ([#12274](https://github.com/remix-run/react-router/pull/12274)) -- Updated dependencies: - - `react-router@7.0.0-pre.6` - -## 7.0.0-pre.5 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.0.0-pre.5` - -## 7.0.0-pre.4 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.0.0-pre.4` - -## 7.0.0-pre.3 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.0.0-pre.3` - -## 7.0.0-pre.2 +## 7.0.0 ### Major Changes -- Drop support for Node 18, update minimum Node vestion to 20 ([#12171](https://github.com/remix-run/react-router/pull/12171)) +- Remove single\_fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522)) - - Remove `installGlobals()` as this should no longer be necessary - -### Patch Changes - -- Updated dependencies: - - `react-router@7.0.0-pre.2` - -## 7.0.0-pre.1 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.0.0-pre.1` - -## 7.0.0-pre.0 - -### Major Changes - -- Remove single_fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522)) - For Remix consumers migrating to React Router, the `crypto` global from the [Web Crypto API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API) is now required when using cookie and session APIs. This means that the following APIs are provided from `react-router` rather than platform-specific packages: ([#11837](https://github.com/remix-run/react-router/pull/11837)) - `createCookie` @@ -72,14 +23,22 @@ - `createMemorySessionStorageFactory` - update minimum node version to 18 ([#11690](https://github.com/remix-run/react-router/pull/11690)) + - Add `exports` field to all packages ([#11675](https://github.com/remix-run/react-router/pull/11675)) + - node package no longer re-exports from react-router ([#11702](https://github.com/remix-run/react-router/pull/11702)) +- Drop support for Node 18, update minimum Node vestion to 20 ([#12171](https://github.com/remix-run/react-router/pull/12171)) + + - Remove `installGlobals()` as this should no longer be necessary + ### Patch Changes +- Add createRequestListener to @react-router/node ([#12319](https://github.com/remix-run/react-router/pull/12319)) - Remove unstable upload handler. ([#12015](https://github.com/remix-run/react-router/pull/12015)) +- Remove unneeded dependency on @web3-storage/multipart-parser ([#12274](https://github.com/remix-run/react-router/pull/12274)) - Updated dependencies: - - `react-router@7.0.0-pre.0` + - `react-router@7.0.0` ## 2.9.0 diff --git a/packages/react-router-node/package.json b/packages/react-router-node/package.json index 913082ec82..64172b2f4d 100644 --- a/packages/react-router-node/package.json +++ b/packages/react-router-node/package.json @@ -1,6 +1,6 @@ { "name": "@react-router/node", - "version": "7.0.0-pre.6", + "version": "7.0.0", "description": "Node.js platform abstractions for React Router", "bugs": { "url": "https://github.com/remix-run/react-router/issues" diff --git a/packages/react-router-remix-routes-option-adapter/CHANGELOG.md b/packages/react-router-remix-routes-option-adapter/CHANGELOG.md index 4a518cec68..cafd6db3f1 100644 --- a/packages/react-router-remix-routes-option-adapter/CHANGELOG.md +++ b/packages/react-router-remix-routes-option-adapter/CHANGELOG.md @@ -1,50 +1,8 @@ # @react-router/remix-config-routes-adapter -## 7.0.0-pre.6 +## 7.0.0 ### Patch Changes - Updated dependencies: - - `@react-router/dev@7.0.0-pre.6` - -## 7.0.0-pre.5 - -### Patch Changes - -- Updated dependencies: - - `@react-router/dev@7.0.0-pre.5` - -## 7.0.0-pre.4 - -### Patch Changes - -- Updated dependencies: - - `@react-router/dev@7.0.0-pre.4` - -## 7.0.0-pre.3 - -### Patch Changes - -- Updated dependencies: - - `@react-router/dev@7.0.0-pre.3` - -## 7.0.0-pre.2 - -### Patch Changes - -- Updated dependencies: - - `@react-router/dev@7.0.0-pre.2` - -## 7.0.0-pre.1 - -### Patch Changes - -- Updated dependencies: - - `@react-router/dev@7.0.0-pre.1` - -## 7.0.0-pre.0 - -### Patch Changes - -- Updated dependencies: - - `@react-router/dev@7.0.0-pre.0` + - `@react-router/dev@7.0.0` diff --git a/packages/react-router-remix-routes-option-adapter/package.json b/packages/react-router-remix-routes-option-adapter/package.json index 34d91269f2..9387c37975 100644 --- a/packages/react-router-remix-routes-option-adapter/package.json +++ b/packages/react-router-remix-routes-option-adapter/package.json @@ -1,6 +1,6 @@ { "name": "@react-router/remix-routes-option-adapter", - "version": "7.0.0-pre.6", + "version": "7.0.0", "description": "Adapter for Remix's \"routes\" config option, for use within routes.ts", "bugs": { "url": "https://github.com/remix-run/react-router/issues" diff --git a/packages/react-router-serve/CHANGELOG.md b/packages/react-router-serve/CHANGELOG.md index 4544797a46..fece82819f 100644 --- a/packages/react-router-serve/CHANGELOG.md +++ b/packages/react-router-serve/CHANGELOG.md @@ -1,72 +1,19 @@ # `@remix-run/serve` -## 7.0.0-pre.6 - -### Patch Changes - -- Updated dependencies: - - `@react-router/node@7.0.0-pre.6` - - `react-router@7.0.0-pre.6` - - `@react-router/express@7.0.0-pre.6` - -## 7.0.0-pre.5 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.0.0-pre.5` - - `@react-router/node@7.0.0-pre.5` - - `@react-router/express@7.0.0-pre.5` - -## 7.0.0-pre.4 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.0.0-pre.4` - - `@react-router/node@7.0.0-pre.4` - - `@react-router/express@7.0.0-pre.4` - -## 7.0.0-pre.3 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.0.0-pre.3` - - `@react-router/express@7.0.0-pre.3` - - `@react-router/node@7.0.0-pre.3` - -## 7.0.0-pre.2 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.0.0-pre.2` - - `@react-router/express@7.0.0-pre.2` - - `@react-router/node@7.0.0-pre.2` - -## 7.0.0-pre.1 - -### Patch Changes - -- - Fix `react-router-serve` handling of prerendered HTML files by removing the `redirect: false` option so it now falls back on the default `redirect: true` behavior of redirecting from `/folder` -> `/folder/` which will then pick up `/folder/index.html` from disk. See https://expressjs.com/en/resources/middleware/serve-static.html ([#12071](https://github.com/remix-run/react-router/pull/12071)) - - Proxy prerendered loader data into prerender pass for HTML files to avoid double-invocations of the loader at build time -- Updated dependencies: - - `react-router@7.0.0-pre.1` - - `@react-router/node@7.0.0-pre.1` - - `@react-router/express@7.0.0-pre.1` - -## 7.0.0-pre.0 +## 7.0.0 ### Major Changes -- Remove single_fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522)) +- Remove single\_fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522)) - update minimum node version to 18 ([#11690](https://github.com/remix-run/react-router/pull/11690)) - Add `exports` field to all packages ([#11675](https://github.com/remix-run/react-router/pull/11675)) - node package no longer re-exports from react-router ([#11702](https://github.com/remix-run/react-router/pull/11702)) ### Patch Changes +- - \[PRERELEASE] Fix `react-router-serve` handling of prerendered HTML files by removing the `redirect: false` option so it now falls back on the default `redirect: true` behavior of redirecting from `/folder` -> `/folder/` which will then pick up `/folder/index.html` from disk. See ([#12071](https://github.com/remix-run/react-router/pull/12071)) + - \[PRERELEASE] Proxy prerendered loader data into prerender pass for HTML files to avoid double-invocations of the loader at build time + - Update `express.static` configurations to support prerendering ([#11547](https://github.com/remix-run/react-router/pull/11547)) - Assets in the `build/client/assets` folder are served as before, with a 1-year immutable `Cache-Control` header @@ -75,9 +22,9 @@ - For some reason, when adding this via `express.static`, it seems to also add a `Cache-Control: public, max-age=0` to `.data` files - Updated dependencies: - - `react-router@7.0.0-pre.0` - - `@react-router/express@7.0.0-pre.0` - - `@react-router/node@7.0.0-pre.0` + - `react-router@7.0.0` + - `@react-router/express@7.0.0` + - `@react-router/node@7.0.0` ## 2.9.0 diff --git a/packages/react-router-serve/package.json b/packages/react-router-serve/package.json index 571ef83316..4152187db6 100644 --- a/packages/react-router-serve/package.json +++ b/packages/react-router-serve/package.json @@ -1,6 +1,6 @@ { "name": "@react-router/serve", - "version": "7.0.0-pre.6", + "version": "7.0.0", "description": "Production application server for React Router", "bugs": { "url": "https://github.com/remix-run/react-router/issues" diff --git a/packages/react-router/CHANGELOG.md b/packages/react-router/CHANGELOG.md index de0f489571..de1ca9e811 100644 --- a/packages/react-router/CHANGELOG.md +++ b/packages/react-router/CHANGELOG.md @@ -1,69 +1,6 @@ # `react-router` -## 7.0.0-pre.6 - -### Patch Changes - -- chore: re-enable development warnings through a `development` exports condition. ([#12269](https://github.com/remix-run/react-router/pull/12269)) -- Remove unneeded dependency on @web3-storage/multipart-parser ([#12274](https://github.com/remix-run/react-router/pull/12274)) -- fix(react-router): (v7) fix static prerender of non-ascii characters ([#12161](https://github.com/remix-run/react-router/pull/12161)) -- Remove unneeded dependency on source-map ([#12275](https://github.com/remix-run/react-router/pull/12275)) - -## 7.0.0-pre.5 - -## 7.0.0-pre.4 - -## 7.0.0-pre.3 - -## 7.0.0-pre.2 - -### Major Changes - -- Migrate Remix type generics to React Router ([#12180](https://github.com/remix-run/react-router/pull/12180)) - - - These generics are provided for Remix v2 migration purposes - - These generics and the APIs they exist on should be considered informally deprecated in favor of the new `Route.*` types - - Anyone migrating from React Router v6 should probably not leverage these new generics and should migrate straight to the `Route.*` types - - For React Router v6 users, these generics are new and should not impact your app, with one exception - - `useFetcher` previously had an optional generic (used primarily by Remix v2) that expected the data type - - This has been updated in v7 to expect the type of the function that generates the data (i.e., `typeof loader`/`typeof action`) - - Therefore, you should update your usages: - - ❌ `useFetcher()` - - ✅ `useFetcher()` - -- - Consolidate types previously duplicated across `@remix-run/router`, `@remix-run/server-runtime`, and `@remix-run/react` now that they all live in `react-router` ([#12177](https://github.com/remix-run/react-router/pull/12177)) - - Examples: `LoaderFunction`, `LoaderFunctionArgs`, `ActionFunction`, `ActionFunctionArgs`, `DataFunctionArgs`, `RouteManifest`, `LinksFunction`, `Route`, `EntryRoute` - - The `RouteManifest` type used by the "remix" code is now slightly stricter because it is using the former `@remix-run/router` `RouteManifest` - - `Record -> Record` - - Removed `AppData` type in favor of inlining `unknown` in the few locations it was used - - Removed `ServerRuntimeMeta*` types in favor of the `Meta*` types they were duplicated from -- Drop support for Node 18, update minimum Node vestion to 20 ([#12171](https://github.com/remix-run/react-router/pull/12171)) - - - Remove `installGlobals()` as this should no longer be necessary - -- Update `cookie` dependency to `^1.0.1` - please see the [release notes](https://github.com/jshttp/cookie/releases) for any breaking changes ([#12172](https://github.com/remix-run/react-router/pull/12172)) - -### Patch Changes - -- Replace `substr` with `substring` ([#12080](https://github.com/remix-run/react-router/pull/12080)) -- Remove the deprecated `json` utility ([#12146](https://github.com/remix-run/react-router/pull/12146)) - - - You can use [`Response.json`](https://developer.mozilla.org/en-US/docs/Web/API/Response/json_static) if you still need to construct JSON responses in your app - -- Updated dependencies: - - `react-router@7.0.0-pre.2` - -## 7.0.0-pre.1 - -### Patch Changes - -- Fix typegen for routes with a client loader but no server loader ([#12117](https://github.com/remix-run/react-router/pull/12117)) -- - Fix `react-router-serve` handling of prerendered HTML files by removing the `redirect: false` option so it now falls back on the default `redirect: true` behavior of redirecting from `/folder` -> `/folder/` which will then pick up `/folder/index.html` from disk. See https://expressjs.com/en/resources/middleware/serve-static.html ([#12071](https://github.com/remix-run/react-router/pull/12071)) - - Proxy prerendered loader data into prerender pass for HTML files to avoid double-invocations of the loader at build time -- Updated dependencies: - - `react-router@7.0.0-pre.1` - -## 7.0.0-pre.0 +## 7.0.0 ### Major Changes @@ -79,16 +16,22 @@ - Collapse `react-router-dom` into `react-router` - Collapse `@remix-run/server-runtime` into `react-router` - Collapse `@remix-run/testing` into `react-router` -- Remove single_fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522)) + +- Remove single\_fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522)) + - Drop support for Node 16, React Router SSR now requires Node 18 or higher ([#11391](https://github.com/remix-run/react-router/pull/11391)) + - Remove `future.v7_startTransition` flag ([#11696](https://github.com/remix-run/react-router/pull/11696)) + - - Expose the underlying router promises from the following APIs for compsition in React 19 APIs: ([#11521](https://github.com/remix-run/react-router/pull/11521)) - `useNavigate()` - `useSubmit` - `useFetcher().load` - `useFetcher().submit` - `useRevalidator.revalidate` + - Remove `future.v7_normalizeFormMethod` future flag ([#11697](https://github.com/remix-run/react-router/pull/11697)) + - For Remix consumers migrating to React Router, the `crypto` global from the [Web Crypto API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API) is now required when using cookie and session APIs. This means that the following APIs are provided from `react-router` rather than platform-specific packages: ([#11837](https://github.com/remix-run/react-router/pull/11837)) - `createCookie` @@ -139,27 +82,62 @@ - `Search` - update minimum node version to 18 ([#11690](https://github.com/remix-run/react-router/pull/11690)) + - Remove `future.v7_prependBasename` from the ionternalized `@remix-run/router` package ([#11726](https://github.com/remix-run/react-router/pull/11726)) + +- Migrate Remix type generics to React Router ([#12180](https://github.com/remix-run/react-router/pull/12180)) + + - These generics are provided for Remix v2 migration purposes + - These generics and the APIs they exist on should be considered informally deprecated in favor of the new `Route.*` types + - Anyone migrating from React Router v6 should probably not leverage these new generics and should migrate straight to the `Route.*` types + - For React Router v6 users, these generics are new and should not impact your app, with one exception + - `useFetcher` previously had an optional generic (used primarily by Remix v2) that expected the data type + - This has been updated in v7 to expect the type of the function that generates the data (i.e., `typeof loader`/`typeof action`) + - Therefore, you should update your usages: + - ❌ `useFetcher()` + - ✅ `useFetcher()` + - Remove `future.v7_throwAbortReason` from internalized `@remix-run/router` package ([#11728](https://github.com/remix-run/react-router/pull/11728)) + - Add `exports` field to all packages ([#11675](https://github.com/remix-run/react-router/pull/11675)) + - node package no longer re-exports from react-router ([#11702](https://github.com/remix-run/react-router/pull/11702)) + - renamed RemixContext to FrameworkContext ([#11705](https://github.com/remix-run/react-router/pull/11705)) + - updates the minimum React version to 18 ([#11689](https://github.com/remix-run/react-router/pull/11689)) + - PrefetchPageDescriptor replaced by PageLinkDescriptor ([#11960](https://github.com/remix-run/react-router/pull/11960)) + +- - Consolidate types previously duplicated across `@remix-run/router`, `@remix-run/server-runtime`, and `@remix-run/react` now that they all live in `react-router` ([#12177](https://github.com/remix-run/react-router/pull/12177)) + - Examples: `LoaderFunction`, `LoaderFunctionArgs`, `ActionFunction`, `ActionFunctionArgs`, `DataFunctionArgs`, `RouteManifest`, `LinksFunction`, `Route`, `EntryRoute` + - The `RouteManifest` type used by the "remix" code is now slightly stricter because it is using the former `@remix-run/router` `RouteManifest` + - `Record -> Record` + - Removed `AppData` type in favor of inlining `unknown` in the few locations it was used + - Removed `ServerRuntimeMeta*` types in favor of the `Meta*` types they were duplicated from + - - Remove the `future.v7_partialHydration` flag ([#11725](https://github.com/remix-run/react-router/pull/11725)) - This also removes the `` prop - To migrate, move the `fallbackElement` to a `hydrateFallbackElement`/`HydrateFallback` on your root route - Also worth nothing there is a related breaking changer with this future flag: - Without `future.v7_partialHydration` (when using `fallbackElement`), `state.navigation` was populated during the initial load - With `future.v7_partialHydration`, `state.navigation` remains in an `"idle"` state during the initial load + - Remove `v7_relativeSplatPath` future flag ([#11695](https://github.com/remix-run/react-router/pull/11695)) + +- Drop support for Node 18, update minimum Node vestion to 20 ([#12171](https://github.com/remix-run/react-router/pull/12171)) + + - Remove `installGlobals()` as this should no longer be necessary + - Remove remaining future flags ([#11820](https://github.com/remix-run/react-router/pull/11820)) - React Router `v7_skipActionErrorRevalidation` - Remix `v3_fetcherPersist`, `v3_relativeSplatPath`, `v3_throwAbortReason` - rename createRemixStub to createRoutesStub ([#11692](https://github.com/remix-run/react-router/pull/11692)) + - Remove `@remix-run/router` deprecated `detectErrorBoundary` option in favor of `mapRouteProperties` ([#11751](https://github.com/remix-run/react-router/pull/11751)) + - Add `react-router/dom` subpath export to properly enable `react-dom` as an optional `peerDependency` ([#11851](https://github.com/remix-run/react-router/pull/11851)) - This ensures that we don't blindly `import ReactDOM from "react-dom"` in `` in order to access `ReactDOM.flushSync()`, since that would break `createMemoryRouter` use cases in non-DOM environments @@ -171,6 +149,8 @@ - Remove `future.v7_fetcherPersist` flag ([#11731](https://github.com/remix-run/react-router/pull/11731)) +- Update `cookie` dependency to `^1.0.1` - please see the [release notes](https://github.com/jshttp/cookie/releases) for any breaking changes ([#12172](https://github.com/remix-run/react-router/pull/12172)) + ### Minor Changes - - Add support for `prerender` config in the React Router vite plugin, to support existing SSG use-cases ([#11539](https://github.com/remix-run/react-router/pull/11539)) @@ -178,19 +158,17 @@ - `prerender` can either be an array of string paths, or a function (sync or async) that returns an array of strings so that you can dynamically generate the paths by talking to your CMS, etc. ```ts - export default defineConfig({ - plugins: [ - reactRouter({ - async prerender() { - let slugs = await fakeGetSlugsFromCms(); - // Prerender these paths into `.html` files at build time, and `.data` - // files if they have loaders - return ["/", "/about", ...slugs.map((slug) => `/product/${slug}`)]; - }, - }), - tsconfigPaths(), - ], - }); + // react-router.config.ts + import type { Config } from "@react-router/dev/config"; + + export default { + async prerender() { + let slugs = await fakeGetSlugsFromCms(); + // Prerender these paths into `.html` files at build time, and `.data` + // files if they have loaders + return ["/", "/about", ...slugs.map((slug) => `/product/${slug}`)]; + }, + } satisfies Config; async function fakeGetSlugsFromCms() { await new Promise((r) => setTimeout(r, 1000)); @@ -198,7 +176,7 @@ } ``` -- [REMOVE] Allow returning undefined from loaders/actions part 2 ([#12057](https://github.com/remix-run/react-router/pull/12057)) +- \[REMOVE] Allow returning undefined from loaders/actions part 2 ([#12057](https://github.com/remix-run/react-router/pull/12057)) - This is a follow up to #11680 which missed some of the Remix codepaths @@ -212,6 +190,7 @@ ``` - Remove duplicate `RouterProvider` impliementations ([#11679](https://github.com/remix-run/react-router/pull/11679)) + - ### Typesafety improvements ([#12019](https://github.com/remix-run/react-router/pull/12019)) React Router now generates types for each of your route modules. @@ -233,16 +212,6 @@ - `LoaderData` : Loader data from `loader` and/or `clientLoader` within your route module - `ActionData` : Action data from `action` and/or `clientAction` within your route module - These types are then used to create types for route export args and props: - - - `LoaderArgs` - - `ClientLoaderArgs` - - `ActionArgs` - - `ClientActionArgs` - - `HydrateFallbackProps` - - `ComponentProps` (for the `default` export) - - `ErrorBoundaryProps` - In the future, we plan to add types for the rest of the route module exports: `meta`, `links`, `headers`, `shouldRevalidate`, etc. We also plan to generate types for typesafe `Link`s: @@ -252,123 +221,45 @@ // typesafe `to` and `params` based on the available routes in your app ``` - #### Setup - - React Router will generate types into a `.react-router/` directory at the root of your app. - This directory is fully managed by React Router and is derived based on your route config (`routes.ts`). - - 👉 **Add `.react-router/` to `.gitignore`** - - ```txt - .react-router - ``` - - You should also ensure that generated types for routes are always present before running typechecking, - especially for running typechecking in CI. - - 👉 **Add `react-router typegen` to your `typecheck` command in `package.json`** - - ```json - { - "scripts": { - "typecheck": "react-router typegen && tsc" - } - } - ``` - - To get TypeScript to use those generated types, you'll need to add them to `include` in `tsconfig.json`. - And to be able to import them as if they files next to your route modules, you'll also need to configure `rootDirs`. - - 👉 **Configure `tsconfig.json` for generated types** - - ```json - { - "include": [".react-router/types/**/*"], - "compilerOptions": { - "rootDirs": [".", "./.react-router/types"] - } - } - ``` - - #### `typegen` command - - You can manually generate types with the new `typegen` command: - - ```sh - react-router typegen - ``` - - However, manual type generation is tedious and types can get out of sync quickly if you ever forget to run `typegen`. - Instead, we recommend that you setup our new TypeScript plugin which will automatically generate fresh types whenever routes change. - That way, you'll always have up-to-date types. - - #### TypeScript plugin - - To get automatic type generation, you can use our new TypeScript plugin. + Check out our docs for more: - 👉 **Add the TypeScript plugin to `tsconfig.json`** + - [_Explanations > Type Safety_](https://reactrouter.com/dev/guides/explanation/type-safety) + - [_How-To > Setting up type safety_](https://reactrouter.com/dev/guides/how-to/setting-up-type-safety) - ```json - { - "compilerOptions": { - "plugins": [{ "name": "@react-router/dev" }] - } - } - ``` +- Stabilize `unstable_dataStrategy` ([#11969](https://github.com/remix-run/react-router/pull/11969)) - We plan to add some other goodies to our TypeScript plugin soon, including: +- Stabilize `unstable_patchRoutesOnNavigation` ([#11970](https://github.com/remix-run/react-router/pull/11970)) - - Automatic `jsdoc` for route exports that include links to official docs - - Autocomplete for route exports - - Warnings for non-HMR compliant exports +### Patch Changes - ##### VSCode +- No changes ([`506329c4e`](https://github.com/remix-run/react-router/commit/506329c4e2e7aba9837cbfa44df6103b49423745)) - TypeScript looks for plugins registered in `tsconfig.json` in the local `node_modules/`, - but VSCode ships with its own copy of TypeScript that is installed outside of your project. - For TypeScript plugins to work, you'll need to tell VSCode to use the local workspace version of TypeScript. - For security reasons, [VSCode won't use the workspace version of TypeScript](https://code.visualstudio.com/docs/typescript/typescript-compiling#_using-the-workspace-version-of-typescript) until you manually opt-in. +- \[REMOVE] Changeset to bump pre.4 release ([#11871](https://github.com/remix-run/react-router/pull/11871)) - Your project should have a `.vscode/settings.json` with the following settings: +- chore: re-enable development warnings through a `development` exports condition. ([#12269](https://github.com/remix-run/react-router/pull/12269)) - ```json - { - "typescript.tsdk": "node_modules/typescript/lib", - "typescript.enablePromptUseWorkspaceTsdk": true - } - ``` +- Remove unstable upload handler. ([#12015](https://github.com/remix-run/react-router/pull/12015)) - That way [VSCode will ask you](https://code.visualstudio.com/updates/v1_45#_prompt-users-to-switch-to-the-workspace-version-of-typescript) if you want to use the workspace version of TypeScript the first time you open a TS file in that project. +- \[PRERELEASE] Fix typegen for routes with a client loader but no server loader ([#12117](https://github.com/remix-run/react-router/pull/12117)) - > [!IMPORTANT] - > You'll need to install dependencies first so that the workspace version of TypeScript is available. +- Remove unneeded dependency on @web3-storage/multipart-parser ([#12274](https://github.com/remix-run/react-router/pull/12274)) - 👉 **Select "Allow" when VSCode asks if you want to use the workspace version of TypeScript** +- Fix redirects returned from loaders/actions using `data()` ([#12021](https://github.com/remix-run/react-router/pull/12021)) - Otherwise, you can also manually opt-in to the workspace version: +- - \[PRERELEASE] Fix `react-router-serve` handling of prerendered HTML files by removing the `redirect: false` option so it now falls back on the default `redirect: true` behavior of redirecting from `/folder` -> `/folder/` which will then pick up `/folder/index.html` from disk. See ([#12071](https://github.com/remix-run/react-router/pull/12071)) + - \[PRERELEASE] Proxy prerendered loader data into prerender pass for HTML files to avoid double-invocations of the loader at build time - 1. Open up any TypeScript file in your project - 2. Open up the VSCode Command Palette (Cmd+Shift+P) - 3. Search for `Select TypeScript Version` - 4. Choose `Use Workspace Version` - 5. Quit and reopen VSCode +- fix(react-router): (v7) fix static prerender of non-ascii characters ([#12161](https://github.com/remix-run/react-router/pull/12161)) - ##### Troubleshooting +- \[REMOVE] Rename RemixRouter->DataRouter ([#12062](https://github.com/remix-run/react-router/pull/12062)) - In VSCode, open up any TypeScript file in your project and then use CMD+SHIFT+P to select `Open TS Server log`. - There should be a log for `[react-router] setup` that indicates that the plugin was resolved correctly. - Then look for any errors in the log. +- Replace `substr` with `substring` ([#12080](https://github.com/remix-run/react-router/pull/12080)) -- Stabilize `unstable_dataStrategy` ([#11969](https://github.com/remix-run/react-router/pull/11969)) -- Stabilize `unstable_patchRoutesOnNavigation` ([#11970](https://github.com/remix-run/react-router/pull/11970)) +- Remove the deprecated `json` utility ([#12146](https://github.com/remix-run/react-router/pull/12146)) -### Patch Changes + - You can use [`Response.json`](https://developer.mozilla.org/en-US/docs/Web/API/Response/json_static) if you still need to construct JSON responses in your app -- Remove unstable upload handler. ([#12015](https://github.com/remix-run/react-router/pull/12015)) -- Fix redirects returned from loaders/actions using `data()` ([#12021](https://github.com/remix-run/react-router/pull/12021)) -- [REMOVE] Rename RemixRouter->DataRouter ([#12062](https://github.com/remix-run/react-router/pull/12062)) -- Updated dependencies: - - `react-router@7.0.0-pre.0` +- Remove unneeded dependency on source-map ([#12275](https://github.com/remix-run/react-router/pull/12275)) ## 6.28.0 diff --git a/packages/react-router/package.json b/packages/react-router/package.json index 66e3fc431a..7d78b492c5 100644 --- a/packages/react-router/package.json +++ b/packages/react-router/package.json @@ -1,6 +1,6 @@ { "name": "react-router", - "version": "7.0.0-pre.6", + "version": "7.0.0", "description": "Declarative routing for React", "keywords": [ "react", From f8d9162a066bec637e22637b9289f5c9832497ce Mon Sep 17 00:00:00 2001 From: Michael Jackson Date: Thu, 21 Nov 2024 22:53:34 -0800 Subject: [PATCH 2/2] Fixup changelogs --- CHANGELOG.md | 10 ++++------ packages/create-react-router/CHANGELOG.md | 4 +++- packages/react-router-architect/CHANGELOG.md | 2 +- packages/react-router-cloudflare/CHANGELOG.md | 2 +- packages/react-router-dev/CHANGELOG.md | 19 +++++++++---------- packages/react-router-express/CHANGELOG.md | 4 ++-- packages/react-router-fs-routes/CHANGELOG.md | 4 +++- packages/react-router-node/CHANGELOG.md | 4 ++-- .../CHANGELOG.md | 7 ++----- packages/react-router-serve/CHANGELOG.md | 7 ++----- packages/react-router/CHANGELOG.md | 15 +-------------- 11 files changed, 30 insertions(+), 48 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 75932bd8cc..5ab1d6f577 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,7 +36,7 @@ We manage release notes in this file instead of the paginated Github Releases Pa - [Minor Changes](#minor-changes) - [Patch Changes](#patch-changes) - [Changes by Package](#changes-by-package) -- [**Full Changelog**: `v6.26.2...v7.0.0`](#full-changelog-v6262v700) +- [**Full Changelog**: `v6.28.0...v7.0.0`](#full-changelog-v6280v700) - [v6.28.0](#v6280) - [What's Changed](#whats-changed) - [Minor Changes](#minor-changes-1) @@ -252,11 +252,9 @@ Date: YYYY-MM-DD **Full Changelog**: [`v7.X.Y...v7.X.Y`](https://github.com/remix-run/react-router/compare/react-router@7.X.Y...react-router@7.X.Y) --> -<<<<<<< HEAD - ## v7.0.0 -Date: 2024-??-?? +Date: 2024-11-21 ### Breaking Changes @@ -264,7 +262,7 @@ Date: 2024-??-?? - The `react-router-dom`, `@remix-run/react`, `@remix-run/server-runtime`, and `@remix-run/router` have been collapsed into the `react-router` package - To ease migration, `react-router-dom` is still published in v7 as a re-export of everything from `react-router` -- The `@remix-run/cloudflare-pages` and `@remix-run/cloudflare-workers` have been collapsed into `@rewact0-router/cloudflare` package` +- The `@remix-run/cloudflare-pages` and `@remix-run/cloudflare-workers` have been collapsed into `@react-router/cloudflare` package` - The `react-router-dom-v5-compat` and `react-router-native` packages are removed starting with v7 #### Removed Adapter Re-exports @@ -792,7 +790,7 @@ async function fakeGetSlugsFromCms() { - [`@react-router/remix-config-routes-adapter`](https://github.com/remix-run/react-router/blob/react-router%407.0.0/packages/react-router-remix-config-routes-adapter/CHANGELOG.md#700) - [`@react-router/serve`](https://github.com/remix-run/react-router/blob/react-router%407.0.0/packages/react-router-serve/CHANGELOG.md#700) -# **Full Changelog**: [`v6.26.2...v7.0.0`](https://github.com/remix-run/react-router/compare/react-router@6.26.2...react-router@7.0.0) +# **Full Changelog**: [`v6.28.0...v7.0.0`](https://github.com/remix-run/react-router/compare/react-router@6.28.0...react-router@7.0.0) ## v6.28.0 diff --git a/packages/create-react-router/CHANGELOG.md b/packages/create-react-router/CHANGELOG.md index a529000de5..41300a3cda 100644 --- a/packages/create-react-router/CHANGELOG.md +++ b/packages/create-react-router/CHANGELOG.md @@ -1,3 +1,5 @@ -# create-react-router +# `create-react-router` ## 7.0.0 + +Initial release. diff --git a/packages/react-router-architect/CHANGELOG.md b/packages/react-router-architect/CHANGELOG.md index 8d5f746013..3ebb931978 100644 --- a/packages/react-router-architect/CHANGELOG.md +++ b/packages/react-router-architect/CHANGELOG.md @@ -1,4 +1,4 @@ -# @react-router/architect +# `@react-router/architect` ## 7.0.0 diff --git a/packages/react-router-cloudflare/CHANGELOG.md b/packages/react-router-cloudflare/CHANGELOG.md index 02ebfdc5f3..780ea18d0d 100644 --- a/packages/react-router-cloudflare/CHANGELOG.md +++ b/packages/react-router-cloudflare/CHANGELOG.md @@ -1,4 +1,4 @@ -# @react-router/cloudflare +# `@react-router/cloudflare` ## 7.0.0 diff --git a/packages/react-router-dev/CHANGELOG.md b/packages/react-router-dev/CHANGELOG.md index 4fc0f81376..bda0e22275 100644 --- a/packages/react-router-dev/CHANGELOG.md +++ b/packages/react-router-dev/CHANGELOG.md @@ -1,4 +1,4 @@ -# `@remix-run/dev` +# `@react-router/dev` ## 7.0.0 @@ -16,7 +16,7 @@ +import { cloudflareDevProxy } from "@react-router/dev/vite/cloudflare"; ``` -- Remove single\_fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522)) +- Remove single_fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522)) - update minimum node version to 18 ([#11690](https://github.com/remix-run/react-router/pull/11690)) @@ -48,12 +48,13 @@ } satisfies Config; ``` -- - Consolidate types previously duplicated across `@remix-run/router`, `@remix-run/server-runtime`, and `@remix-run/react` now that they all live in `react-router` ([#12177](https://github.com/remix-run/react-router/pull/12177)) - - Examples: `LoaderFunction`, `LoaderFunctionArgs`, `ActionFunction`, `ActionFunctionArgs`, `DataFunctionArgs`, `RouteManifest`, `LinksFunction`, `Route`, `EntryRoute` - - The `RouteManifest` type used by the "remix" code is now slightly stricter because it is using the former `@remix-run/router` `RouteManifest` - - `Record -> Record` - - Removed `AppData` type in favor of inlining `unknown` in the few locations it was used - - Removed `ServerRuntimeMeta*` types in favor of the `Meta*` types they were duplicated from +- Consolidate types previously duplicated across `@remix-run/router`, `@remix-run/server-runtime`, and `@remix-run/react` now that they all live in `react-router` ([#12177](https://github.com/remix-run/react-router/pull/12177)) + + - Examples: `LoaderFunction`, `LoaderFunctionArgs`, `ActionFunction`, `ActionFunctionArgs`, `DataFunctionArgs`, `RouteManifest`, `LinksFunction`, `Route`, `EntryRoute` + - The `RouteManifest` type used by the "remix" code is now slightly stricter because it is using the former `@remix-run/router` `RouteManifest` + - `Record -> Record` + - Removed `AppData` type in favor of inlining `unknown` in the few locations it was used + - Removed `ServerRuntimeMeta*` types in favor of the `Meta*` types they were duplicated from - Update default `isbot` version to v5 and drop support for `isbot@3` ([#11770](https://github.com/remix-run/react-router/pull/11770)) @@ -129,8 +130,6 @@ - chore: warn instead of error for min node version in CLI ([#12270](https://github.com/remix-run/react-router/pull/12270)) - chore: re-enable development warnings through a `development` exports condition. ([#12269](https://github.com/remix-run/react-router/pull/12269)) - include root "react-dom" module for optimization ([#12060](https://github.com/remix-run/react-router/pull/12060)) -- - \[PRERELEASE] Fix `react-router-serve` handling of prerendered HTML files by removing the `redirect: false` option so it now falls back on the default `redirect: true` behavior of redirecting from `/folder` -> `/folder/` which will then pick up `/folder/index.html` from disk. See ([#12071](https://github.com/remix-run/react-router/pull/12071)) - - \[PRERELEASE] Proxy prerendered loader data into prerender pass for HTML files to avoid double-invocations of the loader at build time - resolve config directory relative to flat output file structure ([#12187](https://github.com/remix-run/react-router/pull/12187)) - if we are in SAP mode, always render the `index.html` for hydration ([#12268](https://github.com/remix-run/react-router/pull/12268)) - fix(react-router): (v7) fix static prerender of non-ascii characters ([#12161](https://github.com/remix-run/react-router/pull/12161)) diff --git a/packages/react-router-express/CHANGELOG.md b/packages/react-router-express/CHANGELOG.md index 6845f8db8a..de8e8cdda8 100644 --- a/packages/react-router-express/CHANGELOG.md +++ b/packages/react-router-express/CHANGELOG.md @@ -1,10 +1,10 @@ -# `@remix-run/express` +# `@react-router/express` ## 7.0.0 ### Major Changes -- Remove single\_fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522)) +- Remove single_fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522)) - update minimum node version to 18 ([#11690](https://github.com/remix-run/react-router/pull/11690)) - Add `exports` field to all packages ([#11675](https://github.com/remix-run/react-router/pull/11675)) - node package no longer re-exports from react-router ([#11702](https://github.com/remix-run/react-router/pull/11702)) diff --git a/packages/react-router-fs-routes/CHANGELOG.md b/packages/react-router-fs-routes/CHANGELOG.md index 31fb9fb7a2..33442d22b9 100644 --- a/packages/react-router-fs-routes/CHANGELOG.md +++ b/packages/react-router-fs-routes/CHANGELOG.md @@ -1,7 +1,9 @@ -# @react-router/fs-routes +# `@react-router/fs-routes` ## 7.0.0 +Initial release. + ### Patch Changes - Updated dependencies: diff --git a/packages/react-router-node/CHANGELOG.md b/packages/react-router-node/CHANGELOG.md index c1c31cefc3..632d3553fe 100644 --- a/packages/react-router-node/CHANGELOG.md +++ b/packages/react-router-node/CHANGELOG.md @@ -1,10 +1,10 @@ -# `@remix-run/node` +# `@react-router/node` ## 7.0.0 ### Major Changes -- Remove single\_fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522)) +- Remove single_fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522)) - For Remix consumers migrating to React Router, the `crypto` global from the [Web Crypto API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API) is now required when using cookie and session APIs. This means that the following APIs are provided from `react-router` rather than platform-specific packages: ([#11837](https://github.com/remix-run/react-router/pull/11837)) diff --git a/packages/react-router-remix-routes-option-adapter/CHANGELOG.md b/packages/react-router-remix-routes-option-adapter/CHANGELOG.md index cafd6db3f1..c67fc1a1dd 100644 --- a/packages/react-router-remix-routes-option-adapter/CHANGELOG.md +++ b/packages/react-router-remix-routes-option-adapter/CHANGELOG.md @@ -1,8 +1,5 @@ -# @react-router/remix-config-routes-adapter +# `@react-router/remix-config-routes-adapter` ## 7.0.0 -### Patch Changes - -- Updated dependencies: - - `@react-router/dev@7.0.0` +Initial release. diff --git a/packages/react-router-serve/CHANGELOG.md b/packages/react-router-serve/CHANGELOG.md index fece82819f..a1f425a755 100644 --- a/packages/react-router-serve/CHANGELOG.md +++ b/packages/react-router-serve/CHANGELOG.md @@ -1,19 +1,16 @@ -# `@remix-run/serve` +# `@react-router/serve` ## 7.0.0 ### Major Changes -- Remove single\_fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522)) +- Remove single_fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522)) - update minimum node version to 18 ([#11690](https://github.com/remix-run/react-router/pull/11690)) - Add `exports` field to all packages ([#11675](https://github.com/remix-run/react-router/pull/11675)) - node package no longer re-exports from react-router ([#11702](https://github.com/remix-run/react-router/pull/11702)) ### Patch Changes -- - \[PRERELEASE] Fix `react-router-serve` handling of prerendered HTML files by removing the `redirect: false` option so it now falls back on the default `redirect: true` behavior of redirecting from `/folder` -> `/folder/` which will then pick up `/folder/index.html` from disk. See ([#12071](https://github.com/remix-run/react-router/pull/12071)) - - \[PRERELEASE] Proxy prerendered loader data into prerender pass for HTML files to avoid double-invocations of the loader at build time - - Update `express.static` configurations to support prerendering ([#11547](https://github.com/remix-run/react-router/pull/11547)) - Assets in the `build/client/assets` folder are served as before, with a 1-year immutable `Cache-Control` header diff --git a/packages/react-router/CHANGELOG.md b/packages/react-router/CHANGELOG.md index de1ca9e811..9360f675af 100644 --- a/packages/react-router/CHANGELOG.md +++ b/packages/react-router/CHANGELOG.md @@ -17,7 +17,7 @@ - Collapse `@remix-run/server-runtime` into `react-router` - Collapse `@remix-run/testing` into `react-router` -- Remove single\_fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522)) +- Remove single_fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522)) - Drop support for Node 16, React Router SSR now requires Node 18 or higher ([#11391](https://github.com/remix-run/react-router/pull/11391)) @@ -176,10 +176,6 @@ } ``` -- \[REMOVE] Allow returning undefined from loaders/actions part 2 ([#12057](https://github.com/remix-run/react-router/pull/12057)) - - - This is a follow up to #11680 which missed some of the Remix codepaths - - Params, loader data, and action data as props for route component exports ([#11961](https://github.com/remix-run/react-router/pull/11961)) ```tsx @@ -234,25 +230,16 @@ - No changes ([`506329c4e`](https://github.com/remix-run/react-router/commit/506329c4e2e7aba9837cbfa44df6103b49423745)) -- \[REMOVE] Changeset to bump pre.4 release ([#11871](https://github.com/remix-run/react-router/pull/11871)) - - chore: re-enable development warnings through a `development` exports condition. ([#12269](https://github.com/remix-run/react-router/pull/12269)) - Remove unstable upload handler. ([#12015](https://github.com/remix-run/react-router/pull/12015)) -- \[PRERELEASE] Fix typegen for routes with a client loader but no server loader ([#12117](https://github.com/remix-run/react-router/pull/12117)) - - Remove unneeded dependency on @web3-storage/multipart-parser ([#12274](https://github.com/remix-run/react-router/pull/12274)) - Fix redirects returned from loaders/actions using `data()` ([#12021](https://github.com/remix-run/react-router/pull/12021)) -- - \[PRERELEASE] Fix `react-router-serve` handling of prerendered HTML files by removing the `redirect: false` option so it now falls back on the default `redirect: true` behavior of redirecting from `/folder` -> `/folder/` which will then pick up `/folder/index.html` from disk. See ([#12071](https://github.com/remix-run/react-router/pull/12071)) - - \[PRERELEASE] Proxy prerendered loader data into prerender pass for HTML files to avoid double-invocations of the loader at build time - - fix(react-router): (v7) fix static prerender of non-ascii characters ([#12161](https://github.com/remix-run/react-router/pull/12161)) -- \[REMOVE] Rename RemixRouter->DataRouter ([#12062](https://github.com/remix-run/react-router/pull/12062)) - - Replace `substr` with `substring` ([#12080](https://github.com/remix-run/react-router/pull/12080)) - Remove the deprecated `json` utility ([#12146](https://github.com/remix-run/react-router/pull/12146))