fetch-router@0.12.0
Breaking Changes📦 remixView on GitHub →
⚠ 2 breaking✨ 1 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
- Update response helper imports from '@remix-run/fetch-router/response-helpers' to specific sub-paths in '@remix-run/response' (e.g., /file, /html, /redirect).
- Replace usage of res.file() with createFileResponse().
- Replace usage of res.html() with createHtmlResponse().
- Replace usage of res.redirect() with createRedirectResponse().
- 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