From f3802ed995519221f38e44562d3a98fa3194308e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 5 Sep 2024 14:22:32 +0000 Subject: [PATCH] chore: Update version for release (pre) --- .changeset/pre.json | 13 +++- .../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 | 40 ++++++++++++ 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 | 40 ++++++++++++ packages/remix-deno/package.json | 2 +- packages/remix-dev/CHANGELOG.md | 19 ++++++ 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 | 40 ++++++++++++ packages/remix-node/package.json | 2 +- packages/remix-react/CHANGELOG.md | 62 +++++++++++++++++++ packages/remix-react/package.json | 2 +- packages/remix-serve/CHANGELOG.md | 8 +++ packages/remix-serve/package.json | 2 +- packages/remix-server-runtime/CHANGELOG.md | 60 ++++++++++++++++++ packages/remix-server-runtime/package.json | 2 +- packages/remix-testing/CHANGELOG.md | 8 +++ packages/remix-testing/package.json | 2 +- packages/remix/package.json | 2 +- pnpm-lock.yaml | 8 +-- 34 files changed, 348 insertions(+), 26 deletions(-) diff --git a/.changeset/pre.json b/.changeset/pre.json index be649d8f2a8..2d2c1dfd3f5 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -25,5 +25,16 @@ "@remix-run/server-runtime": "2.11.2", "@remix-run/testing": "2.11.2" }, - "changesets": [] + "changesets": [ + "bright-rabbits-attend", + "dirty-adults-sparkle", + "flat-wasps-heal", + "friendly-walls-brake", + "hot-dogs-applaud", + "khaki-ads-buy", + "moody-cups-give", + "popular-meals-hide", + "tiny-crabs-deliver", + "two-chicken-provide" + ] } diff --git a/integration/helpers/vite-cloudflare-template/package.json b/integration/helpers/vite-cloudflare-template/package.json index 1f7b245e474..081e1a8b469 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.11.2", - "@remix-run/cloudflare-pages": "2.11.2", - "@remix-run/react": "2.11.2", + "@remix-run/cloudflare": "2.11.3-pre.0", + "@remix-run/cloudflare-pages": "2.11.3-pre.0", + "@remix-run/react": "2.11.3-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 0b297c517b8..b7bf29ebf28 100644 --- a/packages/create-remix/CHANGELOG.md +++ b/packages/create-remix/CHANGELOG.md @@ -1,5 +1,7 @@ # `create-remix` +## 2.11.3-pre.0 + ## 2.11.2 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.11.2. diff --git a/packages/create-remix/package.json b/packages/create-remix/package.json index 8d13800eca4..379eb09eae0 100644 --- a/packages/create-remix/package.json +++ b/packages/create-remix/package.json @@ -1,6 +1,6 @@ { "name": "create-remix", - "version": "2.11.2", + "version": "2.11.3-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 7c38a5bb93b..2083bbadfbe 100644 --- a/packages/remix-architect/CHANGELOG.md +++ b/packages/remix-architect/CHANGELOG.md @@ -1,5 +1,12 @@ # `@remix-run/architect` +## 2.11.3-pre.0 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/node@2.11.3-pre.0` + ## 2.11.2 ### Patch Changes diff --git a/packages/remix-architect/package.json b/packages/remix-architect/package.json index e0213431353..d5b658c209e 100644 --- a/packages/remix-architect/package.json +++ b/packages/remix-architect/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/architect", - "version": "2.11.2", + "version": "2.11.3-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 7944c07a0ed..090a238fc73 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.3-pre.0 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/cloudflare@2.11.3-pre.0` + ## 2.11.2 ### Patch Changes diff --git a/packages/remix-cloudflare-pages/package.json b/packages/remix-cloudflare-pages/package.json index 70038b118a7..dc091886d83 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.11.2", + "version": "2.11.3-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 b48f2f776fb..b1fa95d83ec 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.3-pre.0 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/cloudflare@2.11.3-pre.0` + ## 2.11.2 ### Patch Changes diff --git a/packages/remix-cloudflare-workers/package.json b/packages/remix-cloudflare-workers/package.json index bdc342d0c24..725a96becdc 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.11.2", + "version": "2.11.3-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 12b7800d9f3..997e391885f 100644 --- a/packages/remix-cloudflare/CHANGELOG.md +++ b/packages/remix-cloudflare/CHANGELOG.md @@ -1,5 +1,45 @@ # `@remix-run/cloudflare` +## 2.11.3-pre.0 + +### Patch Changes + +- (unstable) Improved typesafety for single-fetch ([#9893](https://github.com/remix-run/remix/pull/9893)) + + If you were already using single-fetch types: + + - Remove `"@remix-run/react/future/single-fetch.d.ts"` override from `tsconfig.json` > `compilerOptions` > `types` + - Remove `defineLoader`, `defineAction`, `defineClientLoader`, `defineClientAction` helpers from your route modules + - Replace `UIMatch_SingleFetch` type helper with `UIMatch` + - Replace `MetaArgs_SingleFetch` type helper with `MetaArgs` + + Then you are ready for the new typesafety setup: + + ```ts + // vite.config.ts + + declare module "@remix-run/server-runtime" { + interface Future { + unstable_singleFetch: true; // 👈 enable _types_ for single-fetch + } + } + + export default defineConfig({ + plugins: [ + remix({ + future: { + unstable_singleFetch: true, // 👈 enable single-fetch + }, + }), + ], + }); + ``` + + For more information, see [Guides > Single Fetch](https://remix.run/docs/en/dev/guides/single-fetch) in our docs. + +- Updated dependencies: + - `@remix-run/server-runtime@2.11.3-pre.0` + ## 2.11.2 ### Patch Changes diff --git a/packages/remix-cloudflare/package.json b/packages/remix-cloudflare/package.json index 1ad526c9a03..3345e007fe6 100644 --- a/packages/remix-cloudflare/package.json +++ b/packages/remix-cloudflare/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/cloudflare", - "version": "2.11.2", + "version": "2.11.3-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 30fd4082b8a..220b65b1b77 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.3-pre.0 + ## 2.11.2 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.11.2. diff --git a/packages/remix-css-bundle/package.json b/packages/remix-css-bundle/package.json index 5eee7c7d4a5..214bf217527 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.11.2", + "version": "2.11.3-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 39b40a427c3..0dce7763f04 100644 --- a/packages/remix-deno/CHANGELOG.md +++ b/packages/remix-deno/CHANGELOG.md @@ -1,5 +1,45 @@ # `@remix-run/deno` +## 2.11.3-pre.0 + +### Patch Changes + +- (unstable) Improved typesafety for single-fetch ([#9893](https://github.com/remix-run/remix/pull/9893)) + + If you were already using single-fetch types: + + - Remove `"@remix-run/react/future/single-fetch.d.ts"` override from `tsconfig.json` > `compilerOptions` > `types` + - Remove `defineLoader`, `defineAction`, `defineClientLoader`, `defineClientAction` helpers from your route modules + - Replace `UIMatch_SingleFetch` type helper with `UIMatch` + - Replace `MetaArgs_SingleFetch` type helper with `MetaArgs` + + Then you are ready for the new typesafety setup: + + ```ts + // vite.config.ts + + declare module "@remix-run/server-runtime" { + interface Future { + unstable_singleFetch: true; // 👈 enable _types_ for single-fetch + } + } + + export default defineConfig({ + plugins: [ + remix({ + future: { + unstable_singleFetch: true, // 👈 enable single-fetch + }, + }), + ], + }); + ``` + + For more information, see [Guides > Single Fetch](https://remix.run/docs/en/dev/guides/single-fetch) in our docs. + +- Updated dependencies: + - `@remix-run/server-runtime@2.11.3-pre.0` + ## 2.11.2 ### Patch Changes diff --git a/packages/remix-deno/package.json b/packages/remix-deno/package.json index 864eadcd91f..22db403ae5f 100644 --- a/packages/remix-deno/package.json +++ b/packages/remix-deno/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/deno", - "version": "2.11.2", + "version": "2.11.3-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 12354b7deb8..a2646f13408 100644 --- a/packages/remix-dev/CHANGELOG.md +++ b/packages/remix-dev/CHANGELOG.md @@ -1,5 +1,24 @@ # `@remix-run/dev` +## 2.11.3-pre.0 + +### Patch Changes + +- Handle circular dependencies in modulepreload manifest generation. ([#9917](https://github.com/remix-run/remix/pull/9917)) +- (unstable) Automatic dependency optimization ([#9921](https://github.com/remix-run/remix/pull/9921)) + + You can now opt-in to automatic dependency optimization during development by using the `future.unstable_optimizeDeps` future flag. + For details, check out the docs at [`Guides` > `Dependency optimization`](https://remix.run/docs/en/main/guides/dependency-optimization). + + For users who were previously working around this limiation, you no longer need to explicitly add routes to Vite's `optimizeDeps.entries` nor do you need to disable the `remix-dot-server` plugin. + +- Fix `dest already exists` build errors by only moving SSR assets to the client build directory when they're not already present on disk ([#9901](https://github.com/remix-run/remix/pull/9901)) +- Updated dependencies: + - `@remix-run/server-runtime@2.11.3-pre.0` + - `@remix-run/react@2.11.3-pre.0` + - `@remix-run/node@2.11.3-pre.0` + - `@remix-run/serve@2.11.3-pre.0` + ## 2.11.2 ### Patch Changes diff --git a/packages/remix-dev/package.json b/packages/remix-dev/package.json index 8e3e6db0d0c..82d0512c070 100644 --- a/packages/remix-dev/package.json +++ b/packages/remix-dev/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/dev", - "version": "2.11.2", + "version": "2.11.3-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.11.2", - "@remix-run/serve": "^2.11.2", + "@remix-run/react": "^2.11.3-pre.0", + "@remix-run/serve": "^2.11.3-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 f708370c3f6..5df0ba1cf2b 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.3-pre.0 + ## 2.11.2 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.11.2. diff --git a/packages/remix-eslint-config/package.json b/packages/remix-eslint-config/package.json index 02a74260069..26d8c145402 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.11.2", + "version": "2.11.3-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 b685717a35b..43885edc1bb 100644 --- a/packages/remix-express/CHANGELOG.md +++ b/packages/remix-express/CHANGELOG.md @@ -1,5 +1,12 @@ # `@remix-run/express` +## 2.11.3-pre.0 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/node@2.11.3-pre.0` + ## 2.11.2 ### Patch Changes diff --git a/packages/remix-express/package.json b/packages/remix-express/package.json index 4bed3d973d4..cd4f9e77d76 100644 --- a/packages/remix-express/package.json +++ b/packages/remix-express/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/express", - "version": "2.11.2", + "version": "2.11.3-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 b179612806f..e27b83a96e7 100644 --- a/packages/remix-node/CHANGELOG.md +++ b/packages/remix-node/CHANGELOG.md @@ -1,5 +1,45 @@ # `@remix-run/node` +## 2.11.3-pre.0 + +### Patch Changes + +- (unstable) Improved typesafety for single-fetch ([#9893](https://github.com/remix-run/remix/pull/9893)) + + If you were already using single-fetch types: + + - Remove `"@remix-run/react/future/single-fetch.d.ts"` override from `tsconfig.json` > `compilerOptions` > `types` + - Remove `defineLoader`, `defineAction`, `defineClientLoader`, `defineClientAction` helpers from your route modules + - Replace `UIMatch_SingleFetch` type helper with `UIMatch` + - Replace `MetaArgs_SingleFetch` type helper with `MetaArgs` + + Then you are ready for the new typesafety setup: + + ```ts + // vite.config.ts + + declare module "@remix-run/server-runtime" { + interface Future { + unstable_singleFetch: true; // 👈 enable _types_ for single-fetch + } + } + + export default defineConfig({ + plugins: [ + remix({ + future: { + unstable_singleFetch: true, // 👈 enable single-fetch + }, + }), + ], + }); + ``` + + For more information, see [Guides > Single Fetch](https://remix.run/docs/en/dev/guides/single-fetch) in our docs. + +- Updated dependencies: + - `@remix-run/server-runtime@2.11.3-pre.0` + ## 2.11.2 ### Patch Changes diff --git a/packages/remix-node/package.json b/packages/remix-node/package.json index 3e92e8f9bec..cad9b650bb0 100644 --- a/packages/remix-node/package.json +++ b/packages/remix-node/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/node", - "version": "2.11.2", + "version": "2.11.3-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 6ee1d05ea57..368a1f04f72 100644 --- a/packages/remix-react/CHANGELOG.md +++ b/packages/remix-react/CHANGELOG.md @@ -1,5 +1,67 @@ # `@remix-run/react` +## 2.11.3-pre.0 + +### Patch Changes + +- Fog of War: Sort `/__manifest` query parameters for better caching ([#9888](https://github.com/remix-run/remix/pull/9888)) +- Single Fetch - fix revalidation behavior bugs ([#9938](https://github.com/remix-run/remix/pull/9938)) + + - With Single Fetch, existing routes revalidate by default + - This means requests do not need special query params for granular route revalidations out of the box - i.e., `GET /a/b/c.data` + - There are two conditions that will trigger granular revalidation: + - If a route opts out of revalidation via `shouldRevalidate`, it will be excluded from the single fetch call + - If a route defines a `clientLoader` then it will be excluded from the single fetch call and if you call `serverLoader()` from your `clientLoader`, that will make a separarte HTTP call for just that route loader - i.e., `GET /a/b/c.data?_routes=routes/a` for a `clientLoader` in `routes/a.tsx` + - When one or more routes are excluded from the single fetch call, the remaining routes that have loaders are included as query params: + - For example, if A was excluded, and the `root` route and `routes/b` had a `loader` but `routes/c` did not, the single fetch request would be `GET /a/b/c.data?_routes=root,routes/a` + +- Remove hydration URL check that was originally added for React 17 hydration issues and we no longer support React 17 ([#9890](https://github.com/remix-run/remix/pull/9890)) + + - Reverts the logic originally added in Remix `v1.18.0` via https://github.com/remix-run/remix/pull/6409 + - This was added to resolve an issue that could arise when doing quick back/forward history navigations while JS was loading which would cause a mismatch between the server matches and client matches: https://github.com/remix-run/remix/issues/1757 + - This specific hydration issue would then cause this React v17 only looping issue: https://github.com/remix-run/remix/issues/1678 + - The URL comparison that we added in `1.18.0` turned out to be subject to false positives of it's own which could also put the user in looping scenarios + - Remix v2 upgraded it's minimal React version to v18 which eliminated the v17 hydration error loop + - React v18 handles this hydration error like any other error and does not result in a loop + - So we can remove our check and thus avoid the false-positive scenarios in which it may also trigger a loop + +- (unstable) Improved typesafety for single-fetch ([#9893](https://github.com/remix-run/remix/pull/9893)) + + If you were already using single-fetch types: + + - Remove `"@remix-run/react/future/single-fetch.d.ts"` override from `tsconfig.json` > `compilerOptions` > `types` + - Remove `defineLoader`, `defineAction`, `defineClientLoader`, `defineClientAction` helpers from your route modules + - Replace `UIMatch_SingleFetch` type helper with `UIMatch` + - Replace `MetaArgs_SingleFetch` type helper with `MetaArgs` + + Then you are ready for the new typesafety setup: + + ```ts + // vite.config.ts + + declare module "@remix-run/server-runtime" { + interface Future { + unstable_singleFetch: true; // 👈 enable _types_ for single-fetch + } + } + + export default defineConfig({ + plugins: [ + remix({ + future: { + unstable_singleFetch: true, // 👈 enable single-fetch + }, + }), + ], + }); + ``` + + For more information, see [Guides > Single Fetch](https://remix.run/docs/en/dev/guides/single-fetch) in our docs. + +- Clarify wording in default `HydrateFallback` console warning ([#9899](https://github.com/remix-run/remix/pull/9899)) +- Updated dependencies: + - `@remix-run/server-runtime@2.11.3-pre.0` + ## 2.11.2 ### Patch Changes diff --git a/packages/remix-react/package.json b/packages/remix-react/package.json index c450e161fc2..20b5852e2a9 100644 --- a/packages/remix-react/package.json +++ b/packages/remix-react/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/react", - "version": "2.11.2", + "version": "2.11.3-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 0f0a2d60459..96ab613db24 100644 --- a/packages/remix-serve/CHANGELOG.md +++ b/packages/remix-serve/CHANGELOG.md @@ -1,5 +1,13 @@ # `@remix-run/serve` +## 2.11.3-pre.0 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/node@2.11.3-pre.0` + - `@remix-run/express@2.11.3-pre.0` + ## 2.11.2 ### Patch Changes diff --git a/packages/remix-serve/package.json b/packages/remix-serve/package.json index 9aa07aca725..a2186958d6e 100644 --- a/packages/remix-serve/package.json +++ b/packages/remix-serve/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/serve", - "version": "2.11.2", + "version": "2.11.3-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 7ef0650750e..62591449448 100644 --- a/packages/remix-server-runtime/CHANGELOG.md +++ b/packages/remix-server-runtime/CHANGELOG.md @@ -1,5 +1,65 @@ # `@remix-run/server-runtime` +## 2.11.3-pre.0 + +### Patch Changes + +- Single Fetch: Do not try to encode a `turbo-stream` body into 304 responses ([#9941](https://github.com/remix-run/remix/pull/9941)) +- Single Fetch - fix revalidation behavior bugs ([#9938](https://github.com/remix-run/remix/pull/9938)) + + - With Single Fetch, existing routes revalidate by default + - This means requests do not need special query params for granular route revalidations out of the box - i.e., `GET /a/b/c.data` + - There are two conditions that will trigger granular revalidation: + - If a route opts out of revalidation via `shouldRevalidate`, it will be excluded from the single fetch call + - If a route defines a `clientLoader` then it will be excluded from the single fetch call and if you call `serverLoader()` from your `clientLoader`, that will make a separarte HTTP call for just that route loader - i.e., `GET /a/b/c.data?_routes=routes/a` for a `clientLoader` in `routes/a.tsx` + - When one or more routes are excluded from the single fetch call, the remaining routes that have loaders are included as query params: + - For example, if A was excluded, and the `root` route and `routes/b` had a `loader` but `routes/c` did not, the single fetch request would be `GET /a/b/c.data?_routes=root,routes/a` + +- Remove hydration URL check that was originally added for React 17 hydration issues and we no longer support React 17 ([#9890](https://github.com/remix-run/remix/pull/9890)) + + - Reverts the logic originally added in Remix `v1.18.0` via https://github.com/remix-run/remix/pull/6409 + - This was added to resolve an issue that could arise when doing quick back/forward history navigations while JS was loading which would cause a mismatch between the server matches and client matches: https://github.com/remix-run/remix/issues/1757 + - This specific hydration issue would then cause this React v17 only looping issue: https://github.com/remix-run/remix/issues/1678 + - The URL comparison that we added in `1.18.0` turned out to be subject to false positives of it's own which could also put the user in looping scenarios + - Remix v2 upgraded it's minimal React version to v18 which eliminated the v17 hydration error loop + - React v18 handles this hydration error like any other error and does not result in a loop + - So we can remove our check and thus avoid the false-positive scenarios in which it may also trigger a loop + +- (unstable) Improved typesafety for single-fetch ([#9893](https://github.com/remix-run/remix/pull/9893)) + + If you were already using single-fetch types: + + - Remove `"@remix-run/react/future/single-fetch.d.ts"` override from `tsconfig.json` > `compilerOptions` > `types` + - Remove `defineLoader`, `defineAction`, `defineClientLoader`, `defineClientAction` helpers from your route modules + - Replace `UIMatch_SingleFetch` type helper with `UIMatch` + - Replace `MetaArgs_SingleFetch` type helper with `MetaArgs` + + Then you are ready for the new typesafety setup: + + ```ts + // vite.config.ts + + declare module "@remix-run/server-runtime" { + interface Future { + unstable_singleFetch: true; // 👈 enable _types_ for single-fetch + } + } + + export default defineConfig({ + plugins: [ + remix({ + future: { + unstable_singleFetch: true, // 👈 enable single-fetch + }, + }), + ], + }); + ``` + + For more information, see [Guides > Single Fetch](https://remix.run/docs/en/dev/guides/single-fetch) in our docs. + +- Single Fetch: Change content type on `.data` requests to `text/x-script` to allow Cloudflare compression ([#9889](https://github.com/remix-run/remix/pull/9889)) + ## 2.11.2 ### Patch Changes diff --git a/packages/remix-server-runtime/package.json b/packages/remix-server-runtime/package.json index 4cff98475ce..e8f5610caa3 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.11.2", + "version": "2.11.3-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 13e4cc2948c..a2e0da02fef 100644 --- a/packages/remix-testing/CHANGELOG.md +++ b/packages/remix-testing/CHANGELOG.md @@ -1,5 +1,13 @@ # `@remix-run/testing` +## 2.11.3-pre.0 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/react@2.11.3-pre.0` + - `@remix-run/node@2.11.3-pre.0` + ## 2.11.2 ### Patch Changes diff --git a/packages/remix-testing/package.json b/packages/remix-testing/package.json index 7929a470d07..e9d620278d2 100644 --- a/packages/remix-testing/package.json +++ b/packages/remix-testing/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/testing", - "version": "2.11.2", + "version": "2.11.3-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 0b0a0f44a0b..a1dcfbb9c27 100644 --- a/packages/remix/package.json +++ b/packages/remix/package.json @@ -1,6 +1,6 @@ { "name": "remix", - "version": "2.11.2", + "version": "2.11.3-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 0343a5da291..d479be0eb11 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.11.2 + specifier: 2.11.3-pre.0 version: link:../../../packages/remix-cloudflare '@remix-run/cloudflare-pages': - specifier: 2.11.2 + specifier: 2.11.3-pre.0 version: link:../../../packages/remix-cloudflare-pages '@remix-run/react': - specifier: 2.11.2 + specifier: 2.11.3-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.11.2 + specifier: ^2.11.3-pre.0 version: link:../remix-react '@remix-run/router': specifier: 1.19.2-pre.0