Minor Changes
-
createFileResponse()is now generic and accepts any file-like objectThe function now accepts any object satisfying the
FileLikeinterface, which includes both nativeFileandLazyFilefrom@remix-run/lazy-file. This change supports the updatedLazyFileclass which no longer extends nativeFile.The generic type flows through to the
digestcallback in options, so you get the exact type you passed in:// With native File - digest receives File createFileResponse(nativeFile, request, { digest: async (file) => { /* file is typed as File */ }, }) // With LazyFile - digest receives LazyFile createFileResponse(lazyFile, request, { digest: async (file) => { /* file is typed as LazyFile */ }, })
-
Add
redirectexport which is a shorthand alias forcreateRedirectResponse
Patch Changes
- Update
@remix-run/headerspeer dependency to use the new header parsing methods.