@depup/sentry__react 10.44.0-depup.0

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.
Files changed (140) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +25 -0
  3. package/build/cjs/constants.js +12 -0
  4. package/build/cjs/constants.js.map +1 -0
  5. package/build/cjs/debug-build.js +11 -0
  6. package/build/cjs/debug-build.js.map +1 -0
  7. package/build/cjs/error.js +113 -0
  8. package/build/cjs/error.js.map +1 -0
  9. package/build/cjs/errorboundary.js +170 -0
  10. package/build/cjs/errorboundary.js.map +1 -0
  11. package/build/cjs/hoist-non-react-statics.js +159 -0
  12. package/build/cjs/hoist-non-react-statics.js.map +1 -0
  13. package/build/cjs/index.js +51 -0
  14. package/build/cjs/index.js.map +1 -0
  15. package/build/cjs/profiler.js +226 -0
  16. package/build/cjs/profiler.js.map +1 -0
  17. package/build/cjs/reactrouter-compat-utils/instrumentation.js +1295 -0
  18. package/build/cjs/reactrouter-compat-utils/instrumentation.js.map +1 -0
  19. package/build/cjs/reactrouter-compat-utils/lazy-routes.js +160 -0
  20. package/build/cjs/reactrouter-compat-utils/lazy-routes.js.map +1 -0
  21. package/build/cjs/reactrouter-compat-utils/route-manifest.js +194 -0
  22. package/build/cjs/reactrouter-compat-utils/route-manifest.js.map +1 -0
  23. package/build/cjs/reactrouter-compat-utils/utils.js +336 -0
  24. package/build/cjs/reactrouter-compat-utils/utils.js.map +1 -0
  25. package/build/cjs/reactrouter.js +236 -0
  26. package/build/cjs/reactrouter.js.map +1 -0
  27. package/build/cjs/reactrouterv3.js +130 -0
  28. package/build/cjs/reactrouterv3.js.map +1 -0
  29. package/build/cjs/reactrouterv6.js +61 -0
  30. package/build/cjs/reactrouterv6.js.map +1 -0
  31. package/build/cjs/reactrouterv7.js +61 -0
  32. package/build/cjs/reactrouterv7.js.map +1 -0
  33. package/build/cjs/redux.js +106 -0
  34. package/build/cjs/redux.js.map +1 -0
  35. package/build/cjs/sdk.js +21 -0
  36. package/build/cjs/sdk.js.map +1 -0
  37. package/build/cjs/tanstackrouter.js +134 -0
  38. package/build/cjs/tanstackrouter.js.map +1 -0
  39. package/build/esm/constants.js +8 -0
  40. package/build/esm/constants.js.map +1 -0
  41. package/build/esm/debug-build.js +9 -0
  42. package/build/esm/debug-build.js.map +1 -0
  43. package/build/esm/error.js +108 -0
  44. package/build/esm/error.js.map +1 -0
  45. package/build/esm/errorboundary.js +166 -0
  46. package/build/esm/errorboundary.js.map +1 -0
  47. package/build/esm/hoist-non-react-statics.js +157 -0
  48. package/build/esm/hoist-non-react-statics.js.map +1 -0
  49. package/build/esm/index.js +12 -0
  50. package/build/esm/index.js.map +1 -0
  51. package/build/esm/package.json +1 -0
  52. package/build/esm/profiler.js +221 -0
  53. package/build/esm/profiler.js.map +1 -0
  54. package/build/esm/reactrouter-compat-utils/instrumentation.js +1281 -0
  55. package/build/esm/reactrouter-compat-utils/instrumentation.js.map +1 -0
  56. package/build/esm/reactrouter-compat-utils/lazy-routes.js +156 -0
  57. package/build/esm/reactrouter-compat-utils/lazy-routes.js.map +1 -0
  58. package/build/esm/reactrouter-compat-utils/route-manifest.js +191 -0
  59. package/build/esm/reactrouter-compat-utils/route-manifest.js.map +1 -0
  60. package/build/esm/reactrouter-compat-utils/utils.js +320 -0
  61. package/build/esm/reactrouter-compat-utils/utils.js.map +1 -0
  62. package/build/esm/reactrouter.js +232 -0
  63. package/build/esm/reactrouter.js.map +1 -0
  64. package/build/esm/reactrouterv3.js +128 -0
  65. package/build/esm/reactrouterv3.js.map +1 -0
  66. package/build/esm/reactrouterv6.js +55 -0
  67. package/build/esm/reactrouterv6.js.map +1 -0
  68. package/build/esm/reactrouterv7.js +55 -0
  69. package/build/esm/reactrouterv7.js.map +1 -0
  70. package/build/esm/redux.js +104 -0
  71. package/build/esm/redux.js.map +1 -0
  72. package/build/esm/sdk.js +19 -0
  73. package/build/esm/sdk.js.map +1 -0
  74. package/build/esm/tanstackrouter.js +132 -0
  75. package/build/esm/tanstackrouter.js.map +1 -0
  76. package/build/types/constants.d.ts +4 -0
  77. package/build/types/constants.d.ts.map +1 -0
  78. package/build/types/debug-build.d.ts +7 -0
  79. package/build/types/debug-build.d.ts.map +1 -0
  80. package/build/types/error.d.ts +41 -0
  81. package/build/types/error.d.ts.map +1 -0
  82. package/build/types/errorboundary.d.ts +87 -0
  83. package/build/types/errorboundary.d.ts.map +1 -0
  84. package/build/types/hoist-non-react-statics.d.ts +21 -0
  85. package/build/types/hoist-non-react-statics.d.ts.map +1 -0
  86. package/build/types/index.d.ts +13 -0
  87. package/build/types/index.d.ts.map +1 -0
  88. package/build/types/profiler.d.ts +56 -0
  89. package/build/types/profiler.d.ts.map +1 -0
  90. package/build/types/reactrouter-compat-utils/index.d.ts +5 -0
  91. package/build/types/reactrouter-compat-utils/index.d.ts.map +1 -0
  92. package/build/types/reactrouter-compat-utils/instrumentation.d.ts +117 -0
  93. package/build/types/reactrouter-compat-utils/instrumentation.d.ts.map +1 -0
  94. package/build/types/reactrouter-compat-utils/lazy-routes.d.ts +18 -0
  95. package/build/types/reactrouter-compat-utils/lazy-routes.d.ts.map +1 -0
  96. package/build/types/reactrouter-compat-utils/route-manifest.d.ts +13 -0
  97. package/build/types/reactrouter-compat-utils/route-manifest.d.ts.map +1 -0
  98. package/build/types/reactrouter-compat-utils/utils.d.ts +71 -0
  99. package/build/types/reactrouter-compat-utils/utils.d.ts.map +1 -0
  100. package/build/types/reactrouter.d.ts +41 -0
  101. package/build/types/reactrouter.d.ts.map +1 -0
  102. package/build/types/reactrouterv3.d.ts +29 -0
  103. package/build/types/reactrouterv3.d.ts.map +1 -0
  104. package/build/types/reactrouterv6.d.ts +32 -0
  105. package/build/types/reactrouterv6.d.ts.map +1 -0
  106. package/build/types/reactrouterv7.d.ts +32 -0
  107. package/build/types/reactrouterv7.d.ts.map +1 -0
  108. package/build/types/redux.d.ts +38 -0
  109. package/build/types/redux.d.ts.map +1 -0
  110. package/build/types/sdk.d.ts +7 -0
  111. package/build/types/sdk.d.ts.map +1 -0
  112. package/build/types/tanstackrouter.d.ts +13 -0
  113. package/build/types/tanstackrouter.d.ts.map +1 -0
  114. package/build/types/types.d.ts +163 -0
  115. package/build/types/types.d.ts.map +1 -0
  116. package/build/types/vendor/tanstackrouter-types.d.ts +36 -0
  117. package/build/types/vendor/tanstackrouter-types.d.ts.map +1 -0
  118. package/build/types-ts3.8/constants.d.ts +4 -0
  119. package/build/types-ts3.8/debug-build.d.ts +7 -0
  120. package/build/types-ts3.8/error.d.ts +41 -0
  121. package/build/types-ts3.8/errorboundary.d.ts +87 -0
  122. package/build/types-ts3.8/hoist-non-react-statics.d.ts +21 -0
  123. package/build/types-ts3.8/index.d.ts +13 -0
  124. package/build/types-ts3.8/profiler.d.ts +56 -0
  125. package/build/types-ts3.8/reactrouter-compat-utils/index.d.ts +5 -0
  126. package/build/types-ts3.8/reactrouter-compat-utils/instrumentation.d.ts +117 -0
  127. package/build/types-ts3.8/reactrouter-compat-utils/lazy-routes.d.ts +18 -0
  128. package/build/types-ts3.8/reactrouter-compat-utils/route-manifest.d.ts +13 -0
  129. package/build/types-ts3.8/reactrouter-compat-utils/utils.d.ts +77 -0
  130. package/build/types-ts3.8/reactrouter.d.ts +41 -0
  131. package/build/types-ts3.8/reactrouterv3.d.ts +29 -0
  132. package/build/types-ts3.8/reactrouterv6.d.ts +32 -0
  133. package/build/types-ts3.8/reactrouterv7.d.ts +32 -0
  134. package/build/types-ts3.8/redux.d.ts +38 -0
  135. package/build/types-ts3.8/sdk.d.ts +7 -0
  136. package/build/types-ts3.8/tanstackrouter.d.ts +13 -0
  137. package/build/types-ts3.8/types.d.ts +163 -0
  138. package/build/types-ts3.8/vendor/tanstackrouter-types.d.ts +36 -0
  139. package/changes.json +5 -0
  140. package/package.json +108 -0
@@ -0,0 +1,18 @@
1
+ import { Span } from '@sentry/core';
2
+ import { Location, RouteObject } from '../types';
3
+ /**
4
+ * Creates a proxy wrapper for an async handler function.
5
+ * Captures both the location and the active span at invocation time to ensure
6
+ * the correct span is updated when the handler resolves.
7
+ */
8
+ export declare function createAsyncHandlerProxy(originalFunction: (...args: unknown[]) => unknown, route: RouteObject, handlerKey: string, processResolvedRoutes: (resolvedRoutes: RouteObject[], parentRoute?: RouteObject, currentLocation?: Location, capturedSpan?: Span) => void): (...args: unknown[]) => unknown;
9
+ /**
10
+ * Handles the result of an async handler function call.
11
+ * Passes the captured span through to ensure the correct span is updated.
12
+ */
13
+ export declare function handleAsyncHandlerResult(result: unknown, route: RouteObject, handlerKey: string, processResolvedRoutes: (resolvedRoutes: RouteObject[], parentRoute?: RouteObject, currentLocation?: Location, capturedSpan?: Span) => void, currentLocation: Location | null, capturedSpan: Span | undefined): void;
14
+ /**
15
+ * Recursively checks a route for async handlers and sets up Proxies to add discovered child routes to allRoutes when called.
16
+ */
17
+ export declare function checkRouteForAsyncHandler(route: RouteObject, processResolvedRoutes: (resolvedRoutes: RouteObject[], parentRoute?: RouteObject, currentLocation?: Location, capturedSpan?: Span) => void): void;
18
+ //# sourceMappingURL=lazy-routes.d.ts.map
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Strip the basename from a pathname if exists.
3
+ *
4
+ * Vendored and modified from `react-router`
5
+ * https://github.com/remix-run/react-router/blob/462bb712156a3f739d6139a0f14810b76b002df6/packages/router/utils.ts#L1038
6
+ */
7
+ export declare function stripBasenameFromPathname(pathname: string, basename: string): string;
8
+ /**
9
+ * Matches a pathname against a route manifest and returns the matching pattern.
10
+ * Optionally strips a basename prefix before matching.
11
+ */
12
+ export declare function matchRouteManifest(pathname: string, manifest: string[], basename?: string): string | null;
13
+ //# sourceMappingURL=route-manifest.d.ts.map
@@ -0,0 +1,77 @@
1
+ import { Span, TransactionSource } from '@sentry/core';
2
+ import { Location, MatchRoutes, RouteMatch, RouteObject } from '../types';
3
+ interface NavigationContext {
4
+ token: object;
5
+ targetPath: string | undefined;
6
+ span: Span | undefined;
7
+ }
8
+ /**
9
+ * Pushes a navigation context and returns a unique token for cleanup.
10
+ * The token uses object identity for uniqueness (no counter needed).
11
+ */
12
+ export declare function setNavigationContext(targetPath: string | undefined, span: Span | undefined): object;
13
+ /**
14
+ * Clears the navigation context if it's on top of the stack (LIFO).
15
+ * If our context is not on top (out-of-order completion), we leave it -
16
+ * it will be cleaned up by overflow protection when the stack fills up.
17
+ */
18
+ export declare function clearNavigationContext(token: object): void;
19
+ /** Gets the current (most recent) navigation context if inside a patchRoutesOnNavigation call. */
20
+ export declare function getNavigationContext(): NavigationContext | null;
21
+ /**
22
+ * Initialize function to set dependencies that the router utilities need.
23
+ * Must be called before using any of the exported utility functions.
24
+ */
25
+ export declare function initializeRouterUtils(matchRoutes: MatchRoutes, stripBasename?: boolean): void;
26
+ /**
27
+ * Checks if a path ends with a wildcard character (*).
28
+ */
29
+ export declare function pathEndsWithWildcard(path: string): boolean;
30
+ /** Checks if transaction name has wildcard (/* or ends with *). */
31
+ export declare function transactionNameHasWildcard(name: string): boolean;
32
+ /**
33
+ * Checks if a path is a wildcard and has child routes.
34
+ */
35
+ export declare function pathIsWildcardAndHasChildren(path: string, branch: RouteMatch<string>): boolean;
36
+ /** Check if route is in descendant route (<Routes> within <Routes>) */
37
+ export declare function routeIsDescendant(route: RouteObject): boolean;
38
+ /**
39
+ * Returns the number of URL segments in the given URL string.
40
+ * Splits at '/' or '\/' to handle regex URLs correctly.
41
+ *
42
+ * @param url - The URL string to segment.
43
+ * @returns The number of segments in the URL.
44
+ */
45
+ export declare function getNumberOfUrlSegments(url: string): number;
46
+ /**
47
+ * Ensures a path string starts with a forward slash.
48
+ */
49
+ export declare function prefixWithSlash(path: string): string;
50
+ /**
51
+ * Rebuilds the route path from all available routes by matching against the current location.
52
+ */
53
+ export declare function rebuildRoutePathFromAllRoutes(allRoutes: RouteObject[], location: Location): string;
54
+ /**
55
+ * Checks if the current location is inside a descendant route (route with splat parameter).
56
+ */
57
+ export declare function locationIsInsideDescendantRoute(location: Location, routes: RouteObject[]): boolean;
58
+ /**
59
+ * Gets a normalized route name and transaction source from the current routes and location.
60
+ */
61
+ export declare function getNormalizedName(routes: RouteObject[], location: Location, branches: RouteMatch[], basename?: string): [
62
+ string,
63
+ TransactionSource
64
+ ];
65
+ /**
66
+ * Shared helper function to resolve route name and source
67
+ */
68
+ export declare function resolveRouteNameAndSource(location: Location, routes: RouteObject[], allRoutes: RouteObject[], branches: RouteMatch[], basename?: string, lazyRouteManifest?: string[], enableAsyncRouteHandlers?: boolean): [
69
+ string,
70
+ TransactionSource
71
+ ];
72
+ /**
73
+ * Gets the active root span if it's a pageload or navigation span.
74
+ */
75
+ export declare function getActiveRootSpan(): Span | undefined;
76
+ export {};
77
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1,41 @@
1
+ import { browserTracingIntegration } from '@sentry/browser';
2
+ import { Integration } from '@sentry/core';
3
+ import { ReactElement } from 'react';
4
+ import * as React from 'react';
5
+ import { Action, Location } from './types';
6
+ type Match = {
7
+ path: string;
8
+ url: string;
9
+ params: Record<string, any>;
10
+ isExact: boolean;
11
+ };
12
+ export type RouterHistory = {
13
+ location?: Location;
14
+ listen?(cb: (location: Location, action: Action) => void): void;
15
+ } & Record<string, any>;
16
+ export type RouteConfig = {
17
+ [propName: string]: unknown;
18
+ path?: string | string[];
19
+ exact?: boolean;
20
+ component?: ReactElement;
21
+ routes?: RouteConfig[];
22
+ };
23
+ export type MatchPath = (pathname: string, props: string | string[] | any, parent?: Match | null) => Match | null;
24
+ interface ReactRouterOptions {
25
+ history: RouterHistory;
26
+ routes?: RouteConfig[];
27
+ matchPath?: MatchPath;
28
+ }
29
+ /**
30
+ * A browser tracing integration that uses React Router v4 to instrument navigations.
31
+ * Expects `history` (and optionally `routes` and `matchPath`) to be passed as options.
32
+ */
33
+ export declare function reactRouterV4BrowserTracingIntegration(options: Parameters<typeof browserTracingIntegration>[0] & ReactRouterOptions): Integration;
34
+ /**
35
+ * A browser tracing integration that uses React Router v5 to instrument navigations.
36
+ * Expects `history` (and optionally `routes` and `matchPath`) to be passed as options.
37
+ */
38
+ export declare function reactRouterV5BrowserTracingIntegration(options: Parameters<typeof browserTracingIntegration>[0] & ReactRouterOptions): Integration;
39
+ export declare function withSentryRouting<P extends Record<string, any>, R extends React.ComponentType<P>>(Route: R): R;
40
+ export {};
41
+ //# sourceMappingURL=reactrouter.d.ts.map
@@ -0,0 +1,29 @@
1
+ import { browserTracingIntegration } from '@sentry/browser';
2
+ import { Integration } from '@sentry/core';
3
+ import { Location } from './types';
4
+ type HistoryV3 = {
5
+ location?: Location;
6
+ listen?(cb: (location: Location) => void): void;
7
+ } & Record<string, any>;
8
+ export type Route = {
9
+ path?: string;
10
+ childRoutes?: Route[];
11
+ };
12
+ export type Match = (props: {
13
+ location: Location;
14
+ routes: Route[];
15
+ }, cb: (error?: Error, _redirectLocation?: Location, renderProps?: {
16
+ routes?: Route[];
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;
28
+ export {};
29
+ //# sourceMappingURL=reactrouterv3.d.ts.map
@@ -0,0 +1,32 @@
1
+ import { browserTracingIntegration } from '@sentry/browser';
2
+ import { Integration } from '@sentry/core';
3
+ import { ReactRouterOptions } from './reactrouter-compat-utils';
4
+ import { CreateRouterFunction, Router, RouterState, UseRoutes } from './types';
5
+ /**
6
+ * A browser tracing integration that uses React Router v6 to instrument navigations.
7
+ * Expects `useEffect`, `useLocation`, `useNavigationType`, `createRoutesFromChildren` and `matchRoutes` to be passed as options.
8
+ */
9
+ export declare function reactRouterV6BrowserTracingIntegration(options: Parameters<typeof browserTracingIntegration>[0] & ReactRouterOptions): Integration;
10
+ /**
11
+ * A wrapper function that adds Sentry routing instrumentation to a React Router v6 useRoutes hook.
12
+ * This is used to automatically capture route changes as transactions when using the useRoutes hook.
13
+ */
14
+ export declare function wrapUseRoutesV6(origUseRoutes: UseRoutes): UseRoutes;
15
+ /**
16
+ * A wrapper function that adds Sentry routing instrumentation to a React Router v6 createBrowserRouter function.
17
+ * This is used to automatically capture route changes as transactions when using the createBrowserRouter API.
18
+ */
19
+ export declare function wrapCreateBrowserRouterV6<TState extends RouterState = RouterState, TRouter extends Router<TState> = Router<TState>>(createRouterFunction: CreateRouterFunction<TState, TRouter>): CreateRouterFunction<TState, TRouter>;
20
+ /**
21
+ * A wrapper function that adds Sentry routing instrumentation to a React Router v6 createMemoryRouter function.
22
+ * This is used to automatically capture route changes as transactions when using the createMemoryRouter API.
23
+ * The difference between createBrowserRouter and createMemoryRouter is that with createMemoryRouter,
24
+ * optional `initialEntries` are also taken into account.
25
+ */
26
+ export declare function wrapCreateMemoryRouterV6<TState extends RouterState = RouterState, TRouter extends Router<TState> = Router<TState>>(createMemoryRouterFunction: CreateRouterFunction<TState, TRouter>): CreateRouterFunction<TState, TRouter>;
27
+ /**
28
+ * A higher-order component that adds Sentry routing instrumentation to a React Router v6 Route component.
29
+ * This is used to automatically capture route changes as transactions.
30
+ */
31
+ export declare function withSentryReactRouterV6Routing<P extends Record<string, any>, R extends React.FC<P>>(routes: R): R;
32
+ //# sourceMappingURL=reactrouterv6.d.ts.map
@@ -0,0 +1,32 @@
1
+ import { browserTracingIntegration } from '@sentry/browser';
2
+ import { Integration } from '@sentry/core';
3
+ import { ReactRouterOptions } from './reactrouter-compat-utils';
4
+ import { CreateRouterFunction, Router, RouterState, UseRoutes } from './types';
5
+ /**
6
+ * A browser tracing integration that uses React Router v7 to instrument navigations.
7
+ * Expects `useEffect`, `useLocation`, `useNavigationType`, `createRoutesFromChildren` and `matchRoutes` to be passed as options.
8
+ */
9
+ export declare function reactRouterV7BrowserTracingIntegration(options: Parameters<typeof browserTracingIntegration>[0] & ReactRouterOptions): Integration;
10
+ /**
11
+ * A higher-order component that adds Sentry routing instrumentation to a React Router v7 Route component.
12
+ * This is used to automatically capture route changes as transactions.
13
+ */
14
+ export declare function withSentryReactRouterV7Routing<P extends Record<string, any>, R extends React.FC<P>>(routes: R): R;
15
+ /**
16
+ * A wrapper function that adds Sentry routing instrumentation to a React Router v7 createBrowserRouter function.
17
+ * This is used to automatically capture route changes as transactions when using the createBrowserRouter API.
18
+ */
19
+ export declare function wrapCreateBrowserRouterV7<TState extends RouterState = RouterState, TRouter extends Router<TState> = Router<TState>>(createRouterFunction: CreateRouterFunction<TState, TRouter>): CreateRouterFunction<TState, TRouter>;
20
+ /**
21
+ * A wrapper function that adds Sentry routing instrumentation to a React Router v7 createMemoryRouter function.
22
+ * This is used to automatically capture route changes as transactions when using the createMemoryRouter API.
23
+ * The difference between createBrowserRouter and createMemoryRouter is that with createMemoryRouter,
24
+ * optional `initialEntries` are also taken into account.
25
+ */
26
+ export declare function wrapCreateMemoryRouterV7<TState extends RouterState = RouterState, TRouter extends Router<TState> = Router<TState>>(createMemoryRouterFunction: CreateRouterFunction<TState, TRouter>): CreateRouterFunction<TState, TRouter>;
27
+ /**
28
+ * A wrapper function that adds Sentry routing instrumentation to a React Router v7 useRoutes hook.
29
+ * This is used to automatically capture route changes as transactions when using the useRoutes hook.
30
+ */
31
+ export declare function wrapUseRoutesV7(origUseRoutes: UseRoutes): UseRoutes;
32
+ //# sourceMappingURL=reactrouterv7.d.ts.map
@@ -0,0 +1,38 @@
1
+ import { Scope } from '@sentry/core';
2
+ interface Action<T = any> {
3
+ type: T;
4
+ }
5
+ interface AnyAction extends Action {
6
+ [extraProps: string]: any;
7
+ }
8
+ export interface SentryEnhancerOptions<S = any> {
9
+ /**
10
+ * Redux state in attachments or not.
11
+ * @default true
12
+ */
13
+ attachReduxState?: boolean;
14
+ /**
15
+ * Transforms the state before attaching it to an event.
16
+ * Use this to remove any private data before sending it to Sentry.
17
+ * Return null to not attach the state.
18
+ */
19
+ stateTransformer(state: S | undefined): (S & any) | null;
20
+ /**
21
+ * Transforms the action before sending it as a breadcrumb.
22
+ * Use this to remove any private data before sending it to Sentry.
23
+ * Return null to not send the breadcrumb.
24
+ */
25
+ actionTransformer(action: AnyAction): AnyAction | null;
26
+ /**
27
+ * Called on every state update, configure the Sentry Scope with the redux state.
28
+ */
29
+ configureScopeWithState?(scope: Scope, state: S): void;
30
+ }
31
+ /**
32
+ * Creates an enhancer that would be passed to Redux's createStore to log actions and the latest state to Sentry.
33
+ *
34
+ * @param enhancerOptions Options to pass to the enhancer
35
+ */
36
+ declare function createReduxEnhancer(enhancerOptions?: Partial<SentryEnhancerOptions>): any;
37
+ export { createReduxEnhancer };
38
+ //# sourceMappingURL=redux.d.ts.map
@@ -0,0 +1,7 @@
1
+ import { BrowserOptions } from '@sentry/browser';
2
+ import { Client } from '@sentry/core';
3
+ /**
4
+ * Inits the React SDK
5
+ */
6
+ export declare function init(options: BrowserOptions): Client | undefined;
7
+ //# sourceMappingURL=sdk.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { browserTracingIntegration as originalBrowserTracingIntegration } from '@sentry/browser';
2
+ import { Integration } from '@sentry/core';
3
+ /**
4
+ * A custom browser tracing integration for TanStack Router.
5
+ *
6
+ * The minimum compatible version of `@tanstack/react-router` is `1.64.0`.
7
+ *
8
+ * @param router A TanStack Router `Router` instance that should be used for routing instrumentation.
9
+ * @param options Sentry browser tracing configuration.
10
+ */
11
+ export declare function tanstackRouterBrowserTracingIntegration(router: any, // This is `any` because we don't want any type mismatches if TanStack Router changes their types
12
+ options?: Parameters<typeof originalBrowserTracingIntegration>[0]): Integration;
13
+ //# sourceMappingURL=tanstackrouter.d.ts.map
@@ -0,0 +1,163 @@
1
+ import { ReactElement } from 'react';
2
+ export type Action = 'PUSH' | 'REPLACE' | 'POP';
3
+ export type Location = {
4
+ pathname: string;
5
+ action?: Action;
6
+ } & Record<string, any>;
7
+ export interface NonIndexRouteObject {
8
+ caseSensitive?: boolean;
9
+ children?: RouteObject[];
10
+ handle?: Record<string, any>;
11
+ element?: React.ReactNode | null;
12
+ errorElement?: React.ReactNode | null;
13
+ index?: any;
14
+ path?: string;
15
+ }
16
+ export interface IndexRouteObject {
17
+ caseSensitive?: boolean;
18
+ children?: undefined;
19
+ handle?: Record<string, any>;
20
+ element?: React.ReactNode | null;
21
+ errorElement?: React.ReactNode | null;
22
+ index: any;
23
+ path?: string;
24
+ }
25
+ export type RouteObject = (IndexRouteObject | NonIndexRouteObject) & Record<string, any>;
26
+ export type Params<Key extends string = string> = {
27
+ readonly [key in Key]: string | undefined;
28
+ };
29
+ export type UseRoutes = (routes: RouteObject[], locationArg?: Partial<Location> | string) => React.ReactElement | null;
30
+ export interface RouteMatch<ParamKey extends string = string> {
31
+ /**
32
+ * The names and values of dynamic parameters in the URL.
33
+ */
34
+ params: Params<ParamKey>;
35
+ /**
36
+ * The portion of the URL pathname that was matched.
37
+ */
38
+ pathname: string;
39
+ /**
40
+ * The portion of the URL pathname that was matched before child routes.
41
+ */
42
+ pathnameBase: string;
43
+ /**
44
+ * The route object that was used to match.
45
+ */
46
+ route: RouteObject;
47
+ }
48
+ export type UseEffect = (cb: () => void, deps: unknown[]) => void;
49
+ export type UseLocation = () => Location;
50
+ export type UseNavigationType = () => Action;
51
+ export type RouteObjectArrayAlias = any;
52
+ export type RouteMatchAlias = any;
53
+ export type CreateRoutesFromChildren = (children: ReactElement[]) => RouteObjectArrayAlias;
54
+ export type MatchRoutes = (routes: RouteObjectArrayAlias, location: Location, basename?: string) => RouteMatchAlias[] | null;
55
+ export type ShouldRevalidateFunction = (args: any) => boolean;
56
+ interface DataFunctionArgs {
57
+ request: Request;
58
+ params: Params;
59
+ }
60
+ type LoaderFunctionArgs = DataFunctionArgs;
61
+ type ActionFunctionArgs = DataFunctionArgs;
62
+ export interface LoaderFunction {
63
+ (args: LoaderFunctionArgs): Promise<Response> | Response | Promise<any> | any;
64
+ }
65
+ export interface ActionFunction {
66
+ (args: ActionFunctionArgs): Promise<Response> | Response | Promise<any> | any;
67
+ }
68
+ declare type AgnosticBaseRouteObject = {
69
+ caseSensitive?: boolean;
70
+ path?: string;
71
+ id?: string;
72
+ loader?: LoaderFunction;
73
+ action?: ActionFunction;
74
+ hasErrorBoundary?: boolean;
75
+ shouldRevalidate?: ShouldRevalidateFunction;
76
+ handle?: any;
77
+ };
78
+ export declare type AgnosticIndexRouteObject = AgnosticBaseRouteObject & Record<string, any>;
79
+ export declare type AgnosticNonIndexRouteObject = AgnosticBaseRouteObject & Record<string, any>;
80
+ export declare type AgnosticDataIndexRouteObject = AgnosticIndexRouteObject & {
81
+ id: string;
82
+ };
83
+ export declare type AgnosticDataNonIndexRouteObject = AgnosticNonIndexRouteObject & {
84
+ children?: AgnosticDataRouteObject[];
85
+ id: string;
86
+ };
87
+ export interface AgnosticRouteMatch<ParamKey extends string = string, RouteObjectType extends AgnosticRouteObject = AgnosticRouteObject> {
88
+ params: Params<ParamKey>;
89
+ pathname: string;
90
+ pathnameBase: string;
91
+ route: RouteObjectType;
92
+ }
93
+ export type AgnosticDataRouteMatch = AgnosticRouteMatch<string, AgnosticDataRouteObject>;
94
+ interface UseMatchesMatch {
95
+ id: string;
96
+ pathname: string;
97
+ params: AgnosticRouteMatch['params'];
98
+ data: unknown;
99
+ handle: unknown;
100
+ }
101
+ export interface GetScrollRestorationKeyFunction {
102
+ (location: Location, matches: UseMatchesMatch[]): string | null;
103
+ }
104
+ export interface Path {
105
+ pathname: string;
106
+ search: string;
107
+ hash: string;
108
+ }
109
+ export interface RouterSubscriber<TState extends RouterState = RouterState> {
110
+ (state: TState): void;
111
+ }
112
+ export interface GetScrollPositionFunction {
113
+ (): number;
114
+ }
115
+ declare type LinkNavigateOptions = {
116
+ replace?: boolean;
117
+ state?: any;
118
+ preventScrollReset?: boolean;
119
+ };
120
+ export declare type AgnosticDataRouteObject = AgnosticDataIndexRouteObject | AgnosticDataNonIndexRouteObject;
121
+ export declare type To = string | Partial<Path>;
122
+ export declare type HydrationState = any;
123
+ export declare type FormMethod = 'get' | 'post' | 'put' | 'patch' | 'delete';
124
+ export declare type FormEncType = 'application/x-www-form-urlencoded' | 'multipart/form-data';
125
+ export declare type RouterNavigateOptions = LinkNavigateOptions | SubmissionNavigateOptions;
126
+ export declare type AgnosticRouteObject = AgnosticIndexRouteObject | AgnosticNonIndexRouteObject;
127
+ declare type SubmissionNavigateOptions = {
128
+ replace?: boolean;
129
+ state?: any;
130
+ formMethod?: FormMethod;
131
+ formEncType?: FormEncType;
132
+ formData: FormData;
133
+ };
134
+ export interface RouterInit {
135
+ basename: string;
136
+ routes: AgnosticRouteObject[];
137
+ history: History;
138
+ hydrationData?: HydrationState;
139
+ }
140
+ export type NavigationState = {
141
+ state: 'idle' | 'loading' | 'submitting';
142
+ };
143
+ export type NavigationStates = {
144
+ Idle: NavigationState;
145
+ Loading: NavigationState;
146
+ Submitting: NavigationState;
147
+ };
148
+ export type Navigation = NavigationStates[keyof NavigationStates];
149
+ export type RouteData = any;
150
+ export type Fetcher = any;
151
+ type HistoryAction = 'POP' | 'PUSH' | 'REPLACE';
152
+ export interface RouterState {
153
+ historyAction: Action | HistoryAction | any;
154
+ location: Location;
155
+ navigation: Navigation;
156
+ }
157
+ export interface Router<TState extends RouterState = RouterState> {
158
+ state: TState;
159
+ subscribe(fn: RouterSubscriber<TState>): () => void;
160
+ }
161
+ export type CreateRouterFunction<TState extends RouterState = RouterState, TRouter extends Router<TState> = Router<TState>> = (routes: RouteObject[], opts?: any) => TRouter;
162
+ export {};
163
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,36 @@
1
+ export interface VendoredTanstackRouter {
2
+ history: VendoredTanstackRouterHistory;
3
+ state: VendoredTanstackRouterState;
4
+ options: {
5
+ parseSearch: (search: string) => Record<string, any>;
6
+ };
7
+ matchRoutes: (pathname: string, locationSearch: {}, opts?: {
8
+ preload?: boolean;
9
+ throwOnError?: boolean;
10
+ }) => Array<VendoredTanstackRouterRouteMatch>;
11
+ subscribe(eventType: 'onResolved' | 'onBeforeNavigate', callback: (stateUpdate: {
12
+ toLocation: VendoredTanstackRouterLocation;
13
+ fromLocation?: VendoredTanstackRouterLocation;
14
+ }) => void): () => void;
15
+ }
16
+ interface VendoredTanstackRouterLocation {
17
+ pathname: string;
18
+ search: {};
19
+ state: string;
20
+ }
21
+ interface VendoredTanstackRouterHistory {
22
+ subscribe: (cb: () => void) => () => void;
23
+ }
24
+ interface VendoredTanstackRouterState {
25
+ matches: Array<VendoredTanstackRouterRouteMatch>;
26
+ pendingMatches?: Array<VendoredTanstackRouterRouteMatch>;
27
+ }
28
+ export interface VendoredTanstackRouterRouteMatch {
29
+ routeId: string;
30
+ pathname: string;
31
+ params: {
32
+ [key: string]: string;
33
+ };
34
+ }
35
+ export {};
36
+ //# sourceMappingURL=tanstackrouter-types.d.ts.map
package/changes.json ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "bumped": {},
3
+ "timestamp": "2026-03-18T22:43:01.590Z",
4
+ "totalUpdated": 0
5
+ }
package/package.json ADDED
@@ -0,0 +1,108 @@
1
+ {
2
+ "name": "@depup/sentry__react",
3
+ "version": "10.44.0-depup.0",
4
+ "description": "Official Sentry SDK for React.js (with updated dependencies)",
5
+ "repository": "git://github.com/getsentry/sentry-javascript.git",
6
+ "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/react",
7
+ "author": "Sentry",
8
+ "license": "MIT",
9
+ "engines": {
10
+ "node": ">=18"
11
+ },
12
+ "files": [
13
+ "/build",
14
+ "changes.json",
15
+ "README.md"
16
+ ],
17
+ "main": "build/cjs/index.js",
18
+ "module": "build/esm/index.js",
19
+ "types": "build/types/index.d.ts",
20
+ "exports": {
21
+ "./package.json": "./package.json",
22
+ ".": {
23
+ "import": {
24
+ "types": "./build/types/index.d.ts",
25
+ "default": "./build/esm/index.js"
26
+ },
27
+ "require": {
28
+ "types": "./build/types/index.d.ts",
29
+ "default": "./build/cjs/index.js"
30
+ }
31
+ }
32
+ },
33
+ "typesVersions": {
34
+ "<5.0": {
35
+ "build/types/index.d.ts": [
36
+ "build/types-ts3.8/index.d.ts"
37
+ ]
38
+ }
39
+ },
40
+ "dependencies": {
41
+ "@sentry/browser": "10.44.0",
42
+ "@sentry/core": "10.44.0"
43
+ },
44
+ "peerDependencies": {
45
+ "react": "^16.14.0 || 17.x || 18.x || 19.x"
46
+ },
47
+ "devDependencies": {
48
+ "@testing-library/react": "^15.0.5",
49
+ "@testing-library/react-hooks": "^7.0.2",
50
+ "@types/history-4": "npm:@types/history@4.7.8",
51
+ "@types/history-5": "npm:@types/history@4.7.8",
52
+ "@types/node-fetch": "^2.6.11",
53
+ "@types/react": "17.0.3",
54
+ "@types/react-router-4": "npm:@types/react-router@4.0.25",
55
+ "@types/react-router-5": "npm:@types/react-router@5.1.20",
56
+ "eslint-plugin-react": "^7.20.5",
57
+ "eslint-plugin-react-hooks": "^4.6.0",
58
+ "history-4": "npm:history@4.6.0",
59
+ "history-5": "npm:history@4.9.0",
60
+ "react": "^18.3.1",
61
+ "react-dom": "^18.3.1",
62
+ "react-router-3": "npm:react-router@3.2.0",
63
+ "react-router-4": "npm:react-router@4.1.0",
64
+ "react-router-5": "npm:react-router@5.3.4",
65
+ "react-router-6": "npm:react-router@6.30.3",
66
+ "redux": "^4.0.5"
67
+ },
68
+ "scripts": {
69
+ "build": "run-p build:transpile build:types",
70
+ "build:dev": "yarn build",
71
+ "build:transpile": "rollup -c rollup.npm.config.mjs",
72
+ "build:types": "run-s build:types:core build:types:downlevel",
73
+ "build:types:core": "tsc -p tsconfig.types.json",
74
+ "build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8",
75
+ "build:watch": "run-p build:transpile:watch",
76
+ "build:dev:watch": "yarn build:watch",
77
+ "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch",
78
+ "build:tarball": "npm pack",
79
+ "circularDepCheck": "madge --circular src/index.ts",
80
+ "clean": "rimraf build coverage sentry-react-*.tgz",
81
+ "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware",
82
+ "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware",
83
+ "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module",
84
+ "test": "vitest run",
85
+ "test:watch": "vitest --watch",
86
+ "yalc:publish": "yalc publish --push --sig"
87
+ },
88
+ "volta": {
89
+ "extends": "../../package.json"
90
+ },
91
+ "sideEffects": false,
92
+ "keywords": [
93
+ "@sentry/react",
94
+ "depup",
95
+ "updated-dependencies",
96
+ "security",
97
+ "latest",
98
+ "patched"
99
+ ],
100
+ "depup": {
101
+ "changes": {},
102
+ "depsUpdated": 0,
103
+ "originalPackage": "@sentry/react",
104
+ "originalVersion": "10.44.0",
105
+ "processedAt": "2026-03-18T22:43:10.239Z",
106
+ "smokeTest": "failed"
107
+ }
108
+ }