Change8

fetch-router@0.12.0

Breaking Changes
📦 remixView on GitHub →
2 breaking1 features🔧 11 symbols

Summary

This release introduces breaking changes by migrating response helpers to a new package and renaming the InferRequestHandler type, while adding new exclusion options for route mapping.

⚠️ Breaking Changes

  • Response helpers have been moved from @remix-run/fetch-router/response-helpers to @remix-run/response. Imports must be updated to use specific named exports.
  • The InferRequestHandler type has been renamed to BuildRequestHandler.

Migration Steps

  1. Update response helper imports from '@remix-run/fetch-router/response-helpers' to specific sub-paths in '@remix-run/response' (e.g., /file, /html, /redirect).
  2. Replace usage of res.file() with createFileResponse().
  3. Replace usage of res.html() with createHtmlResponse().
  4. Replace usage of res.redirect() with createRedirectResponse().
  5. Rename all instances of the type InferRequestHandler to BuildRequestHandler.

✨ New Features

  • Added 'exclude' option to resource() and resources() route map helpers (#10858).

🔧 Affected Symbols

@remix-run/fetch-router/response-helpers@remix-run/response/file@remix-run/response/html@remix-run/response/redirectcreateFileResponsecreateHtmlResponsecreateRedirectResponseInferRequestHandlerBuildRequestHandlerresourceresources