From cab5a7c09c3496d253de29637e73f859a1c72776 Mon Sep 17 00:00:00 2001 From: Remix Run Bot Date: Fri, 11 Oct 2024 21:45:08 +0000 Subject: [PATCH 01/18] chore: format --- packages/remix-dev/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/remix-dev/CHANGELOG.md b/packages/remix-dev/CHANGELOG.md index 1124da7ae20..a113245a8b4 100644 --- a/packages/remix-dev/CHANGELOG.md +++ b/packages/remix-dev/CHANGELOG.md @@ -29,6 +29,7 @@ ### Patch Changes - Stop passing `request.signal` as the `renderToReadableStream` `signal` to abort server rendering for cloudflare/deno runtimes because by the time that `request` is aborted, aborting the rendering is useless because there's no way for React to flush down the unresolved boundaries ([#10047](https://github.com/remix-run/remix/pull/10047)) + - This has been incorrect for some time, but only recently exposed due to a bug in how we were aborting requests when running via `remix vite:dev` because we were incorrectly aborting requests after successful renders - which was causing us to abort a completed React render, and try to close an already closed `ReadableStream`. - This has likely not shown up in any production scenarios because cloudflare/deno production runtimes are (correctly) not aborting the `request.signal` on successful renders - The built-in `entry.server` files no longer pass a `signal` to `renderToReadableStream` because adding a timeout-based abort signal to the default behavior would constitute a breaking change From 6823da7d00ba2cbce7d860f41b053386d80ee8d2 Mon Sep 17 00:00:00 2001 From: imzivko Date: Mon, 14 Oct 2024 00:02:30 +0200 Subject: [PATCH 02/18] docs(file-conventions/entry.server): fix grammar (#10103) --- contributors.yml | 1 + docs/file-conventions/entry.server.md | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/contributors.yml b/contributors.yml index 57082791773..62d1c3e7115 100644 --- a/contributors.yml +++ b/contributors.yml @@ -278,6 +278,7 @@ - IshanKBG - itsMapleLeaf - izznatsir +- imzivko - jacargentina - jack-r-warren - jackhkmatthews 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 From 308788f3bfe9c3ebb2ee6ae564865e328e8febd2 Mon Sep 17 00:00:00 2001 From: Remix Run Bot Date: Sun, 13 Oct 2024 22:03:50 +0000 Subject: [PATCH 03/18] chore: format --- contributors.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contributors.yml b/contributors.yml index 62d1c3e7115..83da2eac51d 100644 --- a/contributors.yml +++ b/contributors.yml @@ -269,6 +269,7 @@ - IgnusG - ikarus-akhil - illright +- imzivko - imzshh - infomiho - ionut-botizan @@ -278,7 +279,6 @@ - IshanKBG - itsMapleLeaf - izznatsir -- imzivko - jacargentina - jack-r-warren - jackhkmatthews From 8649f1a561ce5ea0bfba5ab862c0c94052f4a5c3 Mon Sep 17 00:00:00 2001 From: Petr Pacas Date: Mon, 14 Oct 2024 11:14:10 +0200 Subject: [PATCH 04/18] docs(guides/single-fetch): use stabilized flag (#10102) --- contributors.yml | 1 + docs/guides/single-fetch.md | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/contributors.yml b/contributors.yml index 83da2eac51d..8dff80d0f6c 100644 --- a/contributors.yml +++ b/contributors.yml @@ -532,6 +532,7 @@ - penspinner - penx - petetnt +- petrpacas - philandstuff - phishy - plastic041 diff --git a/docs/guides/single-fetch.md b/docs/guides/single-fetch.md index 1c4123196f2..7dac6d1c44c 100644 --- a/docs/guides/single-fetch.md +++ b/docs/guides/single-fetch.md @@ -80,7 +80,7 @@ There are a handful of breaking changes introduced with Single Fetch - some of w - **[New streaming Data format][streaming-format]**: Single fetch uses a new streaming format under the hood via [`turbo-stream`][turbo-stream], which means that we can stream down more complex data than just JSON - **No more auto-serialization**: Naked objects returned from `loader` and `action` functions are no longer automatically converted into a JSON `Response` and are serialized as-is over the wire -- [**Updates to type inference**][type-inference-section]: To get the most accurate type inference, you should [augment][augment] Remix's `Future` interface with `unstable_singleFetch: true` +- [**Updates to type inference**][type-inference-section]: To get the most accurate type inference, you should [augment][augment] Remix's `Future` interface with `v3_singleFetch: true` - [**Default revalidation behavior changes to opt-out on GET navigations**][revalidation]: Default revalidation behavior on normal navigations changes from opt-in to opt-out and your server loaders will re-run by default - [**Opt-in `action` revalidation**][action-revalidation]: Revalidation after an `action` `4xx`/`5xx` `Response` is now opt-in, versus opt-out @@ -88,7 +88,7 @@ There are a handful of breaking changes introduced with Single Fetch - some of w With Single Fetch enabled, you can go ahead and author routes that take advantage of the more powerful streaming format. -In order to get proper type inference, you need to [augment][augment] Remix's `Future` interface with `unstable_singleFetch: true`. You can read more about this in the [Type Inference section][type-inference-section]. +In order to get proper type inference, you need to [augment][augment] Remix's `Future` interface with `v3_singleFetch: true`. You can read more about this in the [Type Inference section][type-inference-section]. With Single Fetch you can return the following data types from your loader: `BigInt`, `Date`, `Error`, `Map`, `Promise`, `RegExp`, `Set`, `Symbol`, and `URL`. From 64612cc0b271cbebc1791bb69fd84e9727814e6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20K=C3=BChnel?= Date: Tue, 15 Oct 2024 16:27:04 +0200 Subject: [PATCH 05/18] [Grammar] Add missing period after sentence. (#10094) --- README.md | 2 +- contributors.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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 8dff80d0f6c..588b3a6712f 100644 --- a/contributors.yml +++ b/contributors.yml @@ -469,6 +469,7 @@ - mikechabot - mikeybinnswebdesign - mirzafaizan +- mischah - mitchelldirt - mjackson - mjangir From 11c2acc6d901442e07934fd78f1098040f616382 Mon Sep 17 00:00:00 2001 From: Matt Brophy Date: Tue, 15 Oct 2024 10:42:28 -0400 Subject: [PATCH 06/18] Update docs for single fetch nonce --- docs/guides/single-fetch.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/guides/single-fetch.md b/docs/guides/single-fetch.md index 7dac6d1c44c..7aa26050b00 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 `