@sentry/react 10.70.0 → 11.0.0-alpha.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.
Files changed (71) hide show
  1. package/build/cjs/error.js +1 -7
  2. package/build/cjs/error.js.map +1 -1
  3. package/build/cjs/hoist-non-react-statics.js +1 -7
  4. package/build/cjs/hoist-non-react-statics.js.map +1 -1
  5. package/build/cjs/profiler.js +12 -8
  6. package/build/cjs/profiler.js.map +1 -1
  7. package/build/cjs/reactrouter-compat-utils/instrumentation.js +24 -41
  8. package/build/cjs/reactrouter-compat-utils/instrumentation.js.map +1 -1
  9. package/build/cjs/reactrouter-compat-utils/utils.js +2 -1
  10. package/build/cjs/reactrouter-compat-utils/utils.js.map +1 -1
  11. package/build/cjs/reactrouter.js +5 -2
  12. package/build/cjs/reactrouter.js.map +1 -1
  13. package/build/cjs/reactrouterv3.js.map +1 -1
  14. package/build/cjs/tanstackrouter.js +2 -1
  15. package/build/cjs/tanstackrouter.js.map +1 -1
  16. package/build/esm/error.js +2 -7
  17. package/build/esm/error.js.map +1 -1
  18. package/build/esm/hoist-non-react-statics.js +1 -7
  19. package/build/esm/hoist-non-react-statics.js.map +1 -1
  20. package/build/esm/package.json +1 -1
  21. package/build/esm/profiler.js +12 -8
  22. package/build/esm/profiler.js.map +1 -1
  23. package/build/esm/reactrouter-compat-utils/instrumentation.js +25 -42
  24. package/build/esm/reactrouter-compat-utils/instrumentation.js.map +1 -1
  25. package/build/esm/reactrouter-compat-utils/utils.js +2 -1
  26. package/build/esm/reactrouter-compat-utils/utils.js.map +1 -1
  27. package/build/esm/reactrouter.js +5 -2
  28. package/build/esm/reactrouter.js.map +1 -1
  29. package/build/esm/reactrouterv3.js.map +1 -1
  30. package/build/esm/tanstackrouter.js +2 -1
  31. package/build/esm/tanstackrouter.js.map +1 -1
  32. package/build/types/error.d.ts +0 -4
  33. package/build/types/error.d.ts.map +1 -1
  34. package/build/types/errorboundary.d.ts.map +1 -1
  35. package/build/types/hoist-non-react-statics.d.ts.map +1 -1
  36. package/build/types/profiler.d.ts +0 -1
  37. package/build/types/profiler.d.ts.map +1 -1
  38. package/build/types/reactrouter-compat-utils/instrumentation.d.ts.map +1 -1
  39. package/build/types/reactrouter-compat-utils/utils.d.ts.map +1 -1
  40. package/build/types/reactrouter.d.ts.map +1 -1
  41. package/build/types/tanstackrouter.d.ts.map +1 -1
  42. package/package.json +9 -20
  43. package/build/cjs/constants.js +0 -10
  44. package/build/cjs/constants.js.map +0 -1
  45. package/build/esm/constants.js +0 -6
  46. package/build/esm/constants.js.map +0 -1
  47. package/build/types/constants.d.ts +0 -4
  48. package/build/types/constants.d.ts.map +0 -1
  49. package/build/types-ts3.8/constants.d.ts +0 -4
  50. package/build/types-ts3.8/debug-build.d.ts +0 -7
  51. package/build/types-ts3.8/error.d.ts +0 -41
  52. package/build/types-ts3.8/errorboundary.d.ts +0 -87
  53. package/build/types-ts3.8/hoist-non-react-statics.d.ts +0 -21
  54. package/build/types-ts3.8/index.d.ts +0 -14
  55. package/build/types-ts3.8/isSyntheticEvent.d.ts +0 -10
  56. package/build/types-ts3.8/profiler.d.ts +0 -56
  57. package/build/types-ts3.8/reactrouter-compat-utils/index.d.ts +0 -5
  58. package/build/types-ts3.8/reactrouter-compat-utils/instrumentation.d.ts +0 -117
  59. package/build/types-ts3.8/reactrouter-compat-utils/lazy-routes.d.ts +0 -18
  60. package/build/types-ts3.8/reactrouter-compat-utils/route-manifest.d.ts +0 -13
  61. package/build/types-ts3.8/reactrouter-compat-utils/utils.d.ts +0 -77
  62. package/build/types-ts3.8/reactrouter.compat.d.ts +0 -42
  63. package/build/types-ts3.8/reactrouter.d.ts +0 -41
  64. package/build/types-ts3.8/reactrouterv3.d.ts +0 -29
  65. package/build/types-ts3.8/reactrouterv6.d.ts +0 -42
  66. package/build/types-ts3.8/reactrouterv7.d.ts +0 -42
  67. package/build/types-ts3.8/redux.d.ts +0 -38
  68. package/build/types-ts3.8/sdk.d.ts +0 -7
  69. package/build/types-ts3.8/tanstackrouter.d.ts +0 -13
  70. package/build/types-ts3.8/types.d.ts +0 -163
  71. package/build/types-ts3.8/vendor/tanstackrouter-types.d.ts +0 -37
@@ -1,38 +0,0 @@
1
- import { Scope } from '@sentry/core/browser';
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
@@ -1,7 +0,0 @@
1
- import { BrowserOptions } from '@sentry/browser';
2
- import { Client } from '@sentry/core/browser';
3
- /**
4
- * Inits the React SDK
5
- */
6
- export declare function init(options: BrowserOptions): Client | undefined;
7
- //# sourceMappingURL=sdk.d.ts.map
@@ -1,13 +0,0 @@
1
- import { browserTracingIntegration as originalBrowserTracingIntegration } from '@sentry/browser';
2
- import { Integration } from '@sentry/core/browser';
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
@@ -1,163 +0,0 @@
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
@@ -1,37 +0,0 @@
1
- export interface VendoredTanstackRouter {
2
- history: VendoredTanstackRouterHistory;
3
- state: VendoredTanstackRouterState;
4
- options: {
5
- parseSearch: (search: string) => Record<string, any>;
6
- stringifySearch?: (search: Record<string, unknown>) => string;
7
- };
8
- matchRoutes: (pathname: string, locationSearch: {}, opts?: {
9
- preload?: boolean;
10
- throwOnError?: boolean;
11
- }) => Array<VendoredTanstackRouterRouteMatch>;
12
- subscribe(eventType: 'onResolved' | 'onBeforeNavigate' | 'onBeforeLoad', callback: (stateUpdate: {
13
- toLocation: VendoredTanstackRouterLocation;
14
- fromLocation?: VendoredTanstackRouterLocation;
15
- }) => void): () => void;
16
- }
17
- interface VendoredTanstackRouterLocation {
18
- pathname: string;
19
- search: {};
20
- state: string;
21
- }
22
- interface VendoredTanstackRouterHistory {
23
- subscribe: (cb: () => void) => () => void;
24
- }
25
- interface VendoredTanstackRouterState {
26
- matches: Array<VendoredTanstackRouterRouteMatch>;
27
- pendingMatches?: Array<VendoredTanstackRouterRouteMatch>;
28
- }
29
- export interface VendoredTanstackRouterRouteMatch {
30
- routeId: string;
31
- pathname: string;
32
- params: {
33
- [key: string]: string;
34
- };
35
- }
36
- export {};
37
- //# sourceMappingURL=tanstackrouter-types.d.ts.map