From 5fbe011a37b8d9b928d39fe1876efc1acce152a7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 30 Jul 2024 20:07:16 +0000 Subject: [PATCH 1/3] chore: Update version for release (pre) --- .changeset/pre.json | 11 +++++- .../vite-cloudflare-template/package.json | 6 ++-- packages/create-remix/CHANGELOG.md | 2 ++ packages/create-remix/package.json | 2 +- packages/remix-architect/CHANGELOG.md | 7 ++++ packages/remix-architect/package.json | 2 +- packages/remix-cloudflare-pages/CHANGELOG.md | 7 ++++ packages/remix-cloudflare-pages/package.json | 2 +- .../remix-cloudflare-workers/CHANGELOG.md | 7 ++++ .../remix-cloudflare-workers/package.json | 2 +- packages/remix-cloudflare/CHANGELOG.md | 12 +++++++ packages/remix-cloudflare/package.json | 2 +- packages/remix-css-bundle/CHANGELOG.md | 2 ++ packages/remix-css-bundle/package.json | 2 +- packages/remix-deno/CHANGELOG.md | 12 +++++++ packages/remix-deno/package.json | 2 +- packages/remix-dev/CHANGELOG.md | 15 ++++++++ packages/remix-dev/package.json | 6 ++-- packages/remix-eslint-config/CHANGELOG.md | 2 ++ packages/remix-eslint-config/package.json | 2 +- packages/remix-express/CHANGELOG.md | 7 ++++ packages/remix-express/package.json | 2 +- packages/remix-node/CHANGELOG.md | 12 +++++++ packages/remix-node/package.json | 2 +- packages/remix-react/CHANGELOG.md | 36 +++++++++++++++++++ packages/remix-react/package.json | 2 +- packages/remix-serve/CHANGELOG.md | 8 +++++ packages/remix-serve/package.json | 2 +- packages/remix-server-runtime/CHANGELOG.md | 32 +++++++++++++++++ packages/remix-server-runtime/package.json | 2 +- packages/remix-testing/CHANGELOG.md | 12 +++++++ packages/remix-testing/package.json | 2 +- packages/remix/package.json | 2 +- pnpm-lock.yaml | 8 ++--- 34 files changed, 208 insertions(+), 26 deletions(-) diff --git a/.changeset/pre.json b/.changeset/pre.json index 83511675055..3c239f865c8 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -25,5 +25,14 @@ "@remix-run/server-runtime": "2.10.3", "@remix-run/testing": "2.10.3" }, - "changesets": [] + "changesets": [ + "add-unstable-data", + "curvy-vans-remember", + "happy-dots-sleep", + "large-donkeys-remember", + "remove-response-stub", + "silver-laws-invite", + "tender-elephants-kneel", + "vite-absolute-base" + ] } diff --git a/integration/helpers/vite-cloudflare-template/package.json b/integration/helpers/vite-cloudflare-template/package.json index a91e9475c66..8abfd835a5b 100644 --- a/integration/helpers/vite-cloudflare-template/package.json +++ b/integration/helpers/vite-cloudflare-template/package.json @@ -11,9 +11,9 @@ "typecheck": "tsc" }, "dependencies": { - "@remix-run/cloudflare": "2.10.3", - "@remix-run/cloudflare-pages": "2.10.3", - "@remix-run/react": "2.10.3", + "@remix-run/cloudflare": "2.11.0-pre.0", + "@remix-run/cloudflare-pages": "2.11.0-pre.0", + "@remix-run/react": "2.11.0-pre.0", "isbot": "^4.1.0", "miniflare": "^3.20231030.4", "react": "^18.2.0", diff --git a/packages/create-remix/CHANGELOG.md b/packages/create-remix/CHANGELOG.md index 8d6d586c413..d5d9e20d4bc 100644 --- a/packages/create-remix/CHANGELOG.md +++ b/packages/create-remix/CHANGELOG.md @@ -1,5 +1,7 @@ # `create-remix` +## 2.11.0-pre.0 + ## 2.10.3 No significant changes to this package were made in this release. [See the repo `CHANGELOG.md`](https://github.com/remix-run/remix/blob/main/CHANGELOG.md) for an overview of all changes in v2.10.3. diff --git a/packages/create-remix/package.json b/packages/create-remix/package.json index ed4f09d3ddb..e93739aa0a0 100644 --- a/packages/create-remix/package.json +++ b/packages/create-remix/package.json @@ -1,6 +1,6 @@ { "name": "create-remix", - "version": "2.10.3", + "version": "2.11.0-pre.0", "description": "Create a new Remix app", "homepage": "https://remix.run", "bugs": { diff --git a/packages/remix-architect/CHANGELOG.md b/packages/remix-architect/CHANGELOG.md index 0c7454ba783..217ebf8d815 100644 --- a/packages/remix-architect/CHANGELOG.md +++ b/packages/remix-architect/CHANGELOG.md @@ -1,5 +1,12 @@ # `@remix-run/architect` +## 2.11.0-pre.0 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/node@2.11.0-pre.0` + ## 2.10.3 ### Patch Changes diff --git a/packages/remix-architect/package.json b/packages/remix-architect/package.json index f96e6597fd5..d58c5ce1d5b 100644 --- a/packages/remix-architect/package.json +++ b/packages/remix-architect/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/architect", - "version": "2.10.3", + "version": "2.11.0-pre.0", "description": "Architect server request handler for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" diff --git a/packages/remix-cloudflare-pages/CHANGELOG.md b/packages/remix-cloudflare-pages/CHANGELOG.md index dfd626554fb..a5b89f9fbe9 100644 --- a/packages/remix-cloudflare-pages/CHANGELOG.md +++ b/packages/remix-cloudflare-pages/CHANGELOG.md @@ -1,5 +1,12 @@ # `@remix-run/cloudflare-pages` +## 2.11.0-pre.0 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/cloudflare@2.11.0-pre.0` + ## 2.10.3 ### Patch Changes diff --git a/packages/remix-cloudflare-pages/package.json b/packages/remix-cloudflare-pages/package.json index 188f5b70d3f..3be6c73a674 100644 --- a/packages/remix-cloudflare-pages/package.json +++ b/packages/remix-cloudflare-pages/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/cloudflare-pages", - "version": "2.10.3", + "version": "2.11.0-pre.0", "description": "Cloudflare Pages request handler for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" diff --git a/packages/remix-cloudflare-workers/CHANGELOG.md b/packages/remix-cloudflare-workers/CHANGELOG.md index 48bbb19bc30..7942144cfe6 100644 --- a/packages/remix-cloudflare-workers/CHANGELOG.md +++ b/packages/remix-cloudflare-workers/CHANGELOG.md @@ -1,5 +1,12 @@ # `@remix-run/cloudflare-workers` +## 2.11.0-pre.0 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/cloudflare@2.11.0-pre.0` + ## 2.10.3 ### Patch Changes diff --git a/packages/remix-cloudflare-workers/package.json b/packages/remix-cloudflare-workers/package.json index ad1bfee5a4a..76b7f814dbf 100644 --- a/packages/remix-cloudflare-workers/package.json +++ b/packages/remix-cloudflare-workers/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/cloudflare-workers", - "version": "2.10.3", + "version": "2.11.0-pre.0", "description": "Cloudflare worker request handler for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" diff --git a/packages/remix-cloudflare/CHANGELOG.md b/packages/remix-cloudflare/CHANGELOG.md index 5f7e30da7e3..81ae0fb3d6a 100644 --- a/packages/remix-cloudflare/CHANGELOG.md +++ b/packages/remix-cloudflare/CHANGELOG.md @@ -1,5 +1,17 @@ # `@remix-run/cloudflare` +## 2.11.0-pre.0 + +### Minor Changes + +- Add a new `unstable_data()` API for usage with Remix Single Fetch ([#9769](https://github.com/remix-run/remix/pull/9769)) +- 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)) + +### Patch Changes + +- Updated dependencies: + - `@remix-run/server-runtime@2.11.0-pre.0` + ## 2.10.3 ### Patch Changes diff --git a/packages/remix-cloudflare/package.json b/packages/remix-cloudflare/package.json index f64ae7cb6d8..2dbe9f412b9 100644 --- a/packages/remix-cloudflare/package.json +++ b/packages/remix-cloudflare/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/cloudflare", - "version": "2.10.3", + "version": "2.11.0-pre.0", "description": "Cloudflare platform abstractions for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" diff --git a/packages/remix-css-bundle/CHANGELOG.md b/packages/remix-css-bundle/CHANGELOG.md index 43368453d7a..f501eeeeb33 100644 --- a/packages/remix-css-bundle/CHANGELOG.md +++ b/packages/remix-css-bundle/CHANGELOG.md @@ -1,5 +1,7 @@ # @remix-run/css-bundle +## 2.11.0-pre.0 + ## 2.10.3 No significant changes to this package were made in this release. [See the repo `CHANGELOG.md`](https://github.com/remix-run/remix/blob/main/CHANGELOG.md) for an overview of all changes in v2.10.3. diff --git a/packages/remix-css-bundle/package.json b/packages/remix-css-bundle/package.json index f64b07290c3..c1511ca37cb 100644 --- a/packages/remix-css-bundle/package.json +++ b/packages/remix-css-bundle/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/css-bundle", - "version": "2.10.3", + "version": "2.11.0-pre.0", "description": "CSS bundle href when using CSS bundling features in Remix", "homepage": "https://remix.run", "bugs": { diff --git a/packages/remix-deno/CHANGELOG.md b/packages/remix-deno/CHANGELOG.md index 5f55a7ea520..07d004bd67e 100644 --- a/packages/remix-deno/CHANGELOG.md +++ b/packages/remix-deno/CHANGELOG.md @@ -1,5 +1,17 @@ # `@remix-run/deno` +## 2.11.0-pre.0 + +### Minor Changes + +- Add a new `unstable_data()` API for usage with Remix Single Fetch ([#9769](https://github.com/remix-run/remix/pull/9769)) +- 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)) + +### Patch Changes + +- Updated dependencies: + - `@remix-run/server-runtime@2.11.0-pre.0` + ## 2.10.3 ### Patch Changes diff --git a/packages/remix-deno/package.json b/packages/remix-deno/package.json index 5bbf90d707e..9c48e366f26 100644 --- a/packages/remix-deno/package.json +++ b/packages/remix-deno/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/deno", - "version": "2.10.3", + "version": "2.11.0-pre.0", "description": "Deno platform abstractions for Remix", "homepage": "https://remix.run", "main": "./index.ts", diff --git a/packages/remix-dev/CHANGELOG.md b/packages/remix-dev/CHANGELOG.md index 5153c70388f..a247ea490b4 100644 --- a/packages/remix-dev/CHANGELOG.md +++ b/packages/remix-dev/CHANGELOG.md @@ -1,5 +1,20 @@ # `@remix-run/dev` +## 2.11.0-pre.0 + +### Minor Changes + +- Rename `future.unstable_fogOfWar` to `future.unstable_lazyRouteDiscovery` for clarity ([#9763](https://github.com/remix-run/remix/pull/9763)) + +### Patch Changes + +- Handle absolute Vite base URLs ([#9700](https://github.com/remix-run/remix/pull/9700)) +- Updated dependencies: + - `@remix-run/node@2.11.0-pre.0` + - `@remix-run/react@2.11.0-pre.0` + - `@remix-run/server-runtime@2.11.0-pre.0` + - `@remix-run/serve@2.11.0-pre.0` + ## 2.10.3 ### Patch Changes diff --git a/packages/remix-dev/package.json b/packages/remix-dev/package.json index 849b4c77628..bf9cfe57314 100644 --- a/packages/remix-dev/package.json +++ b/packages/remix-dev/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/dev", - "version": "2.10.3", + "version": "2.11.0-pre.0", "description": "Dev tools and CLI for Remix", "homepage": "https://remix.run", "bugs": { @@ -106,8 +106,8 @@ "wrangler": "^3.28.2" }, "peerDependencies": { - "@remix-run/react": "^2.10.3", - "@remix-run/serve": "^2.10.3", + "@remix-run/react": "^2.11.0-pre.0", + "@remix-run/serve": "^2.11.0-pre.0", "typescript": "^5.1.0", "vite": "^5.1.0", "wrangler": "^3.28.2" diff --git a/packages/remix-eslint-config/CHANGELOG.md b/packages/remix-eslint-config/CHANGELOG.md index 729e8a6e23e..b533807512f 100644 --- a/packages/remix-eslint-config/CHANGELOG.md +++ b/packages/remix-eslint-config/CHANGELOG.md @@ -1,5 +1,7 @@ # `@remix-run/eslint-config` +## 2.11.0-pre.0 + ## 2.10.3 No significant changes to this package were made in this release. [See the repo `CHANGELOG.md`](https://github.com/remix-run/remix/blob/main/CHANGELOG.md) for an overview of all changes in v2.10.3. diff --git a/packages/remix-eslint-config/package.json b/packages/remix-eslint-config/package.json index def596d3f37..257b0aff2cb 100644 --- a/packages/remix-eslint-config/package.json +++ b/packages/remix-eslint-config/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/eslint-config", - "version": "2.10.3", + "version": "2.11.0-pre.0", "description": "ESLint configuration for Remix projects", "bugs": { "url": "https://github.com/remix-run/remix/issues" diff --git a/packages/remix-express/CHANGELOG.md b/packages/remix-express/CHANGELOG.md index 04e3be23be3..363381e1fec 100644 --- a/packages/remix-express/CHANGELOG.md +++ b/packages/remix-express/CHANGELOG.md @@ -1,5 +1,12 @@ # `@remix-run/express` +## 2.11.0-pre.0 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/node@2.11.0-pre.0` + ## 2.10.3 ### Patch Changes diff --git a/packages/remix-express/package.json b/packages/remix-express/package.json index 2ba9dc378e7..056970f7efb 100644 --- a/packages/remix-express/package.json +++ b/packages/remix-express/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/express", - "version": "2.10.3", + "version": "2.11.0-pre.0", "description": "Express server request handler for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" diff --git a/packages/remix-node/CHANGELOG.md b/packages/remix-node/CHANGELOG.md index 7c57dea0ee3..12b560badc9 100644 --- a/packages/remix-node/CHANGELOG.md +++ b/packages/remix-node/CHANGELOG.md @@ -1,5 +1,17 @@ # `@remix-run/node` +## 2.11.0-pre.0 + +### Minor Changes + +- Add a new `unstable_data()` API for usage with Remix Single Fetch ([#9769](https://github.com/remix-run/remix/pull/9769)) +- 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)) + +### Patch Changes + +- Updated dependencies: + - `@remix-run/server-runtime@2.11.0-pre.0` + ## 2.10.3 ### Patch Changes diff --git a/packages/remix-node/package.json b/packages/remix-node/package.json index c9a172b50f1..2bb762dac4f 100644 --- a/packages/remix-node/package.json +++ b/packages/remix-node/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/node", - "version": "2.10.3", + "version": "2.11.0-pre.0", "description": "Node.js platform abstractions for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" diff --git a/packages/remix-react/CHANGELOG.md b/packages/remix-react/CHANGELOG.md index 7bf260174a2..4e4d94b67c2 100644 --- a/packages/remix-react/CHANGELOG.md +++ b/packages/remix-react/CHANGELOG.md @@ -1,5 +1,41 @@ # `@remix-run/react` +## 2.11.0-pre.0 + +### Minor Changes + +- Add a new `unstable_data()` API for usage with Remix Single Fetch ([#9769](https://github.com/remix-run/remix/pull/9769)) +- 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)) +- Rename `future.unstable_fogOfWar` to `future.unstable_lazyRouteDiscovery` for clarity ([#9763](https://github.com/remix-run/remix/pull/9763)) +- Single Fetch: Remove `responseStub` in favor of `headers` ([#9769](https://github.com/remix-run/remix/pull/9769)) + + - Background + + - The original Single Fetch approach was based on an assumption that an eventual `middleware` implementation would require something like `ResponseStub` so users could mutate `status`/`headers` in `middleware` before/after handlers as well as during handlers + - We wanted to align how `headers` got merged between document and data requests + - So we made document requests also use `ResponseStub` and removed the usage of `headers` in Single Fetch + - 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 stub - users can just mutate the `Response` they get from `await next()` directly + - With that gone, and still wanting to align how `headers` get merged, it makes more sense to stick with the current `headers` API and apply that to Single Fetch and avoid introducing a totally new thing in `RepsonseStub` (that always felt a bit awkward to work with anyway) + + - With this change: + - You are encouraged to stop returning `Response` instances in favor of returning raw data from loaders and actions: + - ~~`return json({ data: whatever });`~~ + - `return { data: whatever };` + - In most cases, you can remove your `json()` and `defer()` calls in favor of returning raw data if they weren't setting custom `status`/`headers` + - 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 need custom `status`/`headers`: + - We've added a new `unstable_data({...}, responseInit)` utility that will let you send back `status`/`headers` alongside your raw data without having to encode it into a `Response` + - The `headers()` function will let you control header merging for both document and data requests + +### Patch Changes + +- Ensure single fetch calls don't include any trailing slash from the pathname (i.e., /path/.data) ([#9792](https://github.com/remix-run/remix/pull/9792)) +- Single Fetch: Add `undefined` to the `useRouteLoaderData` type override ([#9796](https://github.com/remix-run/remix/pull/9796)) +- - Change initial hydration route mismatch from a URL check to a matches check to be resistant to URL inconsistenceis ([#9695](https://github.com/remix-run/remix/pull/9695)) +- Updated dependencies: + - `@remix-run/server-runtime@2.11.0-pre.0` + ## 2.10.3 ### Patch Changes diff --git a/packages/remix-react/package.json b/packages/remix-react/package.json index c3327100c54..be134a437ca 100644 --- a/packages/remix-react/package.json +++ b/packages/remix-react/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/react", - "version": "2.10.3", + "version": "2.11.0-pre.0", "description": "React DOM bindings for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" diff --git a/packages/remix-serve/CHANGELOG.md b/packages/remix-serve/CHANGELOG.md index 7ac9b29e065..509f8f68666 100644 --- a/packages/remix-serve/CHANGELOG.md +++ b/packages/remix-serve/CHANGELOG.md @@ -1,5 +1,13 @@ # `@remix-run/serve` +## 2.11.0-pre.0 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/node@2.11.0-pre.0` + - `@remix-run/express@2.11.0-pre.0` + ## 2.10.3 ### Patch Changes diff --git a/packages/remix-serve/package.json b/packages/remix-serve/package.json index 064f85940f2..399f55f61aa 100644 --- a/packages/remix-serve/package.json +++ b/packages/remix-serve/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/serve", - "version": "2.10.3", + "version": "2.11.0-pre.0", "description": "Production application server for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" diff --git a/packages/remix-server-runtime/CHANGELOG.md b/packages/remix-server-runtime/CHANGELOG.md index f828cb4fafd..75716c5870c 100644 --- a/packages/remix-server-runtime/CHANGELOG.md +++ b/packages/remix-server-runtime/CHANGELOG.md @@ -1,5 +1,37 @@ # `@remix-run/server-runtime` +## 2.11.0-pre.0 + +### Minor Changes + +- Add a new `unstable_data()` API for usage with Remix Single Fetch ([#9769](https://github.com/remix-run/remix/pull/9769)) +- 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)) +- Rename `future.unstable_fogOfWar` to `future.unstable_lazyRouteDiscovery` for clarity ([#9763](https://github.com/remix-run/remix/pull/9763)) +- Single Fetch: Remove `responseStub` in favor of `headers` ([#9769](https://github.com/remix-run/remix/pull/9769)) + + - Background + + - The original Single Fetch approach was based on an assumption that an eventual `middleware` implementation would require something like `ResponseStub` so users could mutate `status`/`headers` in `middleware` before/after handlers as well as during handlers + - We wanted to align how `headers` got merged between document and data requests + - So we made document requests also use `ResponseStub` and removed the usage of `headers` in Single Fetch + - 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 stub - users can just mutate the `Response` they get from `await next()` directly + - With that gone, and still wanting to align how `headers` get merged, it makes more sense to stick with the current `headers` API and apply that to Single Fetch and avoid introducing a totally new thing in `RepsonseStub` (that always felt a bit awkward to work with anyway) + + - With this change: + - You are encouraged to stop returning `Response` instances in favor of returning raw data from loaders and actions: + - ~~`return json({ data: whatever });`~~ + - `return { data: whatever };` + - In most cases, you can remove your `json()` and `defer()` calls in favor of returning raw data if they weren't setting custom `status`/`headers` + - 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 need custom `status`/`headers`: + - We've added a new `unstable_data({...}, responseInit)` utility that will let you send back `status`/`headers` alongside your raw data without having to encode it into a `Response` + - The `headers()` function will let you control header merging for both document and data requests + +### Patch Changes + +- - Change initial hydration route mismatch from a URL check to a matches check to be resistant to URL inconsistenceis ([#9695](https://github.com/remix-run/remix/pull/9695)) + ## 2.10.3 No significant changes to this package were made in this release. [See the repo `CHANGELOG.md`](https://github.com/remix-run/remix/blob/main/CHANGELOG.md) for an overview of all changes in v2.10.3. diff --git a/packages/remix-server-runtime/package.json b/packages/remix-server-runtime/package.json index 32141557162..ac8549e911e 100644 --- a/packages/remix-server-runtime/package.json +++ b/packages/remix-server-runtime/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/server-runtime", - "version": "2.10.3", + "version": "2.11.0-pre.0", "description": "Server runtime for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" diff --git a/packages/remix-testing/CHANGELOG.md b/packages/remix-testing/CHANGELOG.md index 63af3b8fb42..5c82a120e08 100644 --- a/packages/remix-testing/CHANGELOG.md +++ b/packages/remix-testing/CHANGELOG.md @@ -1,5 +1,17 @@ # `@remix-run/testing` +## 2.11.0-pre.0 + +### Minor Changes + +- Rename `future.unstable_fogOfWar` to `future.unstable_lazyRouteDiscovery` for clarity ([#9763](https://github.com/remix-run/remix/pull/9763)) + +### Patch Changes + +- Updated dependencies: + - `@remix-run/node@2.11.0-pre.0` + - `@remix-run/react@2.11.0-pre.0` + ## 2.10.3 ### Patch Changes diff --git a/packages/remix-testing/package.json b/packages/remix-testing/package.json index 3f8eb421d2e..a2365a998d1 100644 --- a/packages/remix-testing/package.json +++ b/packages/remix-testing/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/testing", - "version": "2.10.3", + "version": "2.11.0-pre.0", "description": "Testing utilities for Remix apps", "homepage": "https://remix.run", "bugs": { diff --git a/packages/remix/package.json b/packages/remix/package.json index ef839f2ce67..5bd92aa4359 100644 --- a/packages/remix/package.json +++ b/packages/remix/package.json @@ -1,6 +1,6 @@ { "name": "remix", - "version": "2.10.3", + "version": "2.11.0-pre.0", "description": "A framework for building better websites", "homepage": "https://remix.run", "bugs": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3c5e96190db..7bbe4a0ed1b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -548,13 +548,13 @@ importers: integration/helpers/vite-cloudflare-template: dependencies: '@remix-run/cloudflare': - specifier: 2.10.3 + specifier: 2.11.0-pre.0 version: link:../../../packages/remix-cloudflare '@remix-run/cloudflare-pages': - specifier: 2.10.3 + specifier: 2.11.0-pre.0 version: link:../../../packages/remix-cloudflare-pages '@remix-run/react': - specifier: 2.10.3 + specifier: 2.11.0-pre.0 version: link:../../../packages/remix-react isbot: specifier: ^4.1.0 @@ -868,7 +868,7 @@ importers: specifier: workspace:* version: link:../remix-node '@remix-run/react': - specifier: ^2.10.3 + specifier: ^2.11.0-pre.0 version: link:../remix-react '@remix-run/router': specifier: 1.19.0-pre.0 From a8f729fc512f0f1fd776eac2743f77e5ec9afa94 Mon Sep 17 00:00:00 2001 From: Matt Brophy Date: Tue, 30 Jul 2024 16:30:09 -0400 Subject: [PATCH 2/3] Draft release notes --- .changeset/add-unstable-data.md | 2 +- .changeset/large-donkeys-remember.md | 2 +- .changeset/tender-elephants-kneel.md | 2 +- CHANGELOG.md | 192 +++++++++++++++------ packages/remix-react/CHANGELOG.md | 2 +- packages/remix-server-runtime/CHANGELOG.md | 2 +- 6 files changed, 140 insertions(+), 62 deletions(-) diff --git a/.changeset/add-unstable-data.md b/.changeset/add-unstable-data.md index f1eebbd186a..f3e76f2dbf9 100644 --- a/.changeset/add-unstable-data.md +++ b/.changeset/add-unstable-data.md @@ -6,4 +6,4 @@ "@remix-run/server-runtime": minor --- -Add a new `unstable_data()` API for usage with Remix Single Fetch +Single Fetch: Add a new `unstable_data()` API as a replacement for `json`/`defer` when custom `status`/`headers` are needed diff --git a/.changeset/large-donkeys-remember.md b/.changeset/large-donkeys-remember.md index 5499280988d..269d89407b7 100644 --- a/.changeset/large-donkeys-remember.md +++ b/.changeset/large-donkeys-remember.md @@ -2,4 +2,4 @@ "@remix-run/react": patch --- -Ensure single fetch calls don't include any trailing slash from the pathname (i.e., /path/.data) +Single Fetch: Ensure calls don't include any trailing slash from the pathname (i.e., `/path/.data`) diff --git a/.changeset/tender-elephants-kneel.md b/.changeset/tender-elephants-kneel.md index 9d789d99b69..ecb035aeea6 100644 --- a/.changeset/tender-elephants-kneel.md +++ b/.changeset/tender-elephants-kneel.md @@ -3,4 +3,4 @@ "@remix-run/server-runtime": patch --- -- Change initial hydration route mismatch from a URL check to a matches check to be resistant to URL inconsistenceis +Change initial hydration route mismatch from a URL check to a matches check to be resistant to URL inconsistencies diff --git a/CHANGELOG.md b/CHANGELOG.md index 34342efe734..c7f5a8d0333 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,127 +13,135 @@ We manage release notes in this file instead of the paginated Github Releases Pa Table of Contents - [Remix Releases](#remix-releases) - - [v2.10.3](#v2103) + - [v2.11.0](#v2110) + - [What's Changed](#whats-changed) + - [Renamed Future Flag for Fog of War (unstable)](#renamed-future-flag-for-fog-of-war-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) @@ -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) @@ -194,6 +202,76 @@ Date: YYYY-MM-DD --> +## v2.11.0 + +Date: 2024-07-31 + +### What's Changed + +#### Renamed Future Flag for Fog of War (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, so we made document requests also use the `response` stub and removed the usage of 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. + +With that gone, 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 apply that to Single Fetch data requests and avoid introducing a totally new `response` stub (which also always felt a bit awkward to work with anyway). + +With this change: + +- The `headers()` function will let you control header merging for both document and data requests +- You are still encouraged to stop returning `Response` instances in favor of returning raw data from loaders and actions: + - ~~`return json({ data: "whatever" });`~~ + - `return { data: "whatever" };` +- 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 + - 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 _were_ returning a custom `status` or `headers`: + - We've added a new API-compatible `unstable_data({...}, number | responseInit)` utility that will let you send back `status`/`headers` alongside your raw data without having to encode it into a `Response` + +⚠️ 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 diff --git a/packages/remix-react/CHANGELOG.md b/packages/remix-react/CHANGELOG.md index 4e4d94b67c2..3375c17dc5b 100644 --- a/packages/remix-react/CHANGELOG.md +++ b/packages/remix-react/CHANGELOG.md @@ -32,7 +32,7 @@ - Ensure single fetch calls don't include any trailing slash from the pathname (i.e., /path/.data) ([#9792](https://github.com/remix-run/remix/pull/9792)) - Single Fetch: Add `undefined` to the `useRouteLoaderData` type override ([#9796](https://github.com/remix-run/remix/pull/9796)) -- - Change initial hydration route mismatch from a URL check to a matches check to be resistant to URL inconsistenceis ([#9695](https://github.com/remix-run/remix/pull/9695)) +- 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)) - Updated dependencies: - `@remix-run/server-runtime@2.11.0-pre.0` diff --git a/packages/remix-server-runtime/CHANGELOG.md b/packages/remix-server-runtime/CHANGELOG.md index 75716c5870c..8c3f7d56753 100644 --- a/packages/remix-server-runtime/CHANGELOG.md +++ b/packages/remix-server-runtime/CHANGELOG.md @@ -30,7 +30,7 @@ ### Patch Changes -- - Change initial hydration route mismatch from a URL check to a matches check to be resistant to URL inconsistenceis ([#9695](https://github.com/remix-run/remix/pull/9695)) +- 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)) ## 2.10.3 From d799458c5ce3f755cb72466795afaea0e8a85df3 Mon Sep 17 00:00:00 2001 From: Matt Brophy Date: Tue, 30 Jul 2024 16:49:49 -0400 Subject: [PATCH 3/3] Update release notes --- CHANGELOG.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7f5a8d0333..ba8a63ae4c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ We manage release notes in this file instead of the paginated Github Releases Pa - [Remix Releases](#remix-releases) - [v2.11.0](#v2110) - [What's Changed](#whats-changed) - - [Renamed Future Flag for Fog of War (unstable)](#renamed-future-flag-for-fog-of-war-unstable) + - [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) @@ -208,7 +208,7 @@ Date: 2024-07-31 ### What's Changed -#### Renamed Future Flag for Fog of War (unstable) +#### 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`). @@ -223,13 +223,12 @@ With that gone, and still wanting to align how headers get merged between docume With this change: - The `headers()` function will let you control header merging for both document and data requests -- You are still encouraged to stop returning `Response` instances in favor of returning raw data from loaders and actions: - - ~~`return json({ data: "whatever" });`~~ - - `return { data: "whatever" };` - 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 - - 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 + - ❌ `return json({ data: "whatever" });` + - ✅ `return { data: "whatever" };` - If you _were_ returning a custom `status` or `headers`: - We've added a new API-compatible `unstable_data({...}, number | responseInit)` 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.