@sentry/react 7.0.0-beta.0 → 7.0.0-rc.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 (90) hide show
  1. package/README.md +2 -3
  2. package/cjs/constants.js +12 -5
  3. package/cjs/constants.js.map +1 -1
  4. package/cjs/errorboundary.js +134 -102
  5. package/cjs/errorboundary.js.map +1 -1
  6. package/cjs/flags.js +7 -3
  7. package/cjs/flags.js.map +1 -1
  8. package/cjs/index.js +30 -21
  9. package/cjs/index.js.map +1 -1
  10. package/cjs/profiler.js +172 -134
  11. package/cjs/profiler.js.map +1 -1
  12. package/cjs/reactrouter.js +145 -94
  13. package/cjs/reactrouter.js.map +1 -1
  14. package/cjs/reactrouterv3.js +107 -75
  15. package/cjs/reactrouterv3.js.map +1 -1
  16. package/cjs/reactrouterv6.js +163 -0
  17. package/cjs/reactrouterv6.js.map +1 -0
  18. package/cjs/redux.js +54 -42
  19. package/cjs/redux.js.map +1 -1
  20. package/cjs/sdk.js +18 -15
  21. package/cjs/sdk.js.map +1 -1
  22. package/esm/constants.js +8 -4
  23. package/esm/constants.js.map +1 -1
  24. package/esm/errorboundary.js +120 -97
  25. package/esm/errorboundary.js.map +1 -1
  26. package/esm/flags.js +5 -2
  27. package/esm/flags.js.map +1 -1
  28. package/esm/index.js +8 -7
  29. package/esm/index.js.map +1 -1
  30. package/esm/profiler.js +154 -125
  31. package/esm/profiler.js.map +1 -1
  32. package/esm/reactrouter.js +132 -88
  33. package/esm/reactrouter.js.map +1 -1
  34. package/esm/reactrouterv3.js +104 -72
  35. package/esm/reactrouterv3.js.map +1 -1
  36. package/esm/reactrouterv6.js +153 -0
  37. package/esm/reactrouterv6.js.map +1 -0
  38. package/esm/redux.js +51 -40
  39. package/esm/redux.js.map +1 -1
  40. package/esm/sdk.js +17 -14
  41. package/esm/sdk.js.map +1 -1
  42. package/package.json +5 -4
  43. package/types/index.d.ts +1 -0
  44. package/types/index.d.ts.map +1 -1
  45. package/types/reactrouterv6.d.ts +27 -0
  46. package/types/reactrouterv6.d.ts.map +1 -0
  47. package/cjs/constants.d.ts +0 -4
  48. package/cjs/constants.d.ts.map +0 -1
  49. package/cjs/errorboundary.d.ts +0 -63
  50. package/cjs/errorboundary.d.ts.map +0 -1
  51. package/cjs/flags.d.ts +0 -3
  52. package/cjs/flags.d.ts.map +0 -1
  53. package/cjs/index.d.ts +0 -8
  54. package/cjs/index.d.ts.map +0 -1
  55. package/cjs/profiler.d.ts +0 -54
  56. package/cjs/profiler.d.ts.map +0 -1
  57. package/cjs/reactrouter.d.ts +0 -25
  58. package/cjs/reactrouter.d.ts.map +0 -1
  59. package/cjs/reactrouterv3.d.ts +0 -26
  60. package/cjs/reactrouterv3.d.ts.map +0 -1
  61. package/cjs/redux.d.ts +0 -33
  62. package/cjs/redux.d.ts.map +0 -1
  63. package/cjs/sdk.d.ts +0 -6
  64. package/cjs/sdk.d.ts.map +0 -1
  65. package/cjs/types.d.ts +0 -8
  66. package/cjs/types.d.ts.map +0 -1
  67. package/cjs/types.js +0 -2
  68. package/cjs/types.js.map +0 -1
  69. package/esm/constants.d.ts +0 -4
  70. package/esm/constants.d.ts.map +0 -1
  71. package/esm/errorboundary.d.ts +0 -63
  72. package/esm/errorboundary.d.ts.map +0 -1
  73. package/esm/flags.d.ts +0 -3
  74. package/esm/flags.d.ts.map +0 -1
  75. package/esm/index.d.ts +0 -8
  76. package/esm/index.d.ts.map +0 -1
  77. package/esm/profiler.d.ts +0 -54
  78. package/esm/profiler.d.ts.map +0 -1
  79. package/esm/reactrouter.d.ts +0 -25
  80. package/esm/reactrouter.d.ts.map +0 -1
  81. package/esm/reactrouterv3.d.ts +0 -26
  82. package/esm/reactrouterv3.d.ts.map +0 -1
  83. package/esm/redux.d.ts +0 -33
  84. package/esm/redux.d.ts.map +0 -1
  85. package/esm/sdk.d.ts +0 -6
  86. package/esm/sdk.d.ts.map +0 -1
  87. package/esm/types.d.ts +0 -8
  88. package/esm/types.d.ts.map +0 -1
  89. package/esm/types.js +0 -1
  90. package/esm/types.js.map +0 -1
package/esm/redux.d.ts DELETED
@@ -1,33 +0,0 @@
1
- import { Scope } from '@sentry/types';
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
- * Transforms the state before attaching it to an event.
11
- * Use this to remove any private data before sending it to Sentry.
12
- * Return null to not attach the state.
13
- */
14
- stateTransformer(state: S | undefined): (S & any) | null;
15
- /**
16
- * Transforms the action before sending it as a breadcrumb.
17
- * Use this to remove any private data before sending it to Sentry.
18
- * Return null to not send the breadcrumb.
19
- */
20
- actionTransformer(action: AnyAction): AnyAction | null;
21
- /**
22
- * Called on every state update, configure the Sentry Scope with the redux state.
23
- */
24
- configureScopeWithState?(scope: Scope, state: S): void;
25
- }
26
- /**
27
- * Creates an enhancer that would be passed to Redux's createStore to log actions and the latest state to Sentry.
28
- *
29
- * @param enhancerOptions Options to pass to the enhancer
30
- */
31
- declare function createReduxEnhancer(enhancerOptions?: Partial<SentryEnhancerOptions>): any;
32
- export { createReduxEnhancer };
33
- //# sourceMappingURL=redux.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"redux.d.ts","sourceRoot":"","sources":["../../src/redux.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,UAAU,MAAM,CAAC,CAAC,GAAG,GAAG;IACtB,IAAI,EAAE,CAAC,CAAC;CACT;AAED,UAAU,SAAU,SAAQ,MAAM;IAChC,CAAC,UAAU,EAAE,MAAM,GAAG,GAAG,CAAC;CAC3B;AAuCD,MAAM,WAAW,qBAAqB,CAAC,CAAC,GAAG,GAAG;IAC5C;;;;OAIG;IACH,gBAAgB,CAAC,KAAK,EAAE,CAAC,GAAG,SAAS,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC;IACzD;;;;OAIG;IACH,iBAAiB,CAAC,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,IAAI,CAAC;IACvD;;OAEG;IACH,uBAAuB,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC;CACxD;AAWD;;;;GAIG;AACH,iBAAS,mBAAmB,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,GAAG,GAAG,CA4ClF;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
package/esm/sdk.d.ts DELETED
@@ -1,6 +0,0 @@
1
- import { BrowserOptions } from '@sentry/browser';
2
- /**
3
- * Inits the React SDK
4
- */
5
- export declare function init(options: BrowserOptions): void;
6
- //# sourceMappingURL=sdk.d.ts.map
package/esm/sdk.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../src/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAoC,MAAM,iBAAiB,CAAC;AAEnF;;GAEG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,CAalD"}
package/esm/types.d.ts DELETED
@@ -1,8 +0,0 @@
1
- import { Transaction, TransactionContext } from '@sentry/types';
2
- export declare type Action = 'PUSH' | 'REPLACE' | 'POP';
3
- export declare type Location = {
4
- pathname: string;
5
- action?: Action;
6
- } & Record<string, any>;
7
- export declare type ReactRouterInstrumentation = <T extends Transaction>(startTransaction: (context: TransactionContext) => T | undefined, startTransactionOnPageLoad?: boolean, startTransactionOnLocationChange?: boolean) => void;
8
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEhE,oBAAY,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,KAAK,CAAC;AAEhD,oBAAY,QAAQ,GAAG;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CAEjB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAExB,oBAAY,0BAA0B,GAAG,CAAC,CAAC,SAAS,WAAW,EAC7D,gBAAgB,EAAE,CAAC,OAAO,EAAE,kBAAkB,KAAK,CAAC,GAAG,SAAS,EAChE,0BAA0B,CAAC,EAAE,OAAO,EACpC,gCAAgC,CAAC,EAAE,OAAO,KACvC,IAAI,CAAC"}
package/esm/types.js DELETED
@@ -1 +0,0 @@
1
- //# sourceMappingURL=types.js.map
package/esm/types.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import { Transaction, TransactionContext } from '@sentry/types';\n\nexport type Action = 'PUSH' | 'REPLACE' | 'POP';\n\nexport type Location = {\n pathname: string;\n action?: Action;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n} & Record<string, any>;\n\nexport type ReactRouterInstrumentation = <T extends Transaction>(\n startTransaction: (context: TransactionContext) => T | undefined,\n startTransactionOnPageLoad?: boolean,\n startTransactionOnLocationChange?: boolean,\n) => void;\n"]}