Change8

fetch-router@0.6.0

Breaking Changes
📦 remixView on GitHub →
2 breaking6 features🐛 1 fixes🔧 9 symbols

Summary

This release introduces native form data handling and file upload support directly into the router, while renaming several routing options for consistency.

⚠️ Breaking Changes

  • Renamed 'routeNames' option to 'names' in resource(), resources(), and formAction() functions.
  • Renamed 'submitMethod' option to 'formMethod' in formAction().

Migration Steps

  1. Update all calls to resource(), resources(), and formAction() to use 'names' instead of 'routeNames'.
  2. Update formAction() calls to use 'formMethod' instead of 'submitMethod'.

✨ New Features

  • Integrated form data handling directly into the router.
  • Added support for method override to simulate RESTful API methods (PUT, DELETE) via HTML forms.
  • Added support for file uploads with configurable limits (maxFiles, maxFileSize, maxHeaderSize).
  • Added 'uploadHandler' configuration to createRouter for custom file storage logic.
  • Exported 'InferRouteHandler' and 'InferRequestHandler' types.
  • Re-exported 'FormDataParseError', 'FileUpload', and 'FileUploadHandler' from @remix-run/form-data-parser.

🐛 Bug Fixes

  • Fixed an issue where per-route middleware was not applied to handlers nested inside a route map that had its own middleware.

🔧 Affected Symbols

resourceresourcesformActioncreateRouterInferRouteHandlerInferRequestHandlerFormDataParseErrorFileUploadFileUploadHandler