Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-router

Package Overview
Dependencies
Maintainers
3
Versions
596
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-router - npm Package Compare versions

Comparing version 7.0.2-pre.0 to 7.0.2

dist/development/chunk-D52XG6IA.mjs

8

CHANGELOG.md
# `react-router`
## 7.0.2-pre.0
## 7.0.2

@@ -8,6 +8,6 @@ ### Patch Changes

- temporarily only use one build in export map so packages can have a peer dependency on react router ([#12437](https://github.com/remix-run/react-router/pull/12437))
- Generate wide `matches` and `params` types for child routes ([#12397](https://github.com/remix-run/react-router/pull/12397))
- Generate wide `matches` and `params` types for current route and child routes ([#12397](https://github.com/remix-run/react-router/pull/12397))
At runtime, `matches` includes child route matches and `params` include child route path parameters.
But previously, we only generated types for parent routes and the current route in `matches` and `params`.
But previously, we only generated types for parent routes in `matches`; for `params`, we only considered the parent routes and the current route.
To align our generated types more closely to the runtime behavior, we now generate more permissive, wider types when accessing child route information.

@@ -34,3 +34,3 @@

- Remove single_fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522))
- Remove single\_fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522))

@@ -37,0 +37,0 @@ - Drop support for Node 16, React Router SSR now requires Node 18 or higher ([#11391](https://github.com/remix-run/react-router/pull/11391))

@@ -37,3 +37,3 @@ import { av as LinkDescriptor, as as MetaDescriptor, aJ as ServerDataFrom, aK as ClientDataFrom, aL as Func, aM as Equal, aN as Pretty } from '../../route-data-DuV3tXo2.js';

}>;
type MetaMatches<T extends RouteInfo[]> = T extends [infer F extends RouteInfo, ...infer R extends RouteInfo[]] ? [MetaMatch<F>, ...MetaMatches<R>] : MetaMatch<RouteInfo>[];
type MetaMatches<T extends RouteInfo[]> = T extends [infer F extends RouteInfo, ...infer R extends RouteInfo[]] ? [MetaMatch<F>, ...MetaMatches<R>] : Array<MetaMatch<RouteInfo> | undefined>;
type CreateMetaArgs<T extends RouteInfo> = {

@@ -44,3 +44,3 @@ location: Location;

error?: unknown;
matches: MetaMatches<T["parents"]>;
matches: MetaMatches<[...T["parents"], T]>;
};

@@ -97,3 +97,3 @@ type MetaDescriptors = MetaDescriptor[];

}>;
type Matches<T extends RouteInfo[]> = T extends [infer F extends RouteInfo, ...infer R extends RouteInfo[]] ? [Match<F>, ...Matches<R>] : Match<RouteInfo>[];
type Matches<T extends RouteInfo[]> = T extends [infer F extends RouteInfo, ...infer R extends RouteInfo[]] ? [Match<F>, ...Matches<R>] : Array<Match<RouteInfo> | undefined>;
type CreateComponentProps<T extends RouteInfo> = {

@@ -103,3 +103,3 @@ params: T["params"];

actionData?: T["actionData"];
matches: Matches<T["parents"]>;
matches: Matches<[...T["parents"], T]>;
};

@@ -106,0 +106,0 @@ type CreateErrorBoundaryProps<T extends RouteInfo> = {

/**
* react-router v7.0.2-pre.0
* react-router v7.0.2
*

@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc.

@@ -37,3 +37,3 @@ import { av as LinkDescriptor, as as MetaDescriptor, aJ as ServerDataFrom, aK as ClientDataFrom, aL as Func, aM as Equal, aN as Pretty } from '../../route-data-DuV3tXo2.js';

}>;
type MetaMatches<T extends RouteInfo[]> = T extends [infer F extends RouteInfo, ...infer R extends RouteInfo[]] ? [MetaMatch<F>, ...MetaMatches<R>] : MetaMatch<RouteInfo>[];
type MetaMatches<T extends RouteInfo[]> = T extends [infer F extends RouteInfo, ...infer R extends RouteInfo[]] ? [MetaMatch<F>, ...MetaMatches<R>] : Array<MetaMatch<RouteInfo> | undefined>;
type CreateMetaArgs<T extends RouteInfo> = {

@@ -44,3 +44,3 @@ location: Location;

error?: unknown;
matches: MetaMatches<T["parents"]>;
matches: MetaMatches<[...T["parents"], T]>;
};

@@ -97,3 +97,3 @@ type MetaDescriptors = MetaDescriptor[];

}>;
type Matches<T extends RouteInfo[]> = T extends [infer F extends RouteInfo, ...infer R extends RouteInfo[]] ? [Match<F>, ...Matches<R>] : Match<RouteInfo>[];
type Matches<T extends RouteInfo[]> = T extends [infer F extends RouteInfo, ...infer R extends RouteInfo[]] ? [Match<F>, ...Matches<R>] : Array<Match<RouteInfo> | undefined>;
type CreateComponentProps<T extends RouteInfo> = {

@@ -103,3 +103,3 @@ params: T["params"];

actionData?: T["actionData"];
matches: Matches<T["parents"]>;
matches: Matches<[...T["parents"], T]>;
};

@@ -106,0 +106,0 @@ type CreateErrorBoundaryProps<T extends RouteInfo> = {

/**
* react-router v7.0.2-pre.0
* react-router v7.0.2
*

@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc.

{
"name": "react-router",
"version": "7.0.2-pre.0",
"version": "7.0.2",
"description": "Declarative routing for React",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc