Socket
Book a DemoInstallSign in
Socket

react-router

Package Overview
Dependencies
Maintainers
3
Versions
949
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-router - npm Package Versions

1
6466
95

6.17.0-pre.1

Diff
m
mjackson
published 6.17.0-pre.1 •
m
mjackson
published 6.17.0-pre.0 •
m
mjackson
published 0.0.0-experimental-4a8a492a •
m
mjackson
published 0.0.0-experimental-15961e14 •
m
mjackson
published 6.16.0 •

Changelog

Source

v6.16.0

Date: 2023-09-13

Minor Changes

  • In order to move towards stricter TypeScript support in the future, we're aiming to replace current usages of any with unknown on exposed typings for user-provided data. To do this in Remix v2 without introducing breaking changes in React Router v6, we have added generics to a number of shared types. These continue to default to any in React Router and are overridden with unknown in Remix. In React Router v7 we plan to move these to unknown as a breaking change. (#10843)
    • Location now accepts a generic for the location.state value
    • ActionFunctionArgs/ActionFunction/LoaderFunctionArgs/LoaderFunction now accept a generic for the context parameter (only used in SSR usages via createStaticHandler)
    • The return type of useMatches (now exported as UIMatch) accepts generics for match.data and match.handle - both of which were already set to unknown
  • Move the @private class export ErrorResponse to an UNSAFE_ErrorResponseImpl export since it is an implementation detail and there should be no construction of ErrorResponse instances in userland. This frees us up to export a type ErrorResponse which correlates to an instance of the class via InstanceType. Userland code should only ever be using ErrorResponse as a type and should be type-narrowing via isRouteErrorResponse. (#10811)
  • Export ShouldRevalidateFunctionArgs interface (#10797)
  • Removed private/internal APIs only required for the Remix v1 backwards compatibility layer and no longer needed in Remix v2 (_isFetchActionRedirect, _hasFetcherDoneAnything) (#10715)

Patch Changes

  • Properly encode rendered URIs in server rendering to avoid hydration errors (#10769)
  • Add method/url to error message on aborted query/queryRoute calls (#10793)
  • Fix a race-condition with loader/action-thrown errors on route.lazy routes (#10778)
  • Fix type for actionResult on the arguments object passed to shouldRevalidate (#10779)

Full Changelog: v6.15.0...v6.16.0

m
mjackson
published 6.16.0-pre.2 •
m
mjackson
published 6.16.0-pre.1 •
m
mjackson
published 6.16.0-pre.0 •
m
mjackson
published 0.0.0-experimental-7b1bbb00 •
m
mjackson
published 0.0.0-experimental-b8437806 •
SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.