@lookiero/checkout 0.6.0-beta.5 → 0.6.0-beta.6

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.
@@ -7,7 +7,7 @@ import { Navigation } from "./navigation/Navigation";
7
7
  const a = true;
8
8
  const App = ({ customerId, menu, tabBar, children }) => {
9
9
  if (a) {
10
- throw new Error("This is an error (integrated in UAF)");
10
+ throw new Error("This is an error (while integrated in UAF)");
11
11
  }
12
12
  return (React.createElement(SafeAreaProvider, null,
13
13
  React.createElement(Notifications, { contextId: MESSAGING_CONTEXT_ID }),
@@ -1,25 +1,16 @@
1
- import { defaultStackParser, makeFetchTransport } from "@sentry/browser";
1
+ // import { defaultStackParser, makeFetchTransport } from "@sentry/browser";
2
+ // import { FetchImpl } from "@sentry/browser/types/transports/utils";
2
3
  import { makeMain } from "@sentry/core";
3
4
  import * as Sentry from "@sentry/react-native";
4
- import { makeReactNativeTransport } from "@sentry/react-native/dist/js/transports/native";
5
- import { NATIVE } from "@sentry/react-native/dist/js/wrapper";
5
+ // import { ReactNativeTransportOptions } from "@sentry/react-native/dist/js/options";
6
+ // import { makeReactNativeTransport } from "@sentry/react-native/dist/js/transports/native";
7
+ // import { NATIVE } from "@sentry/react-native/dist/js/wrapper";
6
8
  import "@sentry/tracing";
9
+ // import { Transport } from "@sentry/types";
7
10
  import React, { useEffect } from "react";
8
11
  import { Platform } from "react-native";
9
- const defaultTransport = (options, nativeFetch) => {
10
- if (NATIVE.isNativeTransportAvailable()) {
11
- return makeReactNativeTransport(options);
12
- }
13
- return makeFetchTransport(options, nativeFetch);
14
- };
15
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
16
- // @ts-ignore
17
12
  const sentryLogger = ({ publicKey, environment, release, project }) => {
18
13
  let mainHub;
19
- /**
20
- * TS complains about not providing 'transport' and 'stackParser' implementations
21
- * although 'ReactNativeClient' defaults to its own implementation for those options.
22
- */
23
14
  const client = new Sentry.ReactNativeClient({
24
15
  environment,
25
16
  release,
@@ -32,16 +23,16 @@ const sentryLogger = ({ publicKey, environment, release, project }) => {
32
23
  tracesSampleRate: 1.0,
33
24
  debug: true,
34
25
  enableNative: Platform.OS !== "web",
35
- stackParser: defaultStackParser,
36
- transport: defaultTransport,
26
+ // stackParser: defaultStackParser,
27
+ // transport: defaultTransport,
37
28
  });
38
29
  const hub = new Sentry.Hub(client);
39
30
  const switchMainHub = () => {
40
- console.log("switchMainHub");
41
- mainHub = makeMain(hub);
31
+ if (!mainHub) {
32
+ mainHub = makeMain(hub);
33
+ }
42
34
  };
43
35
  const revertMainHub = () => {
44
- console.log("revertMainHub");
45
36
  makeMain(mainHub);
46
37
  };
47
38
  return (Component) => {
@@ -50,7 +41,10 @@ const sentryLogger = ({ publicKey, environment, release, project }) => {
50
41
  // eslint-disable-next-line react/display-name
51
42
  return (props) => {
52
43
  useEffect(() => revertMainHub, []);
53
- return (React.createElement(Sentry.ErrorBoundary, null,
44
+ return (
45
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
46
+ // @ts-ignore
47
+ React.createElement(Sentry.ErrorBoundary, null,
54
48
  React.createElement(WrappedComponent, { ...props })));
55
49
  };
56
50
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lookiero/checkout",
3
- "version": "0.6.0-beta.5",
3
+ "version": "0.6.0-beta.6",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [
@@ -33,7 +33,6 @@
33
33
  "@lookiero/messaging": "^8.0.0",
34
34
  "@lookiero/messaging-react": "^8.0.0",
35
35
  "@react-spring/native": "^9.5.5",
36
- "@sentry/react-native": "^4.12.0",
37
36
  "inline-style-prefixer": "6.0.1",
38
37
  "react-native-safe-area-context": "^4.4.1",
39
38
  "react-native-svg": "^12.1.1",
@@ -48,6 +47,7 @@
48
47
  "@lookiero/event": "^0.3",
49
48
  "@lookiero/locale": "^0.3",
50
49
  "@lookiero/payments-front": "^0.16.5",
50
+ "@sentry/react-native": "^3.2.13",
51
51
  "apollo-boost": "0.4.4",
52
52
  "graphql": "16.6.0",
53
53
  "graphql-tag": "2.12.6",
@@ -71,6 +71,7 @@
71
71
  "@lookiero/payments-front": "^0.16.5",
72
72
  "@pact-foundation/pact": "^10.1.4",
73
73
  "@pact-foundation/pact-node": "^10.17.6",
74
+ "@sentry/react-native": "^3.2.13",
74
75
  "@testing-library/react": "^13.4.0",
75
76
  "@testing-library/react-hooks": "^8.0.1",
76
77
  "@testing-library/react-native": "^11.0.0",