@sentry/react 7.99.0 → 7.100.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/index.js +4 -0
- package/cjs/index.js.map +1 -1
- package/cjs/reactrouter.js +125 -23
- package/cjs/reactrouter.js.map +1 -1
- package/cjs/reactrouterv3.js +56 -19
- package/cjs/reactrouterv3.js.map +1 -1
- package/cjs/reactrouterv6.js +103 -29
- package/cjs/reactrouterv6.js.map +1 -1
- package/esm/index.js +3 -3
- package/esm/reactrouter.js +126 -26
- package/esm/reactrouter.js.map +1 -1
- package/esm/reactrouterv3.js +57 -21
- package/esm/reactrouterv3.js.map +1 -1
- package/esm/reactrouterv6.js +105 -32
- package/esm/reactrouterv6.js.map +1 -1
- package/package.json +5 -5
- package/types/index.d.ts +3 -3
- package/types/index.d.ts.map +1 -1
- package/types/reactrouter.d.ts +24 -1
- package/types/reactrouter.d.ts.map +1 -1
- package/types/reactrouterv3.d.ts +14 -0
- package/types/reactrouterv3.d.ts.map +1 -1
- package/types/reactrouterv6.d.ts +19 -1
- package/types/reactrouterv6.d.ts.map +1 -1
- package/types-ts3.8/index.d.ts +3 -3
- package/types-ts3.8/reactrouter.d.ts +24 -1
- package/types-ts3.8/reactrouterv3.d.ts +14 -0
- package/types-ts3.8/reactrouterv6.d.ts +19 -1
package/types/reactrouterv6.d.ts
CHANGED
|
@@ -1,8 +1,26 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { browserTracingIntegration } from '@sentry/browser';
|
|
2
|
+
import type { Integration, Transaction, TransactionContext } from '@sentry/types';
|
|
2
3
|
import * as React from 'react';
|
|
3
4
|
import type { CreateRouterFunction, CreateRoutesFromChildren, MatchRoutes, Router, RouterState, UseEffect, UseLocation, UseNavigationType, UseRoutes } from './types';
|
|
5
|
+
interface ReactRouterOptions {
|
|
6
|
+
useEffect: UseEffect;
|
|
7
|
+
useLocation: UseLocation;
|
|
8
|
+
useNavigationType: UseNavigationType;
|
|
9
|
+
createRoutesFromChildren: CreateRoutesFromChildren;
|
|
10
|
+
matchRoutes: MatchRoutes;
|
|
11
|
+
stripBasename?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* A browser tracing integration that uses React Router v3 to instrument navigations.
|
|
15
|
+
* Expects `history` (and optionally `routes` and `matchPath`) to be passed as options.
|
|
16
|
+
*/
|
|
17
|
+
export declare function reactRouterV6BrowserTracingIntegration(options: Parameters<typeof browserTracingIntegration>[0] & ReactRouterOptions): Integration;
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated Use `reactRouterV6BrowserTracingIntegration()` instead.
|
|
20
|
+
*/
|
|
4
21
|
export declare function reactRouterV6Instrumentation(useEffect: UseEffect, useLocation: UseLocation, useNavigationType: UseNavigationType, createRoutesFromChildren: CreateRoutesFromChildren, matchRoutes: MatchRoutes, stripBasename?: boolean): (customStartTransaction: (context: TransactionContext) => Transaction | undefined, startTransactionOnPageLoad?: boolean, startTransactionOnLocationChange?: boolean) => void;
|
|
5
22
|
export declare function withSentryReactRouterV6Routing<P extends Record<string, any>, R extends React.FC<P>>(Routes: R): R;
|
|
6
23
|
export declare function wrapUseRoutes(origUseRoutes: UseRoutes): UseRoutes;
|
|
7
24
|
export declare function wrapCreateBrowserRouter<TState extends RouterState = RouterState, TRouter extends Router<TState> = Router<TState>>(createRouterFunction: CreateRouterFunction<TState, TRouter>): CreateRouterFunction<TState, TRouter>;
|
|
25
|
+
export {};
|
|
8
26
|
//# sourceMappingURL=reactrouterv6.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reactrouterv6.d.ts","sourceRoot":"","sources":["../../src/reactrouterv6.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"reactrouterv6.d.ts","sourceRoot":"","sources":["../../src/reactrouterv6.tsx"],"names":[],"mappings":"AAIA,OAAO,EAEL,yBAAyB,EAG1B,MAAM,iBAAiB,CAAC;AASzB,OAAO,KAAK,EACV,WAA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CAAC,EAC/C,oBAAoB,EAAE,oBAAoB,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,oBAAoB,CAAC,MAAM,EAAE,OAAO,CAAC,CA0BpG"}
|
package/types-ts3.8/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { Profiler, withProfiler, useProfiler } from './profiler';
|
|
|
4
4
|
export { ErrorBoundaryProps, FallbackRender } from './errorboundary';
|
|
5
5
|
export { ErrorBoundary, withErrorBoundary } from './errorboundary';
|
|
6
6
|
export { createReduxEnhancer } from './redux';
|
|
7
|
-
export { reactRouterV3Instrumentation } from './reactrouterv3';
|
|
8
|
-
export { reactRouterV4Instrumentation, reactRouterV5Instrumentation, withSentryRouting } from './reactrouter';
|
|
9
|
-
export { reactRouterV6Instrumentation, withSentryReactRouterV6Routing, wrapUseRoutes, wrapCreateBrowserRouter, } from './reactrouterv6';
|
|
7
|
+
export { reactRouterV3Instrumentation, reactRouterV3BrowserTracingIntegration, } from './reactrouterv3';
|
|
8
|
+
export { reactRouterV4Instrumentation, reactRouterV5Instrumentation, withSentryRouting, reactRouterV4BrowserTracingIntegration, reactRouterV5BrowserTracingIntegration, } from './reactrouter';
|
|
9
|
+
export { reactRouterV6Instrumentation, reactRouterV6BrowserTracingIntegration, withSentryReactRouterV6Routing, wrapUseRoutes, wrapCreateBrowserRouter, } from './reactrouterv6';
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { browserTracingIntegration } from '@sentry/browser';
|
|
2
|
+
import { Integration } from '@sentry/types';
|
|
1
3
|
import * as React from 'react';
|
|
2
4
|
import { Action, Location, ReactRouterInstrumentation } from './types';
|
|
3
5
|
type Match = {
|
|
@@ -17,8 +19,29 @@ export type RouteConfig = {
|
|
|
17
19
|
component?: JSX.Element;
|
|
18
20
|
routes?: RouteConfig[];
|
|
19
21
|
};
|
|
20
|
-
type MatchPath = (pathname: string, props: string | string[] | any, parent?: Match | null) => Match | null;
|
|
22
|
+
export type MatchPath = (pathname: string, props: string | string[] | any, parent?: Match | null) => Match | null;
|
|
23
|
+
interface ReactRouterOptions {
|
|
24
|
+
history: RouterHistory;
|
|
25
|
+
routes?: RouteConfig[];
|
|
26
|
+
matchPath?: MatchPath;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A browser tracing integration that uses React Router v4 to instrument navigations.
|
|
30
|
+
* Expects `history` (and optionally `routes` and `matchPath`) to be passed as options.
|
|
31
|
+
*/
|
|
32
|
+
export declare function reactRouterV4BrowserTracingIntegration(options: Parameters<typeof browserTracingIntegration>[0] & ReactRouterOptions): Integration;
|
|
33
|
+
/**
|
|
34
|
+
* A browser tracing integration that uses React Router v5 to instrument navigations.
|
|
35
|
+
* Expects `history` (and optionally `routes` and `matchPath`) to be passed as options.
|
|
36
|
+
*/
|
|
37
|
+
export declare function reactRouterV5BrowserTracingIntegration(options: Parameters<typeof browserTracingIntegration>[0] & ReactRouterOptions): Integration;
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated Use `browserTracingReactRouterV4()` instead.
|
|
40
|
+
*/
|
|
21
41
|
export declare function reactRouterV4Instrumentation(history: RouterHistory, routes?: RouteConfig[], matchPath?: MatchPath): ReactRouterInstrumentation;
|
|
42
|
+
/**
|
|
43
|
+
* @deprecated Use `browserTracingReactRouterV5()` instead.
|
|
44
|
+
*/
|
|
22
45
|
export declare function reactRouterV5Instrumentation(history: RouterHistory, routes?: RouteConfig[], matchPath?: MatchPath): ReactRouterInstrumentation;
|
|
23
46
|
export declare function withSentryRouting<P extends Record<string, any>, R extends React.ComponentType<P>>(Route: R): R;
|
|
24
47
|
export {};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { browserTracingIntegration } from '@sentry/browser';
|
|
2
|
+
import { Integration } from '@sentry/types';
|
|
1
3
|
import { Location, ReactRouterInstrumentation } from './types';
|
|
2
4
|
type HistoryV3 = {
|
|
3
5
|
location?: Location;
|
|
@@ -13,6 +15,16 @@ export type Match = (props: {
|
|
|
13
15
|
}, cb: (error?: Error, _redirectLocation?: Location, renderProps?: {
|
|
14
16
|
routes?: Route[];
|
|
15
17
|
}) => void) => void;
|
|
18
|
+
interface ReactRouterOptions {
|
|
19
|
+
history: HistoryV3;
|
|
20
|
+
routes: Route[];
|
|
21
|
+
match: Match;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A browser tracing integration that uses React Router v3 to instrument navigations.
|
|
25
|
+
* Expects `history` (and optionally `routes` and `matchPath`) to be passed as options.
|
|
26
|
+
*/
|
|
27
|
+
export declare function reactRouterV3BrowserTracingIntegration(options: Parameters<typeof browserTracingIntegration>[0] & ReactRouterOptions): Integration;
|
|
16
28
|
/**
|
|
17
29
|
* Creates routing instrumentation for React Router v3
|
|
18
30
|
* Works for React Router >= 3.2.0 and < 4.0.0
|
|
@@ -20,6 +32,8 @@ export type Match = (props: {
|
|
|
20
32
|
* @param history object from the `history` library
|
|
21
33
|
* @param routes a list of all routes, should be
|
|
22
34
|
* @param match `Router.match` utility
|
|
35
|
+
*
|
|
36
|
+
* @deprecated Use `reactRouterV3BrowserTracingIntegration()` instead
|
|
23
37
|
*/
|
|
24
38
|
export declare function reactRouterV3Instrumentation(history: HistoryV3, routes: Route[], match: Match): ReactRouterInstrumentation;
|
|
25
39
|
export {};
|
|
@@ -1,8 +1,26 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { browserTracingIntegration } from '@sentry/browser';
|
|
2
|
+
import { Integration, Transaction, TransactionContext } from '@sentry/types';
|
|
2
3
|
import * as React from 'react';
|
|
3
4
|
import { CreateRouterFunction, CreateRoutesFromChildren, MatchRoutes, Router, RouterState, UseEffect, UseLocation, UseNavigationType, UseRoutes } from './types';
|
|
5
|
+
interface ReactRouterOptions {
|
|
6
|
+
useEffect: UseEffect;
|
|
7
|
+
useLocation: UseLocation;
|
|
8
|
+
useNavigationType: UseNavigationType;
|
|
9
|
+
createRoutesFromChildren: CreateRoutesFromChildren;
|
|
10
|
+
matchRoutes: MatchRoutes;
|
|
11
|
+
stripBasename?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* A browser tracing integration that uses React Router v3 to instrument navigations.
|
|
15
|
+
* Expects `history` (and optionally `routes` and `matchPath`) to be passed as options.
|
|
16
|
+
*/
|
|
17
|
+
export declare function reactRouterV6BrowserTracingIntegration(options: Parameters<typeof browserTracingIntegration>[0] & ReactRouterOptions): Integration;
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated Use `reactRouterV6BrowserTracingIntegration()` instead.
|
|
20
|
+
*/
|
|
4
21
|
export declare function reactRouterV6Instrumentation(useEffect: UseEffect, useLocation: UseLocation, useNavigationType: UseNavigationType, createRoutesFromChildren: CreateRoutesFromChildren, matchRoutes: MatchRoutes, stripBasename?: boolean): (customStartTransaction: (context: TransactionContext) => Transaction | undefined, startTransactionOnPageLoad?: boolean, startTransactionOnLocationChange?: boolean) => void;
|
|
5
22
|
export declare function withSentryReactRouterV6Routing<P extends Record<string, any>, R extends React.FC<P>>(Routes: R): R;
|
|
6
23
|
export declare function wrapUseRoutes(origUseRoutes: UseRoutes): UseRoutes;
|
|
7
24
|
export declare function wrapCreateBrowserRouter<TState extends RouterState = RouterState, TRouter extends Router<TState> = Router<TState>>(createRouterFunction: CreateRouterFunction<TState, TRouter>): CreateRouterFunction<TState, TRouter>;
|
|
25
|
+
export {};
|
|
8
26
|
//# sourceMappingURL=reactrouterv6.d.ts.map
|