Skip to content

Commit

Permalink
Merge branch 'release-next' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 committed Aug 1, 2024
2 parents c00e365 + 63c1385 commit 3c8b8dd
Show file tree
Hide file tree
Showing 58 changed files with 432 additions and 210 deletions.
9 changes: 0 additions & 9 deletions .changeset/add-unstable-data.md

This file was deleted.

9 changes: 0 additions & 9 deletions .changeset/curvy-vans-remember.md

This file was deleted.

8 changes: 0 additions & 8 deletions .changeset/happy-dots-sleep.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/large-donkeys-remember.md

This file was deleted.

25 changes: 0 additions & 25 deletions .changeset/remove-response-stub.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/silver-laws-invite.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/tender-elephants-kneel.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/vite-absolute-base.md

This file was deleted.

191 changes: 134 additions & 57 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,127 +13,135 @@ We manage release notes in this file instead of the paginated Github Releases Pa
<summary>Table of Contents</summary>

- [Remix Releases](#remix-releases)
- [v2.10.3](#v2103)
- [v2.11.0](#v2110)
- [What's Changed](#whats-changed)
- [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)
- [Patch Changes](#patch-changes)
- [Updated Dependencies](#updated-dependencies)
- [Changes by Package](#changes-by-package)
- [v2.10.2](#v2102)
- [v2.10.3](#v2103)
- [Patch Changes](#patch-changes-1)
- [Updated Dependencies](#updated-dependencies-1)
- [Changes by Package](#changes-by-package-1)
- [v2.10.1](#v2101)
- [v2.10.2](#v2102)
- [Patch Changes](#patch-changes-2)
- [Updated Dependencies](#updated-dependencies-1)
- [Changes by Package](#changes-by-package-2)
- [v2.10.0](#v2100)
- [What's Changed](#whats-changed)
- [Lazy Route Discovery (a.k.a. "Fog of War")](#lazy-route-discovery-aka-fog-of-war)
- [Minor Changes](#minor-changes)
- [v2.10.1](#v2101)
- [Patch Changes](#patch-changes-3)
- [Updated Dependencies](#updated-dependencies-2)
- [Changes by Package](#changes-by-package-3)
- [v2.9.2](#v292)
- [v2.10.0](#v2100)
- [What's Changed](#whats-changed-1)
- [Updated Type-Safety for Single Fetch](#updated-type-safety-for-single-fetch)
- [Lazy Route Discovery (a.k.a. "Fog of War")](#lazy-route-discovery-aka-fog-of-war)
- [Minor Changes](#minor-changes-1)
- [Patch Changes](#patch-changes-4)
- [Updated Dependencies](#updated-dependencies-3)
- [Changes by Package](#changes-by-package-4)
- [v2.9.1](#v291)
- [v2.9.2](#v292)
- [What's Changed](#whats-changed-2)
- [Updated Type-Safety for Single Fetch](#updated-type-safety-for-single-fetch)
- [Patch Changes](#patch-changes-5)
- [Updated Dependencies](#updated-dependencies-4)
- [Changes by Package](#changes-by-package-5)
- [v2.9.1](#v291)
- [Patch Changes](#patch-changes-6)
- [Changes by Package](#changes-by-package-6)
- [v2.9.0](#v290)
- [What's Changed](#whats-changed-2)
- [What's Changed](#whats-changed-3)
- [Single Fetch (unstable)](#single-fetch-unstable)
- [Undici](#undici)
- [Minor Changes](#minor-changes-1)
- [Patch Changes](#patch-changes-6)
- [Updated Dependencies](#updated-dependencies-4)
- [Changes by Package](#changes-by-package-6)
- [v2.8.1](#v281)
- [Minor Changes](#minor-changes-2)
- [Patch Changes](#patch-changes-7)
- [Updated Dependencies](#updated-dependencies-5)
- [Changes by Package](#changes-by-package-7)
- [v2.8.0](#v280)
- [Minor Changes](#minor-changes-2)
- [v2.8.1](#v281)
- [Patch Changes](#patch-changes-8)
- [Updated Dependencies](#updated-dependencies-6)
- [Changes by Package](#changes-by-package-8)
- [2.7.2](#272)
- [v2.8.0](#v280)
- [Minor Changes](#minor-changes-3)
- [Patch Changes](#patch-changes-9)
- [2.7.1](#271)
- [Updated Dependencies](#updated-dependencies-7)
- [Changes by Package](#changes-by-package-9)
- [2.7.2](#272)
- [Patch Changes](#patch-changes-10)
- [2.7.1](#271)
- [Patch Changes](#patch-changes-11)
- [v2.7.0](#v270)
- [What's Changed](#whats-changed-3)
- [What's Changed](#whats-changed-4)
- [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-3)
- [Patch Changes](#patch-changes-11)
- [Updated Dependencies](#updated-dependencies-7)
- [Changes by Package](#changes-by-package-9)
- [v2.6.0](#v260)
- [What's Changed](#whats-changed-4)
- [Unstable Vite Plugin updates](#unstable-vite-plugin-updates)
- [Minor Changes](#minor-changes-4)
- [Patch Changes](#patch-changes-12)
- [Updated Dependencies](#updated-dependencies-8)
- [Changes by Package](#changes-by-package-10)
- [v2.5.1](#v251)
- [v2.6.0](#v260)
- [What's Changed](#whats-changed-5)
- [Unstable Vite Plugin updates](#unstable-vite-plugin-updates)
- [Minor Changes](#minor-changes-5)
- [Patch Changes](#patch-changes-13)
- [Updated Dependencies](#updated-dependencies-9)
- [Changes by Package](#changes-by-package-11)
- [v2.5.0](#v250)
- [What's Changed](#whats-changed-5)
- [SPA Mode (unstable)](#spa-mode-unstable)
- [Server Bundles (unstable)](#server-bundles-unstable)
- [Minor Changes](#minor-changes-5)
- [v2.5.1](#v251)
- [Patch Changes](#patch-changes-14)
- [Updated Dependencies](#updated-dependencies-10)
- [Changes by Package](#changes-by-package-12)
- [v2.4.1](#v241)
- [v2.5.0](#v250)
- [What's Changed](#whats-changed-6)
- [SPA Mode (unstable)](#spa-mode-unstable)
- [Server Bundles (unstable)](#server-bundles-unstable)
- [Minor Changes](#minor-changes-6)
- [Patch Changes](#patch-changes-15)
- [Updated Dependencies](#updated-dependencies-11)
- [Changes by Package](#changes-by-package-13)
- [v2.4.1](#v241)
- [Patch Changes](#patch-changes-16)
- [Updated Dependencies](#updated-dependencies-12)
- [Changes by Package](#changes-by-package-14)
- [v2.4.0](#v240)
- [What's Changed](#whats-changed-6)
- [What's Changed](#whats-changed-7)
- [Client Data](#client-data)
- [`future.v3_relativeSplatPath`](#futurev3_relativesplatpath)
- [Vite Updates (Unstable)](#vite-updates-unstable)
- [Minor Changes](#minor-changes-6)
- [Patch Changes](#patch-changes-16)
- [Updated Dependencies](#updated-dependencies-12)
- [Changes by Package](#changes-by-package-14)
- [v2.3.1](#v231)
- [Minor Changes](#minor-changes-7)
- [Patch Changes](#patch-changes-17)
- [Updated Dependencies](#updated-dependencies-13)
- [Changes by Package](#changes-by-package-15)
- [v2.3.0](#v230)
- [What's Changed](#whats-changed-7)
- [Stabilized `useBlocker`](#stabilized-useblocker)
- [`unstable_flushSync` API](#unstable_flushsync-api)
- [Minor Changes](#minor-changes-7)
- [v2.3.1](#v231)
- [Patch Changes](#patch-changes-18)
- [Updated Dependencies](#updated-dependencies-14)
- [Changes by Package](#changes-by-package-16)
- [v2.2.0](#v220)
- [v2.3.0](#v230)
- [What's Changed](#whats-changed-8)
- [Vite!](#vite)
- [New Fetcher APIs](#new-fetcher-apis)
- [Persistence Future Flag](#persistence-future-flag)
- [Stabilized `useBlocker`](#stabilized-useblocker)
- [`unstable_flushSync` API](#unstable_flushsync-api)
- [Minor Changes](#minor-changes-8)
- [Patch Changes](#patch-changes-19)
- [Updated Dependencies](#updated-dependencies-15)
- [Changes by Package](#changes-by-package-17)
- [v2.1.0](#v210)
- [v2.2.0](#v220)
- [What's Changed](#whats-changed-9)
- [View Transitions](#view-transitions)
- [Stable `createRemixStub`](#stable-createremixstub)
- [Vite!](#vite)
- [New Fetcher APIs](#new-fetcher-apis)
- [Persistence Future Flag](#persistence-future-flag)
- [Minor Changes](#minor-changes-9)
- [Patch Changes](#patch-changes-20)
- [Updated Dependencies](#updated-dependencies-16)
- [Changes by Package](#changes-by-package-18)
- [v2.0.1](#v201)
- [v2.1.0](#v210)
- [What's Changed](#whats-changed-10)
- [View Transitions](#view-transitions)
- [Stable `createRemixStub`](#stable-createremixstub)
- [Minor Changes](#minor-changes-10)
- [Patch Changes](#patch-changes-21)
- [Updated Dependencies](#updated-dependencies-17)
- [Changes by Package](#changes-by-package-19)
- [v2.0.1](#v201)
- [Patch Changes](#patch-changes-22)
- [Changes by Package 🔗](#changes-by-package-)
- [v2.0.0](#v200)
- [Breaking Changes](#breaking-changes)
Expand All @@ -145,8 +153,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-17)
- [Changes by Package](#changes-by-package-19)
- [Updated Dependencies](#updated-dependencies-18)
- [Changes by Package](#changes-by-package-20)

</details>

Expand Down Expand Up @@ -194,6 +202,75 @@ Date: YYYY-MM-DD
-->

## v2.11.0

Date: 2024-08-01

### What's Changed

#### Renamed `unstable_fogOfWar` future flag to `unstable_lazyRouteDiscovery` (unstable)

We found that the `future.unstable_fogOfWar` flag name could be a bit confusing without the proper context (notably, the [blog post](https://remix.run/blog/fog-of-war)), so we've renamed the flag to `future.unstable_lazyRouteDiscovery` for clarity. If you had opted into this feature already, please update the name of the flag in your `vite.config.ts` file (or `remix.config.js`).

#### Removed `response` stub in Single Fetch (unstable)

The original Single Fetch approach was based on an assumption that an eventual `middleware` implementation would require something like the `ResponseStub` API so users could mutate `status`/`headers` in `middleware` before/after handlers as well as during handlers. As part of Single Fetch, we wanted to align how response headers would be merged between document and data requests. Thinking `response` was the future API, we aligned document requests to use the `response` stub that data requests were using, and we stopped using the `headers()` function.

However, the realization/alignment between Michael and Ryan on the recent [roadmap planning](https://www.youtube.com/watch?v=f5z_axCofW0) made us realize that the original assumption was incorrect. `middleware` won't need a `response` stub - as users can just mutate the `Response` they get from `await next()` directly.

Removing that assumption, and still wanting to align how headers get merged between document and data requests, it makes more sense to stick with the current `headers()` API and align Single Fetch data requests to use that existing API. This was we don't need to introduce any new header-related APIs which will make the adoption of Single Fetch much easier.

With this change:

- The `headers()` function will let you control header merging for both document and data requests
- In most cases, if you were returning `json()`/`defer()` _without_ setting a custom `status` or `headers`, you can just remove those utility functions and return the raw data
-`return json({ data: "whatever" });`
-`return { data: "whatever" };`
- If you _were_ returning a custom `status` or `headers` via `json`/`defer`:
- We've added a new API-compatible [`unstable_data`](https://remix.run/docs/utils/data) utility that will let you send back `status`/`headers` alongside your raw data without having to encode it into a `Response`
- We will be removing both `json` and `defer` in the next major version, but both _should_ still work in Single Fetch in v2 to allow for incremental adoption of the new behavior

⚠️ If you've already adopted Single Fetch in it's unstable state and converted to `response` stub, you'll need to move those changes back to leveraging the `headers()` API.

### Minor Changes

- `@remix-run/dev` - Fog of War: Rename `future.unstable_fogOfWar` to `future.unstable_lazyRouteDiscovery` for clarity ([#9763](https://github.com/remix-run/remix/pull/9763))
- `@remix-run/server-runtime` - Add a new `replace(url, init?)` alternative to `redirect(url, init?)` that performs a `history.replaceState` instead of a `history.pushState` on client-side navigation redirects ([#9764](https://github.com/remix-run/remix/pull/9764))
- `@remix-run/server-runtime` - Single Fetch: Add a new `unstable_data()` API as a replacement for `json`/`defer` when custom `status`/`headers` are needed ([#9769](https://github.com/remix-run/remix/pull/9769))
- `@remix-run/server-runtime` - Single Fetch: Remove `responseStub` in favor of `headers` ([#9769](https://github.com/remix-run/remix/pull/9769))

### Patch Changes

- `@remix-run/dev` - Handle absolute Vite base URLs ([#9700](https://github.com/remix-run/remix/pull/9700))
- `@remix-run/react` - Change initial hydration route mismatch from a URL check to a matches check to be resistant to URL inconsistencies ([#9695](https://github.com/remix-run/remix/pull/9695))
- `@remix-run/react` - Single Fetch: Ensure calls don't include any trailing slash from the pathname (i.e., `/path/.data`) ([#9792](https://github.com/remix-run/remix/pull/9792))
- `@remix-run/react` - Single Fetch: Add `undefined` to the `useRouteLoaderData` type override ([#9796](https://github.com/remix-run/remix/pull/9796))

### Updated Dependencies

- [`react-router-dom@6.26.0`](https://github.com/remix-run/react-router/releases/tag/react-router%406.26.0)
- [`@remix-run/router@1.19.0`](https://github.com/remix-run/react-router/blob/main/packages/router/CHANGELOG.md#1190)

### Changes by Package

- [`create-remix`](https://github.com/remix-run/remix/blob/remix%402.11.0/packages/create-remix/CHANGELOG.md#2110)
- [`@remix-run/architect`](https://github.com/remix-run/remix/blob/remix%402.11.0/packages/remix-architect/CHANGELOG.md#2110)
- [`@remix-run/cloudflare`](https://github.com/remix-run/remix/blob/remix%402.11.0/packages/remix-cloudflare/CHANGELOG.md#2110)
- [`@remix-run/cloudflare-pages`](https://github.com/remix-run/remix/blob/remix%402.11.0/packages/remix-cloudflare-pages/CHANGELOG.md#2110)
- [`@remix-run/cloudflare-workers`](https://github.com/remix-run/remix/blob/remix%402.11.0/packages/remix-cloudflare-workers/CHANGELOG.md#2110)
- [`@remix-run/css-bundle`](https://github.com/remix-run/remix/blob/remix%402.11.0/packages/remix-css-bundle/CHANGELOG.md#2110)
- [`@remix-run/deno`](https://github.com/remix-run/remix/blob/remix%402.11.0/packages/remix-deno/CHANGELOG.md#2110)
- [`@remix-run/dev`](https://github.com/remix-run/remix/blob/remix%402.11.0/packages/remix-dev/CHANGELOG.md#2110)
- [`@remix-run/eslint-config`](https://github.com/remix-run/remix/blob/remix%402.11.0/packages/remix-eslint-config/CHANGELOG.md#2110)
- [`@remix-run/express`](https://github.com/remix-run/remix/blob/remix%402.11.0/packages/remix-express/CHANGELOG.md#2110)
- [`@remix-run/node`](https://github.com/remix-run/remix/blob/remix%402.11.0/packages/remix-node/CHANGELOG.md#2110)
- [`@remix-run/react`](https://github.com/remix-run/remix/blob/remix%402.11.0/packages/remix-react/CHANGELOG.md#2110)
- [`@remix-run/serve`](https://github.com/remix-run/remix/blob/remix%402.11.0/packages/remix-serve/CHANGELOG.md#2110)
- [`@remix-run/server-runtime`](https://github.com/remix-run/remix/blob/remix%402.11.0/packages/remix-server-runtime/CHANGELOG.md#2110)
- [`@remix-run/testing`](https://github.com/remix-run/remix/blob/remix%402.11.0/packages/remix-testing/CHANGELOG.md#2110)

**Full Changelog**: [`v2.10.3...v2.11.0`](https://github.com/remix-run/remix/compare/remix@2.10.3...remix@2.11.0)

## v2.10.3

Date: 2024-07-16
Expand Down
5 changes: 5 additions & 0 deletions contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- AdiRishi
- ahabhgk
- ahbruns
- AhmadMayo
- ahmedeldessouki
- ahuth
- aiji42
Expand All @@ -35,6 +36,7 @@
- alongdate
- AltanS
- alvinthen
- amanape
- amir-ziaei
- amorriscode
- andreiduca
Expand Down Expand Up @@ -84,6 +86,7 @@
- bogas04
- BogdanDevBst
- bolchowka
- brenr
- brettscott
- brookslybrand
- brophdawg11
Expand Down Expand Up @@ -500,6 +503,7 @@
- nobeeakon
- nordiauwu
- not-ivy
- npapagna
- nrako
- nurul3101
- nvh95
Expand All @@ -522,6 +526,7 @@
- plastic041
- plondon
- pmbanugo
- Pouet--
- prasook-jain
- pratikdevdas
- princerajroy
Expand Down
Loading

0 comments on commit 3c8b8dd

Please sign in to comment.