- Updated dependencies:
react-router@7.13.0
- Updated dependencies:
react-router@7.12.0
- Updated dependencies:
react-router@7.11.0
- Updated dependencies:
react-router@7.10.1
- Updated dependencies:
react-router@7.10.0
- Updated dependencies:
react-router@7.9.6
- Updated dependencies:
react-router@7.9.5
- Validate format of incoming session ids in
createFileSessionStorage(#14426) - Updated dependencies:
react-router@7.9.4
- Updated dependencies:
react-router@7.9.3
- Updated dependencies:
react-router@7.9.2
- Updated dependencies:
react-router@7.9.1
-
Stabilize middleware and context APIs. (#14215)
We have removed the
unstable_prefix from the following APIs and they are now considered stable and ready for production use:RouterContextProvidercreateContextcreateBrowserRoutergetContextoption<HydratedRouter>getContextprop
Please see the Middleware Docs, the Middleware RFC, and the Client-side Context RFC for more information.
- Updated dependencies:
react-router@7.9.0
- Updated dependencies:
react-router@7.8.2
- Updated dependencies:
react-router@7.8.1
-
[UNSTABLE] Change
getLoadContextsignature (type GetLoadContextFunction) whenfuture.unstable_middlewareis enabled so that it returns anunstable_RouterContextProviderinstance instead of aMapused to contruct the instance internally (#14097)- This also removes the
type unstable_InitialContextexport ⚠️ This is a breaking change if you have adopted middleware and are using a custom server with agetLoadContextfunction
- This also removes the
-
Updated dependencies:
react-router@7.8.0
- Updated dependencies:
react-router@7.7.1
- Updated dependencies:
react-router@7.7.0
- Remove old "install" package exports (#13762)
- Updated dependencies:
react-router@7.6.3
- Updated dependencies:
react-router@7.6.2
- Updated dependencies:
react-router@7.6.1
- Updated dependencies:
react-router@7.6.0
- Updated dependencies:
react-router@7.5.3
- Updated dependencies:
react-router@7.5.2
- Updated dependencies:
react-router@7.5.1
- Updated dependencies:
react-router@7.5.0
- Updated dependencies:
react-router@7.4.1
- Updated dependencies:
react-router@7.4.0
- Updated dependencies:
react-router@7.3.0
- Updated dependencies:
react-router@7.2.0
- Updated dependencies:
react-router@7.1.5
- Updated dependencies:
react-router@7.1.4
- Updated dependencies:
react-router@7.1.3
- Updated dependencies:
react-router@7.1.2
- Updated dependencies:
react-router@7.1.1
- Updated dependencies:
react-router@7.1.0
- Updated dependencies:
react-router@7.0.2
- Updated dependencies:
react-router@7.0.1
-
Remove single fetch future flag. (#11522)
-
For Remix consumers migrating to React Router, the
cryptoglobal from the Web Crypto API is now required when using cookie and session APIs. This means that the following APIs are provided fromreact-routerrather than platform-specific packages: (#11837)createCookiecreateCookieSessionStoragecreateMemorySessionStoragecreateSessionStorage
For consumers running older versions of Node, the
installGlobalsfunction from@remix-run/nodehas been updated to defineglobalThis.crypto, using Node'srequire('node:crypto').webcryptoimplementation.Since platform-specific packages no longer need to implement this API, the following low-level APIs have been removed:
createCookieFactorycreateSessionStorageFactorycreateCookieSessionStorageFactorycreateMemorySessionStorageFactory
-
update minimum node version to 18 (#11690)
-
Add
exportsfield to all packages (#11675) -
node package no longer re-exports from react-router (#11702)
-
Drop support for Node 18, update minimum Node vestion to 20 (#12171)
- Remove
installGlobals()as this should no longer be necessary
- Remove
- Add createRequestListener to @react-router/node (#12319)
- Remove unstable upload handler. (#12015)
- Remove unneeded dependency on @web3-storage/multipart-parser (#12274)
- Updated dependencies:
react-router@7.0.0
- Use undici as our fetch polyfill going forward (#9106, #9111)
- Put
undicifetch polyfill behind a newinstallGlobals({ nativeFetch: true })parameter (#9198)remix-servewill default to usingundicifor the fetch polyfill iffuture._unstable_singleFetchis enabled because the single fetch implementation relies on theundicipolyfill- Any users opting into Single Fetch and managing their own polfill will need to pass the flag to
installGlobalson their own to avoid runtime errors with Single Fetch
- Any users opting into Single Fetch and managing their own polfill will need to pass the flag to
- Updated dependencies:
@remix-run/server-runtime@2.9.0
- Updated dependencies:
@remix-run/server-runtime@2.8.1
- Updated dependencies:
@remix-run/server-runtime@2.8.0
- Updated dependencies:
@remix-run/server-runtime@2.7.2
- Updated dependencies:
@remix-run/server-runtime@2.7.1
- Updated dependencies:
@remix-run/server-runtime@2.7.0
- Updated dependencies:
@remix-run/server-runtime@2.6.0
- Updated dependencies:
@remix-run/server-runtime@2.5.1
- Updated dependencies:
@remix-run/server-runtime@2.5.0
- Updated dependencies:
@remix-run/server-runtime@2.4.1
- Deprecate
DataFunctionArgsin favor ofLoaderFunctionArgs/ActionFunctionArgs. This is aimed at keeping the types aligned across server/client loaders/actions now thatclientLoader/clientActonfunctions haveserverLoader/serverActionparameters which differentiateClientLoaderFunctionArgs/ClientActionFunctionArgs. (#8173)
- Update to
@remix-run/web-fetch@4.4.2(#8231) - Updated dependencies:
@remix-run/server-runtime@2.4.0
- Updated dependencies:
@remix-run/server-runtime@2.3.1
- Updated dependencies:
@remix-run/server-runtime@2.3.0
- Updated dependencies:
@remix-run/server-runtime@2.2.0
- Updated dependencies:
@remix-run/server-runtime@2.1.0
- Switch from
crypto.randomBytestocrypto.webcrypto.getRandomValuesfor file session storage ID generation (#7203) - Use native
Blobclass instead of polyfill (#7217) - Updated dependencies:
@remix-run/server-runtime@2.0.1@remix-run/web-fetch@4.4.1
-
Require Node >=18.0.0 (#6939)
-
Stop exporting the
fetchAPI in favor of using the version in the global scope - which can be polyfilled viainstallGlobals(#7293) -
Removed/adjusted types to prefer
unknownoveranyand to align with underlying React Router types (#7319, #7354):- Renamed the
useMatches()return type fromRouteMatchtoUIMatch - Renamed
LoaderArgs/ActionArgstoLoaderFunctionArgs/ActionFunctionArgs AppDatachanged fromanytounknownLocation["state"](useLocation.state) changed fromanytounknownUIMatch["data"](useMatches()[i].data) changed fromanytounknownUIMatch["handle"](useMatches()[i].handle) changed from{ [k: string]: any }tounknownFetcher["data"](useFetcher().data) changed fromanytounknownMetaMatch.handle(used inmeta()) changed fromanytounknownAppData/RouteHandleare no longer exported as they are just aliases forunknown
- Renamed the
-
The route
metaAPI now defaults to the new "V2 Meta" API (#6958)- Please refer to the (docs and Preparing for V2 guide for more information.
-
For preparation of using Node's built in fetch implementation, installing the fetch globals is now a responsibility of the app server (#7009)
-
If you are using
remix-serve, nothing is required -
If you are using your own app server, you will need to install the globals yourself
import { installGlobals } from "@remix-run/node"; installGlobals();
-
-
source-map-supportis now a responsibility of the app server (#7009)-
If you are using
remix-serve, nothing is required -
If you are using your own app server, you will need to install
source-map-supportyourself.npm i source-map-support
import sourceMapSupport from "source-map-support"; sourceMapSupport.install();
-
-
Removed support for "magic exports" from the
remixpackage. This package can be removed from yourpackage.jsonand you should update all imports to use the source@remix-run/*packages: (#6895)- import type { ActionArgs } from "remix"; - import { json, useLoaderData } from "remix"; + import type { ActionArgs } from "@remix-run/node"; + import { json } from "@remix-run/node"; + import { useLoaderData } from "@remix-run/react";
- Remove
atob/btoapolyfills in favor of built-in versions (#7206) - Export proper
ErrorResponsetype for usage alongsideisRouteErrorResponse(#7244) - Add the rest of the Web Streams API to
installGlobals(#7321) - Ensures
fetch()return isinstanceof global Responseby removing extended classes forNodeRequestandNodeResponsein favor of custom interface type cast (#7109) - Remove recursion from stream utilities (#7245)
- Updated dependencies:
@remix-run/server-runtime@2.0.0@remix-run/web-fetch@4.4.0@remix-run/web-file@3.1.0@remix-run/web-stream@1.1.0
- Updated dependencies:
@remix-run/server-runtime@1.19.3
- Update to latest
@remix-run/web-*packages (#7026) - Updated dependencies:
@remix-run/server-runtime@1.19.2
- Updated dependencies:
@remix-run/server-runtime@1.19.1
- Upgrade to
@remix-run/web-fetch@4.3.5. Submitted empty file inputs are now correctly parsed out as emptyFileinstances instead of being surfaced as an empty string viarequest.formData()(#6816) - Updated dependencies:
@remix-run/server-runtime@1.19.0
- Updated dependencies:
@remix-run/server-runtime@1.18.1
- Updated dependencies:
@remix-run/server-runtime@1.18.0
- Updated dependencies:
@remix-run/server-runtime@1.17.1
-
Add
HeadersArgstype to be consistent with loaders/actions/meta and allows for using afunctiondeclaration in addition to an arrow function expression (#6247)import type { HeadersArgs } from "@remix-run/node"; // or cloudflare/deno export function headers({ loaderHeaders }: HeadersArgs) { return { "x-my-custom-thing": loaderHeaders.get("x-my-custom-thing") || "fallback", }; }
-
Fix
request.clone() instanceof Requestreturning false. (#6512) -
Updated dependencies:
@remix-run/server-runtime@1.17.0
- Updated dependencies:
@remix-run/server-runtime@1.16.1
- add
@remix-run/node/installside-effect to allownode --require @remix-run/node/install(#6132) - add
logDevReadyas replacement for platforms that can't initialize async I/O outside of the request response lifecycle. (#6204) - add missing files to published package (#6179)
- Updated dependencies:
@remix-run/server-runtime@1.16.0
- We have made a few changes to the API for route module
metafunctions when using thefuture.v2_metaflag. These changes are only breaking for users who have opted in. (#5746)V2_HtmlMetaDescriptorhas been renamed toV2_MetaDescriptor- The
metafunction's arguments have been simplifiedparentsDatahas been removed, as each route's loader data is available on thedataproperty of its respectivematchobject// before export function meta({ parentsData }) { return [{ title: parentsData["routes/some-route"].title }]; } // after export function meta({ matches }) { return [ { title: matches.find((match) => match.id === "routes/some-route") .data.title, }, ]; }
- The
routeproperty on route matches has been removed, as relevant match data is attached directly to the match object// before export function meta({ matches }) { const rootModule = matches.find((match) => match.route.id === "root"); } // after export function meta({ matches }) { const rootModule = matches.find((match) => match.id === "root"); }
- Added support for generating
<script type='application/ld+json' />and meta-related<link />tags to document head via the routemetafunction when using thev2_metafuture flag
- Updated dependencies:
@remix-run/server-runtime@1.15.0
- Updated dependencies:
@remix-run/server-runtime@1.14.3
- Updated dependencies:
@remix-run/server-runtime@1.14.2
- Updated dependencies:
@remix-run/server-runtime@1.14.1
- Updated dependencies:
@remix-run/server-runtime@1.14.0
- Updated dependencies:
@remix-run/server-runtime@1.13.0
- Updated dependencies:
@remix-run/server-runtime@1.12.0
- Updated dependencies:
@remix-run/server-runtime@1.11.1
-
Introduces the
defer()API from@remix-run/routerwith support for server-rendering and HTTP streaming. This utility allows you to defer values returned fromloaderfunctions by returning promises instead of resolved values. This has been refered to as "sending a promise over the wire". (#4920)Informational Resources:
- https://gist.github.com/jacob-ebey/9bde9546c1aafaa6bc8c242054b1be26
- https://github.com/remix-run/remix/blob/main/decisions/0004-streaming-apis.md
Documentation Resources (better docs specific to Remix are in the works):
-
Updated dependencies:
@remix-run/server-runtime@1.11.0
- Updated dependencies:
@remix-run/server-runtime@1.10.1
- Export
V2_HtmlMetaDescriptorandV2_MetaFunctiontypes from runtime packages (#4943) - Updated dependencies:
@remix-run/server-runtime@1.10.0
- Updated dependencies:
@remix-run/server-runtime@1.9.0
- Updated dependencies:
@remix-run/server-runtime@1.8.2
- Updated dependencies:
@remix-run/server-runtime@1.8.1
- Importing functions and types from the
remixpackage is deprecated, and all (#3284) exported modules will be removed in the next major release. For more details, see the release notes for 1.4.0 where these changes were first announced.
- Update
@remix-run/web-fetch. This addresses two bugs: (#4644)- It fixes a memory leak caused by unregistered listeners
- It adds support for custom
"credentials"values (Remix does nothing with these at the moment, but they pass through for the consumer of the request to access if needed)
- Updated dependencies:
@remix-run/server-runtime@1.8.0
- Updated dependencies:
@remix-run/server-runtime@1.7.6
- Updated dependencies:
@remix-run/server-runtime@1.7.5
- Updated dependencies:
@remix-run/server-runtime@1.7.4
- Updated dependencies:
@remix-run/server-runtime@1.7.3@remix-run/web-fetch@4.3.1
- Flush Node streams to address issues with libraries like
compressionthat rely on chunk flushing (#4235) - Updated dependencies:
@remix-run/server-runtime@1.7.2
- Updated dependencies:
@remix-run/server-runtime@1.7.1
- We've added a new type:
SerializeFrom. This is used to infer the (#4013) JSON-serialized return type of loaders and actions.
- Fixed a bug when destroying
fileStoragesessions to prevent deleting entire session directories - Updated dependencies:
@remix-run/server-runtime@1.7.0
- Updated dependencies:
@remix-run/server-runtime@1.6.8
- Updated dependencies:
@remix-run/server-runtime@1.6.7
- Updated dependencies:
@remix-run/server-runtime@1.6.6
-
We enhanced the type signatures of
loader/actionanduseLoaderData/useActionDatato make it possible to infer the data type from return type of its related server function.To enable this feature, you will need to use the
LoaderArgstype from@remix-run/nodeinstead of typing the function directly:- import type { LoaderFunction } from "@remix-run/node"; + import type { LoaderArgs } from "@remix-run/node"; - export const loader: LoaderFunction = async (args) => { - return json<LoaderData>(data); - } + export async function loader(args: LoaderArgs) { + return json(data); + }
Then you can infer the loader data by using
typeof loaderas the type variable inuseLoaderData:- let data = useLoaderData() as LoaderData; + let data = useLoaderData<typeof loader>();
The API above is exactly the same for your route
actionanduseActionDatavia theActionArgstype.With this change you no longer need to manually define a
LoaderDatatype (huge time and typo saver!), and we serialize all values so thatuseLoaderDatacan't return types that are impossible over the network, such asDateobjects or functions. -
Updated dependencies
@remix-run/server-runtime