fetch-router@0.6.0
Breaking Changes📦 remixView on GitHub →
⚠ 2 breaking✨ 6 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
- Update all calls to resource(), resources(), and formAction() to use 'names' instead of 'routeNames'.
- 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