diff --git a/.changeset/giant-eggs-march.md b/.changeset/giant-eggs-march.md deleted file mode 100644 index d68d180a949..00000000000 --- a/.changeset/giant-eggs-march.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remix-run/eslint-config": minor ---- - -Add deprecation warning to `@remix-run/eslint-config` diff --git a/.changeset/grumpy-llamas-leave.md b/.changeset/grumpy-llamas-leave.md deleted file mode 100644 index f838030d4df..00000000000 --- a/.changeset/grumpy-llamas-leave.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remix-run/server-runtime": patch ---- - -Update externally-accessed resource routes warning to cover null usage as well diff --git a/.changeset/popular-humans-attend.md b/.changeset/popular-humans-attend.md deleted file mode 100644 index 0b9cb985939..00000000000 --- a/.changeset/popular-humans-attend.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -"@remix-run/dev": minor ---- - -Add support for `routes.ts` behind `future.unstable_routeConfig` flag to assist with the migration to React Router v7. - -Config-based routing is the new default in React Router v7, configured via the `routes.ts` file in the app directory. Support for `routes.ts` and its related APIs in Remix are designed as a migration path to help minimize the number of changes required when moving your Remix project over to React Router v7. While some new packages have been introduced within the `@remix-run` scope, these new packages only exist to keep the code in `routes.ts` as similar as possible to the equivalent code for React Router v7. - -When the `unstable_routeConfig` future flag is enabled, Remix's built-in file system routing will be disabled and your project will opted into React Router v7's config-based routing. - -To enable the flag, in your `vite.config.ts` file: - -```ts -remix({ - future: { - unstable_routeConfig: true, - }, -}); -``` - -A minimal `routes.ts` file to support Remix's built-in file system routing looks like this: - -```ts -// app/routes.ts -import { flatRoutes } from "@remix-run/fs-routes"; -import type { RouteConfig } from "@remix-run/route-config"; - -export const routes: RouteConfig = flatRoutes(); -``` diff --git a/.changeset/rude-clocks-prove.md b/.changeset/rude-clocks-prove.md deleted file mode 100644 index 7496b7fc931..00000000000 --- a/.changeset/rude-clocks-prove.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@remix-run/dev": minor ---- - -- Log deprecation warnings for v3 future flags -- Add `@deprecated` annotations to `json`/`defer` utilities diff --git a/.changeset/tiny-zebras-stare.md b/.changeset/tiny-zebras-stare.md deleted file mode 100644 index 89b99976362..00000000000 --- a/.changeset/tiny-zebras-stare.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remix-run/server-runtime": minor ---- - -Deprecate `SerializeFrom` in favor of generics because it will be removed in React Router v7 diff --git a/.changeset/twenty-nails-occur.md b/.changeset/twenty-nails-occur.md deleted file mode 100644 index 2a5c2e42de8..00000000000 --- a/.changeset/twenty-nails-occur.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remix-run/react": patch ---- - -[REMOVE] Bump router diff --git a/.changeset/twenty-waves-cheer.md b/.changeset/twenty-waves-cheer.md deleted file mode 100644 index 9778e9412b2..00000000000 --- a/.changeset/twenty-waves-cheer.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remix-run/react": patch ---- - -Fix `defaultShouldRevalidate` value when using single fetch diff --git a/CHANGELOG.md b/CHANGELOG.md index be263996cc9..19e802c8099 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,163 +13,168 @@ We manage release notes in this file instead of the paginated Github Releases Pa Table of Contents - [Remix Releases](#remix-releases) - - [v2.13.1](#v2131) + - [v2.14.0](#v2140) + - [Minor Changes](#minor-changes) - [Patch Changes](#patch-changes) + - [Updated Dependencies](#updated-dependencies) + - [Changes by Package](#changes-by-package) + - [v2.13.1](#v2131) + - [Patch Changes](#patch-changes-1) - [v2.13.0](#v2130) - [What's Changed](#whats-changed) - [Stabilized APIs](#stabilized-apis) - - [Minor Changes](#minor-changes) - - [Patch Changes](#patch-changes-1) - - [Updated Dependencies](#updated-dependencies) - - [Changes by Package](#changes-by-package) - - [v2.12.1](#v2121) + - [Minor Changes](#minor-changes-1) - [Patch Changes](#patch-changes-2) + - [Updated Dependencies](#updated-dependencies-1) - [Changes by Package](#changes-by-package-1) + - [v2.12.1](#v2121) + - [Patch Changes](#patch-changes-3) + - [Changes by Package](#changes-by-package-2) - [v2.12.0](#v2120) - [What's Changed](#whats-changed-1) - [Future Flag for Automatic Dependency Optimization (unstable)](#future-flag-for-automatic-dependency-optimization-unstable) - [Improved Single Fetch Type Safety (unstable)](#improved-single-fetch-type-safety-unstable) - [Updates to Single Fetch Revalidation Behavior (unstable)](#updates-to-single-fetch-revalidation-behavior-unstable) - - [Minor Changes](#minor-changes-1) - - [Patch Changes](#patch-changes-3) - - [Updated Dependencies](#updated-dependencies-1) - - [Changes by Package](#changes-by-package-2) - - [v2.11.2](#v2112) + - [Minor Changes](#minor-changes-2) - [Patch Changes](#patch-changes-4) - [Updated Dependencies](#updated-dependencies-2) - [Changes by Package](#changes-by-package-3) - - [v2.11.1](#v2111) + - [v2.11.2](#v2112) - [Patch Changes](#patch-changes-5) + - [Updated Dependencies](#updated-dependencies-3) - [Changes by Package](#changes-by-package-4) + - [v2.11.1](#v2111) + - [Patch Changes](#patch-changes-6) + - [Changes by Package](#changes-by-package-5) - [v2.11.0](#v2110) - [What's Changed](#whats-changed-2) - [Renamed `unstable_fogOfWar` future flag to `unstable_lazyRouteDiscovery` (unstable)](#renamed-unstable_fogofwar-future-flag-to-unstable_lazyroutediscovery-unstable) - [Removed `response` stub in Single Fetch (unstable)](#removed-response-stub-in-single-fetch-unstable) - - [Minor Changes](#minor-changes-2) - - [Patch Changes](#patch-changes-6) - - [Updated Dependencies](#updated-dependencies-3) - - [Changes by Package](#changes-by-package-5) - - [v2.10.3](#v2103) + - [Minor Changes](#minor-changes-3) - [Patch Changes](#patch-changes-7) - [Updated Dependencies](#updated-dependencies-4) - [Changes by Package](#changes-by-package-6) - - [v2.10.2](#v2102) + - [v2.10.3](#v2103) - [Patch Changes](#patch-changes-8) + - [Updated Dependencies](#updated-dependencies-5) - [Changes by Package](#changes-by-package-7) - - [v2.10.1](#v2101) + - [v2.10.2](#v2102) - [Patch Changes](#patch-changes-9) - - [Updated Dependencies](#updated-dependencies-5) - [Changes by Package](#changes-by-package-8) - - [v2.10.0](#v2100) - - [What's Changed](#whats-changed-3) - - [Lazy Route Discovery (a.k.a. "Fog of War")](#lazy-route-discovery-aka-fog-of-war) - - [Minor Changes](#minor-changes-3) + - [v2.10.1](#v2101) - [Patch Changes](#patch-changes-10) - [Updated Dependencies](#updated-dependencies-6) - [Changes by Package](#changes-by-package-9) - - [v2.9.2](#v292) - - [What's Changed](#whats-changed-4) - - [Updated Type-Safety for Single Fetch](#updated-type-safety-for-single-fetch) + - [v2.10.0](#v2100) + - [What's Changed](#whats-changed-3) + - [Lazy Route Discovery (a.k.a. "Fog of War")](#lazy-route-discovery-aka-fog-of-war) + - [Minor Changes](#minor-changes-4) - [Patch Changes](#patch-changes-11) - [Updated Dependencies](#updated-dependencies-7) - [Changes by Package](#changes-by-package-10) - - [v2.9.1](#v291) + - [v2.9.2](#v292) + - [What's Changed](#whats-changed-4) + - [Updated Type-Safety for Single Fetch](#updated-type-safety-for-single-fetch) - [Patch Changes](#patch-changes-12) + - [Updated Dependencies](#updated-dependencies-8) - [Changes by Package](#changes-by-package-11) + - [v2.9.1](#v291) + - [Patch Changes](#patch-changes-13) + - [Changes by Package](#changes-by-package-12) - [v2.9.0](#v290) - [What's Changed](#whats-changed-5) - [Single Fetch (unstable)](#single-fetch-unstable) - [Undici](#undici) - - [Minor Changes](#minor-changes-4) - - [Patch Changes](#patch-changes-13) - - [Updated Dependencies](#updated-dependencies-8) - - [Changes by Package](#changes-by-package-12) - - [v2.8.1](#v281) + - [Minor Changes](#minor-changes-5) - [Patch Changes](#patch-changes-14) - [Updated Dependencies](#updated-dependencies-9) - [Changes by Package](#changes-by-package-13) - - [v2.8.0](#v280) - - [Minor Changes](#minor-changes-5) + - [v2.8.1](#v281) - [Patch Changes](#patch-changes-15) - [Updated Dependencies](#updated-dependencies-10) - [Changes by Package](#changes-by-package-14) - - [2.7.2](#272) + - [v2.8.0](#v280) + - [Minor Changes](#minor-changes-6) - [Patch Changes](#patch-changes-16) - - [2.7.1](#271) + - [Updated Dependencies](#updated-dependencies-11) + - [Changes by Package](#changes-by-package-15) + - [2.7.2](#272) - [Patch Changes](#patch-changes-17) + - [2.7.1](#271) + - [Patch Changes](#patch-changes-18) - [v2.7.0](#v270) - [What's Changed](#whats-changed-6) - [Stabilized Vite Plugin](#stabilized-vite-plugin) - [New `Layout` Export](#new-layout-export) - [Basename support](#basename-support) - [Cloudflare Proxy as a Vite Plugin](#cloudflare-proxy-as-a-vite-plugin) - - [Minor Changes](#minor-changes-6) - - [Patch Changes](#patch-changes-18) - - [Updated Dependencies](#updated-dependencies-11) - - [Changes by Package](#changes-by-package-15) - - [v2.6.0](#v260) - - [What's Changed](#whats-changed-7) - - [Unstable Vite Plugin updates](#unstable-vite-plugin-updates) - [Minor Changes](#minor-changes-7) - [Patch Changes](#patch-changes-19) - [Updated Dependencies](#updated-dependencies-12) - [Changes by Package](#changes-by-package-16) - - [v2.5.1](#v251) + - [v2.6.0](#v260) + - [What's Changed](#whats-changed-7) + - [Unstable Vite Plugin updates](#unstable-vite-plugin-updates) + - [Minor Changes](#minor-changes-8) - [Patch Changes](#patch-changes-20) - [Updated Dependencies](#updated-dependencies-13) - [Changes by Package](#changes-by-package-17) + - [v2.5.1](#v251) + - [Patch Changes](#patch-changes-21) + - [Updated Dependencies](#updated-dependencies-14) + - [Changes by Package](#changes-by-package-18) - [v2.5.0](#v250) - [What's Changed](#whats-changed-8) - [SPA Mode (unstable)](#spa-mode-unstable) - [Server Bundles (unstable)](#server-bundles-unstable) - - [Minor Changes](#minor-changes-8) - - [Patch Changes](#patch-changes-21) - - [Updated Dependencies](#updated-dependencies-14) - - [Changes by Package](#changes-by-package-18) - - [v2.4.1](#v241) + - [Minor Changes](#minor-changes-9) - [Patch Changes](#patch-changes-22) - [Updated Dependencies](#updated-dependencies-15) - [Changes by Package](#changes-by-package-19) + - [v2.4.1](#v241) + - [Patch Changes](#patch-changes-23) + - [Updated Dependencies](#updated-dependencies-16) + - [Changes by Package](#changes-by-package-20) - [v2.4.0](#v240) - [What's Changed](#whats-changed-9) - [Client Data](#client-data) - [`future.v3_relativeSplatPath`](#futurev3_relativesplatpath) - [Vite Updates (Unstable)](#vite-updates-unstable) - - [Minor Changes](#minor-changes-9) - - [Patch Changes](#patch-changes-23) - - [Updated Dependencies](#updated-dependencies-16) - - [Changes by Package](#changes-by-package-20) - - [v2.3.1](#v231) + - [Minor Changes](#minor-changes-10) - [Patch Changes](#patch-changes-24) - [Updated Dependencies](#updated-dependencies-17) - [Changes by Package](#changes-by-package-21) + - [v2.3.1](#v231) + - [Patch Changes](#patch-changes-25) + - [Updated Dependencies](#updated-dependencies-18) + - [Changes by Package](#changes-by-package-22) - [v2.3.0](#v230) - [What's Changed](#whats-changed-10) - [Stabilized `useBlocker`](#stabilized-useblocker) - [`unstable_flushSync` API](#unstable_flushsync-api) - - [Minor Changes](#minor-changes-10) - - [Patch Changes](#patch-changes-25) - - [Updated Dependencies](#updated-dependencies-18) - - [Changes by Package](#changes-by-package-22) + - [Minor Changes](#minor-changes-11) + - [Patch Changes](#patch-changes-26) + - [Updated Dependencies](#updated-dependencies-19) + - [Changes by Package](#changes-by-package-23) - [v2.2.0](#v220) - [What's Changed](#whats-changed-11) - [Vite!](#vite) - [New Fetcher APIs](#new-fetcher-apis) - [Persistence Future Flag](#persistence-future-flag) - - [Minor Changes](#minor-changes-11) - - [Patch Changes](#patch-changes-26) - - [Updated Dependencies](#updated-dependencies-19) - - [Changes by Package](#changes-by-package-23) - - [v2.1.0](#v210) - - [What's Changed](#whats-changed-12) - - [View Transitions](#view-transitions) - - [Stable `createRemixStub`](#stable-createremixstub) - [Minor Changes](#minor-changes-12) - [Patch Changes](#patch-changes-27) - [Updated Dependencies](#updated-dependencies-20) - [Changes by Package](#changes-by-package-24) - - [v2.0.1](#v201) + - [v2.1.0](#v210) + - [What's Changed](#whats-changed-12) + - [View Transitions](#view-transitions) + - [Stable `createRemixStub`](#stable-createremixstub) + - [Minor Changes](#minor-changes-13) - [Patch Changes](#patch-changes-28) + - [Updated Dependencies](#updated-dependencies-21) + - [Changes by Package](#changes-by-package-25) + - [v2.0.1](#v201) + - [Patch Changes](#patch-changes-29) - [Changes by Package 🔗](#changes-by-package-) - [v2.0.0](#v200) - [Breaking Changes](#breaking-changes) @@ -181,8 +186,8 @@ We manage release notes in this file instead of the paginated Github Releases Pa - [Breaking Type Changes](#breaking-type-changes) - [New Features](#new-features) - [Other Notable Changes](#other-notable-changes) - - [Updated Dependencies](#updated-dependencies-21) - - [Changes by Package](#changes-by-package-25) + - [Updated Dependencies](#updated-dependencies-22) + - [Changes by Package](#changes-by-package-26) @@ -220,8 +225,11 @@ Date: YYYY-MM-DD - [`@remix-run/dev`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-dev/CHANGELOG.md#2XY) - [`@remix-run/eslint-config`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-eslint-config/CHANGELOG.md#2XY) - [`@remix-run/express`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-express/CHANGELOG.md#2XY) +- [`@remix-run/fs-routes`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-fs-routes/CHANGELOG.md#2XY) - [`@remix-run/node`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-node/CHANGELOG.md#2XY) - [`@remix-run/react`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-react/CHANGELOG.md#2XY) +- [`@remix-run/route-config`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-route-config/CHANGELOG.md#2XY) +- [`@remix-run/routes-option-adapter`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-routes-option-adapter/CHANGELOG.md#2XY) - [`@remix-run/serve`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-serve/CHANGELOG.md#2XY) - [`@remix-run/server-runtime`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-server-runtime/CHANGELOG.md#2XY) - [`@remix-run/testing`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-testing/CHANGELOG.md#2XY) @@ -230,6 +238,76 @@ Date: YYYY-MM-DD --> +## v2.14.0 + +Date: 2024-11-08 + +### Minor Changes + +- Deprecate `SerializeFrom` in favor of generics because it will be removed in React Router v7 ([#10173](https://github.com/remix-run/remix/pull/10173)) +- Add deprecation warning to `@remix-run/eslint-config` ([#10174](https://github.com/remix-run/remix/pull/10174)) +- Add support for `routes.ts` behind `future.unstable_routeConfig` flag to assist with the migration to React Router v7. ([#10107](https://github.com/remix-run/remix/pull/10107)) + + Config-based routing is the new default in React Router v7, configured via the `routes.ts` file in the app directory. Support for `routes.ts` and its related APIs in Remix are designed as a migration path to help minimize the number of changes required when moving your Remix project over to React Router v7. While some new packages have been introduced within the `@remix-run` scope, these new packages only exist to keep the code in `routes.ts` as similar as possible to the equivalent code for React Router v7. + + When the `unstable_routeConfig` future flag is enabled, Remix's built-in file system routing will be disabled and your project will opted into React Router v7's config-based routing. + + To enable the flag, in your `vite.config.ts` file: + + ```ts + remix({ + future: { + unstable_routeConfig: true, + }, + }); + ``` + + A minimal `routes.ts` file to support Remix's built-in file system routing looks like this: + + ```ts + // app/routes.ts + import { flatRoutes } from "@remix-run/fs-routes"; + import type { RouteConfig } from "@remix-run/route-config"; + + export const routes: RouteConfig = flatRoutes(); + ``` + +- Log deprecation warnings for v3 future flags ([#10126](https://github.com/remix-run/remix/pull/10126)) + - Add `@deprecated` annotations to `json`/`defer` utilities + +### Patch Changes + +- Fix `defaultShouldRevalidate` value when using single fetch ([#10139](https://github.com/remix-run/remix/pull/10139)) +- Update externally-accessed resource routes warning to cover null usage as well ([#10145](https://github.com/remix-run/remix/pull/10145)) + +### Updated Dependencies + +- [`react-router-dom@6.28.0`](https://github.com/remix-run/react-router/releases/tag/react-router%406.28.0) +- [`@remix-run/router@1.21.0`](https://github.com/remix-run/react-router/blob/main/packages/router/CHANGELOG.md#1210) + +### Changes by Package + +- [`create-remix`](https://github.com/remix-run/remix/blob/remix%402.14.0/packages/create-remix/CHANGELOG.md#2140) +- [`@remix-run/architect`](https://github.com/remix-run/remix/blob/remix%402.14.0/packages/remix-architect/CHANGELOG.md#2140) +- [`@remix-run/cloudflare`](https://github.com/remix-run/remix/blob/remix%402.14.0/packages/remix-cloudflare/CHANGELOG.md#2140) +- [`@remix-run/cloudflare-pages`](https://github.com/remix-run/remix/blob/remix%402.14.0/packages/remix-cloudflare-pages/CHANGELOG.md#2140) +- [`@remix-run/cloudflare-workers`](https://github.com/remix-run/remix/blob/remix%402.14.0/packages/remix-cloudflare-workers/CHANGELOG.md#2140) +- [`@remix-run/css-bundle`](https://github.com/remix-run/remix/blob/remix%402.14.0/packages/remix-css-bundle/CHANGELOG.md#2140) +- [`@remix-run/deno`](https://github.com/remix-run/remix/blob/remix%402.14.0/packages/remix-deno/CHANGELOG.md#2140) +- [`@remix-run/dev`](https://github.com/remix-run/remix/blob/remix%402.14.0/packages/remix-dev/CHANGELOG.md#2140) +- [`@remix-run/eslint-config`](https://github.com/remix-run/remix/blob/remix%402.14.0/packages/remix-eslint-config/CHANGELOG.md#2140) +- [`@remix-run/express`](https://github.com/remix-run/remix/blob/remix%402.14.0/packages/remix-express/CHANGELOG.md#2140) +- [`@remix-run/fs-routes`](https://github.com/remix-run/remix/blob/remix%402.14.0/packages/remix-fs-routes/CHANGELOG.md#2140) +- [`@remix-run/node`](https://github.com/remix-run/remix/blob/remix%402.14.0/packages/remix-node/CHANGELOG.md#2140) +- [`@remix-run/react`](https://github.com/remix-run/remix/blob/remix%402.14.0/packages/remix-react/CHANGELOG.md#2140) +- [`@remix-run/route-config`](https://github.com/remix-run/remix/blob/remix%402.14.0/packages/remix-route-config/CHANGELOG.md#2140) +- [`@remix-run/routes-option-adapter`](https://github.com/remix-run/remix/blob/remix%402.14.0/packages/remix-routes-option-adapter/CHANGELOG.md#2140) +- [`@remix-run/serve`](https://github.com/remix-run/remix/blob/remix%402.14.0/packages/remix-serve/CHANGELOG.md#2140) +- [`@remix-run/server-runtime`](https://github.com/remix-run/remix/blob/remix%402.14.0/packages/remix-server-runtime/CHANGELOG.md#2140) +- [`@remix-run/testing`](https://github.com/remix-run/remix/blob/remix%402.14.0/packages/remix-testing/CHANGELOG.md#2140) + +**Full Changelog**: [`v2.13.1...v2.14.0`](https://github.com/remix-run/remix/compare/remix@2.13.1...remix@2.14.0) + ## v2.13.1 Date: 2024-10-11 @@ -322,11 +400,11 @@ Date: 2024-09-19 ### Changes by Package -- [`@remix-run/cloudflare`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-cloudflare/CHANGELOG.md#2XY) -- [`@remix-run/deno`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-deno/CHANGELOG.md#2XY) -- [`@remix-run/dev`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-dev/CHANGELOG.md#2XY) -- [`@remix-run/node`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-node/CHANGELOG.md#2XY) -- [`@remix-run/server-runtime`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-server-runtime/CHANGELOG.md#2XY) +- [`@remix-run/cloudflare`](https://github.com/remix-run/remix/blob/remix%402.12.0/packages/remix-cloudflare/CHANGELOG.md#2121) +- [`@remix-run/deno`](https://github.com/remix-run/remix/blob/remix%402.12.0/packages/remix-deno/CHANGELOG.md#2121) +- [`@remix-run/dev`](https://github.com/remix-run/remix/blob/remix%402.12.0/packages/remix-dev/CHANGELOG.md#2121) +- [`@remix-run/node`](https://github.com/remix-run/remix/blob/remix%402.12.0/packages/remix-node/CHANGELOG.md#2121) +- [`@remix-run/server-runtime`](https://github.com/remix-run/remix/blob/remix%402.12.0/packages/remix-server-runtime/CHANGELOG.md#2121) **Full Changelog**: [`v2.12.0...v2.12.1`](https://github.com/remix-run/remix/compare/remix@2.12.0...remix@2.12.1) @@ -965,7 +1043,7 @@ You can now export an optional `Layout` component from your root route which wil #### Basename support -React Router has long supported a [`basename`](https://reactrouter.com/en/main/routers/create-browser-router#basename) config that allows you to serve your app within a subpath such as `http://localhost/myapp/*` without having to include the `/myapp` segment in all of your route paths. This was originally omitted from Remix because v1 nested folders file-convention made it pretty easy to put your route files in a `routes/myapp/` folder, giving you the same functionality. There has also been an [open proposal from the community](https://github.com/remix-run/remix/discussions/2891) to add this functionality. +React Router has long supported a [`basename`](https://reactrouter.com/v6/routers/create-browser-router#basename) config that allows you to serve your app within a subpath such as `http://localhost/myapp/*` without having to include the `/myapp` segment in all of your route paths. This was originally omitted from Remix because v1 nested folders file-convention made it pretty easy to put your route files in a `routes/myapp/` folder, giving you the same functionality. There has also been an [open proposal from the community](https://github.com/remix-run/remix/discussions/2891) to add this functionality. Two things have since changed that made us reconsider the lack of `basename` support: @@ -1023,7 +1101,7 @@ A few notes on the new plugin: - This gives parity with the Cloudflare preset for the Remix Vite plugin and keeps our templates leaner - `@remix-run/dev` - Vite: Cloudflare Proxy as a Vite plugin ([#8749](https://github.com/remix-run/remix/pull/8749)) - **⚠️ This is a breaking change for projects relying on Cloudflare support from the unstable Vite plugin** -- `@remix-run/dev` - Vite: Add a new `basename` option to the Vite plugin, allowing users to set the internal React Router [`basename`](https://reactrouter.com/en/main/routers/create-browser-router#basename) in order to to serve their applications underneath a subpath ([#8145](https://github.com/remix-run/remix/pull/8145)) +- `@remix-run/dev` - Vite: Add a new `basename` option to the Vite plugin, allowing users to set the internal React Router [`basename`](https://reactrouter.com/v6/routers/create-browser-router#basename) in order to to serve their applications underneath a subpath ([#8145](https://github.com/remix-run/remix/pull/8145)) - `@remix-run/dev` - Vite: Stabilize the Remix Vite plugin, Cloudflare preset, and all related types by removing all `unstable_` / `Unstable_` prefixes ([#8713](https://github.com/remix-run/remix/pull/8713)) - While this is a breaking change for existing Remix Vite plugin consumers, now that the plugin has stabilized, there will no longer be any breaking changes outside of a major release. Thank you to all of our early adopters and community contributors for helping us get here! 🙏 - `@remix-run/dev` - Vite: Stabilize "SPA Mode" by renaming the Remix vite plugin config from `unstable_ssr -> ssr` ([#8692](https://github.com/remix-run/remix/pull/8692)) @@ -1715,7 +1793,7 @@ function handleClick() { ### Minor Changes -- Remove the `unstable_` prefix from the [`useBlocker`](https://reactrouter.com/en/main/hooks/use-blocker) hook ([#7882](https://github.com/remix-run/remix/pull/7882)) +- Remove the `unstable_` prefix from the [`useBlocker`](https://reactrouter.com/v6/hooks/use-blocker) hook ([#7882](https://github.com/remix-run/remix/pull/7882)) - Add `unstable_flushSync` option to `useNavigate`/`useSubmit`/`fetcher.load`/`fetcher.submit` to opt-out of `React.startTransition` and into `ReactDOM.flushSync` for state updates ([#7996](https://github.com/remix-run/remix/pull/7996)) ### Patch Changes diff --git a/README.md b/README.md index f72934f925c..49057fff0dd 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ We are happy you're here! [Remix](https://remix.run) is a full stack web framework that lets you focus on the user interface and work back through web fundamentals to deliver a fast, slick, and resilient user experience that deploys to any Node.js server and even non-Node.js environments at the edge like Cloudflare Workers. -Want to know more? Read the [Technical Explanation of Remix](https://remix.run/discussion/introduction) +Want to know more? Read the [Technical Explanation of Remix](https://remix.run/discussion/introduction). This repository contains the Remix source code. This repo is a work in progress, so we appreciate your patience as we figure things out. diff --git a/contributors.yml b/contributors.yml index 57082791773..38822cfde52 100644 --- a/contributors.yml +++ b/contributors.yml @@ -86,6 +86,7 @@ - bogas04 - BogdanDevBst - bolchowka +- bravo-kernel - brenr - brettscott - brookslybrand @@ -246,6 +247,7 @@ - harmony7 - harshmangalam - helderburato +- HenryPereira - HenryVogt - hi-ogawa - hicksy @@ -269,6 +271,7 @@ - IgnusG - ikarus-akhil - illright +- imzivko - imzshh - infomiho - ionut-botizan @@ -449,6 +452,7 @@ - maxrchung - maxschwarzmueller - mbarto +- mbuchoff - mcansh - mccuna - mdoury @@ -468,6 +472,7 @@ - mikechabot - mikeybinnswebdesign - mirzafaizan +- mischah - mitchelldirt - mjackson - mjangir @@ -531,6 +536,7 @@ - penspinner - penx - petetnt +- petrpacas - philandstuff - phishy - plastic041 @@ -589,6 +595,7 @@ - sbernheim4 - schpet - scott-erickson +- ScottDalessandro - scottybrown - sdavids - sean-roberts @@ -625,6 +632,7 @@ - staylor - stephanerangaya - stephenwade +- strackfeldt - SufianBabri - supachaidev - syeef diff --git a/docs/file-conventions/entry.server.md b/docs/file-conventions/entry.server.md index 1b91437af8d..e5a159f2e0d 100644 --- a/docs/file-conventions/entry.server.md +++ b/docs/file-conventions/entry.server.md @@ -51,12 +51,12 @@ _Note that you generally want to avoid logging when the request was aborted, sin ### Streaming Rendering Errors -When you are streaming your HTML responses via [`renderToPipeableStream`][rendertopipeablestream] or [`renderToReadableStream`][rendertoreadablestream], your own `handleError` implementation will only handle errors encountered during the initial shell render. If you encounter a rendering error during subsequent streamed rendering you will need handle these errors manually since the Remix server has already sent the Response by that point. +When you are streaming your HTML responses via [`renderToPipeableStream`][rendertopipeablestream] or [`renderToReadableStream`][rendertoreadablestream], your own `handleError` implementation will only handle errors encountered during the initial shell render. If you encounter a rendering error during subsequent streamed rendering you will need to handle these errors manually since the Remix server has already sent the Response by that point. -- For `renderToPipeableStream`, you can handle these errors in the `onError` callback function. You will need to toggle a boolean when the in `onShellReady` so you know if the error was a shell rendering error (and can be ignored) or an async rendering error (and must be handled). - - For an example, please see the default [`entry.server.tsx`][node-streaming-entry-server] for Node. +- For `renderToPipeableStream`, you can handle these errors in the `onError` callback function. You will need to toggle a boolean in `onShellReady` so you know if the error was a shell rendering error (and can be ignored) or an async rendering error (and must be handled). + - For an example, please refer to the default [`entry.server.tsx`][node-streaming-entry-server] for Node. - For `renderToReadableStream`, you can handle these errors in the `onError` callback function - - For an example, please see the default [`entry.server.tsx`][cloudflare-streaming-entry-server] for Cloudflare + - For an example, please refer to the default [`entry.server.tsx`][cloudflare-streaming-entry-server] for Cloudflare ### Thrown Responses diff --git a/docs/file-conventions/routes.md b/docs/file-conventions/routes.md index 4c01fed5c2a..a298dd2e032 100644 --- a/docs/file-conventions/routes.md +++ b/docs/file-conventions/routes.md @@ -16,7 +16,7 @@ Before we go too far into the Remix convention though, we'd like to point out th The point is, we are well aware of this and from the get-go, Remix has always given you a first-class way to opt-out via the [`routes`][routes_config]/[`ignoredRouteFiles`][ignoredroutefiles_config] and [configure your routes manually][manual-route-configuration]. But, there has to be _some_ default so that folks can get up and running quickly and easily - and we think that the flat routes convention document below is a pretty good default that scales well for small-to-medium sized apps. -Large applications with hundred or thousands of routes will _always_ be a bit chaotic no matter what convention you use - and the idea is that via the `routes` config, you get to build _exactly_ the convention that works best for your application/team. It would be quite literally impossible for Remix to have a default convention that made everyone happy. We'd much rather give you a fairly straightforward default, and then let the community build any number of conventions you can pick and choose from. +Large applications with hundreds or thousands of routes will _always_ be a bit chaotic no matter what convention you use - and the idea is that via the `routes` config, you get to build _exactly_ the convention that works best for your application/team. It would be quite literally impossible for Remix to have a default convention that made everyone happy. We'd much rather give you a fairly straightforward default, and then let the community build any number of conventions you can pick and choose from. So, before we dive into the details of the Remix default convention, here's some community alternatives you can check out if you decide that our default is not your cup of tea. diff --git a/docs/file-conventions/vite-config.md b/docs/file-conventions/vite-config.md index 67a47c85dd7..4f6ece8ce23 100644 --- a/docs/file-conventions/vite-config.md +++ b/docs/file-conventions/vite-config.md @@ -140,6 +140,6 @@ You may also want to enable the `manifest` option since, when server bundles are [minimatch]: https://npm.im/minimatch [presets]: ../guides/presets [server-bundles]: ../guides/server-bundles -[rr-basename]: https://reactrouter.com/routers/create-browser-router#basename +[rr-basename]: https://reactrouter.com/v6/routers/create-browser-router#basename [vite-public-base-path]: https://vitejs.dev/config/shared-options.html#base [vite-base]: https://vitejs.dev/config/shared-options.html#base diff --git a/docs/guides/breadcrumbs.md b/docs/guides/breadcrumbs.md index 10716414101..b8851aac314 100644 --- a/docs/guides/breadcrumbs.md +++ b/docs/guides/breadcrumbs.md @@ -74,7 +74,7 @@ export default function Root() { } ``` -Note that we pass the `match` object to breadcrumbs, allowing us to potentially utilize `match.data` for enhancing breadcrumb content based on the route's data. This example doesn't use it, but you'll like want to use values from your loader data for the breadcrumb. +Note that we pass the `match` object to breadcrumbs, allowing us to potentially utilize `match.data` for enhancing breadcrumb content based on the route's data. This example doesn't use it, but you'll likely want to use values from your loader data for the breadcrumb. Using `useMatches` with `handle` offers a robust way for routes to contribute to rendering processes higher up the element tree than their actual render point. diff --git a/docs/guides/migrating-react-router-app.md b/docs/guides/migrating-react-router-app.md index ddca6c31601..6367c259bbb 100644 --- a/docs/guides/migrating-react-router-app.md +++ b/docs/guides/migrating-react-router-app.md @@ -693,7 +693,7 @@ Now then, go off and _remix your app_. We think you'll like what you build along - [Common "gotchas"][common-gotchas] [react-router]: https://reactrouter.com -[react-router-docs]: https://reactrouter.com/start/concepts +[react-router-docs]: https://reactrouter.com/v6/start/concepts [migration-guide-from-v5-to-v6]: https://reactrouter.com/en/6.22.3/upgrading/v5 [backwards-compatibility-package]: https://www.npmjs.com/package/react-router-dom-v5-compat [a-few-tweaks-to-improve-progressive-enhancement]: ../pages/philosophy#progressive-enhancement diff --git a/docs/guides/single-fetch.md b/docs/guides/single-fetch.md index 1c4123196f2..a11565d9e2b 100644 --- a/docs/guides/single-fetch.md +++ b/docs/guides/single-fetch.md @@ -53,9 +53,12 @@ Single Fetch requires using [`undici`][undici] as your `fetch` polyfill, or usin With Single Fetch enabled, there will now only be one request made on client-side navigations even when multiple loaders need to run. To handle merging headers for the handlers called, the [`headers`][headers] export will now also apply to `loader`/`action` data requests. In many cases, the logic you already have in there for document requests should be close to sufficient for your new Single Fetch data requests. -**4. Add `nonce` to `` (if you are using a CSP)** +**4. Add a `nonce` (if you are using a CSP)** -The `` component renders inline scripts that handle the streaming data on the client side. If you have a [content security policy for scripts][csp] with [nonce-sources][csp-nonce], you can use `` to pass through the nonce to these `