# `render-middleware` CHANGELOG This is the changelog for [`render-middleware`](https://github.com/remix-run/remix/tree/main/packages/render-middleware). It follows [semantic versioning](https://semver.org/). ## v1.1.1 ### Patch Changes - Fix `context.render()` responding with `200` when a component throws while rendering the shell. The `render()` middleware now waits for the first chunk of HTML, so these errors reject `router.fetch()` for both `GET` and `HEAD` requests and the server can respond with a `500`. ([#12153](https://github.com/remix-run/remix/pull/12153)) - Bumped `@remix-run/*` dependencies: - [`assets@1.0.3`](https://github.com/remix-run/remix/releases/tag/assets@1.0.3) - [`component@1.3.0`](https://github.com/remix-run/remix/releases/tag/component@1.3.0) - [`csp-middleware@1.0.1`](https://github.com/remix-run/remix/releases/tag/csp-middleware@1.0.1) - [`fetch-router@1.0.1`](https://github.com/remix-run/remix/releases/tag/fetch-router@1.0.1) - [`response@1.0.3`](https://github.com/remix-run/remix/releases/tag/response@1.0.3) ## v1.1.0 ### Minor Changes - `render()` reads the nonce established by `csp()` and applies it to generated import maps, module preloads, and CSS mixin styles. Authored tags use `getCspNonce(context)`. ([#12098](https://github.com/remix-run/remix/pull/12098)) Internal frame requests, including redirects, inherit the document nonce before child handlers run, even on routes without their own CSP middleware. Independent requests receive fresh nonces when they run `csp()`. ### Patch Changes - Bumped `@remix-run/*` dependencies: - [`assets@1.0.2`](https://github.com/remix-run/remix/releases/tag/assets@1.0.2) - [`component@1.2.0`](https://github.com/remix-run/remix/releases/tag/component@1.2.0) - [`csp-middleware@1.0.0`](https://github.com/remix-run/remix/releases/tag/csp-middleware@1.0.0) - [`response@1.0.2`](https://github.com/remix-run/remix/releases/tag/response@1.0.2) ## v1.0.1 ### Patch Changes - Bumped `@remix-run/*` dependencies: - [`assets@1.0.1`](https://github.com/remix-run/remix/releases/tag/assets@1.0.1) - [`component@1.1.0`](https://github.com/remix-run/remix/releases/tag/component@1.1.0) - [`response@1.0.1`](https://github.com/remix-run/remix/releases/tag/response@1.0.1) ## v1.0.0 ### Major Changes - First stable release. ### Patch Changes - Bumped `@remix-run/*` dependencies: - [`assets@1.0.0`](https://github.com/remix-run/remix/releases/tag/assets@1.0.0) - [`component@1.0.0`](https://github.com/remix-run/remix/releases/tag/component@1.0.0) - [`fetch-router@1.0.0`](https://github.com/remix-run/remix/releases/tag/fetch-router@1.0.0) - [`response@1.0.0`](https://github.com/remix-run/remix/releases/tag/response@1.0.0) ## v0.3.3 ### Patch Changes - Bumped `@remix-run/*` dependencies: - [`component@0.8.0`](https://github.com/remix-run/remix/releases/tag/component@0.8.0) ## v0.3.2 ### Patch Changes - Report server rendering errors for browser-initiated frame requests through `onError`, or the default error reporter when no callback is configured. Internal frame subrequests continue to report errors through the enclosing render to avoid duplicate reports (see #11941). - Declare package modules as side-effect-free. - Bumped `@remix-run/*` dependencies: - [`assets@0.8.0`](https://github.com/remix-run/remix/releases/tag/assets@0.8.0) - [`fetch-router@0.22.2`](https://github.com/remix-run/remix/releases/tag/fetch-router@0.22.2) - [`response@0.3.10`](https://github.com/remix-run/remix/releases/tag/response@0.3.10) - [`ui@0.11.0`](https://github.com/remix-run/remix/releases/tag/ui@0.11.0) ## v0.3.1 ### Patch Changes - Bumped `@remix-run/*` dependencies: - [`assets@0.7.1`](https://github.com/remix-run/remix/releases/tag/assets@0.7.1) - [`fetch-router@0.22.1`](https://github.com/remix-run/remix/releases/tag/fetch-router@0.22.1) - [`response@0.3.9`](https://github.com/remix-run/remix/releases/tag/response@0.3.9) - [`ui@0.10.0`](https://github.com/remix-run/remix/releases/tag/ui@0.10.0) ## v0.3.0 ### Minor Changes - BREAKING CHANGE: `render({ assets })` now uses `assets.getScriptEntry()` to resolve client entries from source files so their import maps are included in rendered documents and frame responses. Custom asset server implementations must provide `getScriptEntry()` instead of `getHref()` and `getPreloads()`. It must return a `Promise` resolving to the following `ScriptEntry` shape: ```ts interface ScriptEntry { href: string preloads: string[] importMap: { imports: Record scopes?: Record> } } ``` Apps using `createAssetServer()` receive this integration automatically. Custom rendering setups can follow the [asset server migration steps](https://github.com/remix-run/remix/blob/main/packages/assets/CHANGELOG.md#v070) (see #11706). ### Patch Changes - Bumped `@remix-run/*` dependencies: - [`assets@0.7.0`](https://github.com/remix-run/remix/releases/tag/assets@0.7.0) - [`fetch-router@0.22.0`](https://github.com/remix-run/remix/releases/tag/fetch-router@0.22.0) - [`ui@0.9.0`](https://github.com/remix-run/remix/releases/tag/ui@0.9.0) ## v0.2.0 ### Minor Changes - Add `render({ assets?, onError? })`, the conventional request-scoped Remix UI renderer. It returns typed HTML responses through `context.render(node, init)`, resolves nested and targeted frames through the current router with safe request headers and cancellation, preserves frame error bodies, and optionally resolves source-based client entries through an asset server (see #11607). ### Patch Changes - Bumped `@remix-run/*` dependencies: - [`assets@0.6.0`](https://github.com/remix-run/remix/releases/tag/assets@0.6.0) - [`ui@0.8.0`](https://github.com/remix-run/remix/releases/tag/ui@0.8.0) ## v0.1.5 ### Patch Changes - Bumped `@remix-run/*` dependencies: - [`fetch-router@0.21.0`](https://github.com/remix-run/remix/releases/tag/fetch-router@0.21.0) ## v0.1.4 ### Patch Changes - Bumped `@remix-run/*` dependencies: - [`fetch-router@0.20.1`](https://github.com/remix-run/remix/releases/tag/fetch-router@0.20.1) ## v0.1.3 ### Patch Changes - Bumped `@remix-run/*` dependencies: - [`fetch-router@0.20.0`](https://github.com/remix-run/remix/releases/tag/fetch-router@0.20.0) ## v0.1.2 ### Patch Changes - Bumped `@remix-run/*` dependencies: - [`fetch-router@0.19.2`](https://github.com/remix-run/remix/releases/tag/fetch-router@0.19.2) ## v0.1.1 ### Patch Changes - Bumped `@remix-run/*` dependencies: - [`fetch-router@0.19.1`](https://github.com/remix-run/remix/releases/tag/fetch-router@0.19.1) ## v0.1.0 ### Minor Changes - Initial release of `@remix-run/render-middleware`, which provides the `Renderer` context key, `Renderer` type, and `renderWith()` middleware for adding request-scoped renderers to `fetch-router` request context. Renderers are available as both `context.render` and `context.get(Renderer)`. ### Patch Changes - Bumped `@remix-run/*` dependencies: - [`fetch-router@0.19.0`](https://github.com/remix-run/remix/releases/tag/fetch-router@0.19.0) ## Unreleased