@lookiero/checkout 0.6.0-beta.39 → 0.6.0-beta.40

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.
@@ -11,8 +11,14 @@ const transport = (options, nativeFetch) => makeFetchTransport(options, nativeFe
11
11
  // Remove the location's first path ("/checkout"). Otherwise it won't match the proper route.
12
12
  const matchRoutes = (routes, locationArg) => reactRouterMatchRoutes(routes, stripFirstSlugFromLocation(locationArg));
13
13
  export { matchRoutes };
14
- const routingInstrumentation = reactRouterV6Instrumentation(useEffect, useLocation, useNavigationType, createRoutesFromChildren, matchRoutes);
15
- const integrations = () => [...defaultIntegrations, new BrowserTracing({ routingInstrumentation })];
14
+ /**
15
+ * BrowserTracing must be initialized before the BrowserClient
16
+ * so we instantiate it before the integrations function is called
17
+ */
18
+ const browserTracing = new BrowserTracing({
19
+ routingInstrumentation: reactRouterV6Instrumentation(useEffect, useLocation, useNavigationType, createRoutesFromChildren, matchRoutes),
20
+ });
21
+ const integrations = () => [...defaultIntegrations, browserTracing];
16
22
  const wrapComponent = (Component) => Component;
17
23
  const wrapUseRoutes = reactRouterV6WrapUseRoutes;
18
24
  export { BrowserClient as Client, Hub, ErrorBoundary, transport, integrations, wrapComponent, wrapUseRoutes };
@@ -14,6 +14,8 @@ const transport = (options, nativeFetch) => {
14
14
  : makeFetchTransport(options, nativeFetch);
15
15
  };
16
16
  const routingInstrumentation = new ReactRouterV6Instrumentation(useEffect, useLocation, matchRoutes);
17
+ // ReactNativeTracing's instantiation must be delayed so we wrap it in a function
18
+ // that's going to be called when the Client is instantiated
17
19
  const integrations = () => [new ReactNativeTracing({ routingInstrumentation })];
18
20
  const wrapComponent = (Component) => sentryWrap(Component);
19
21
  const wrapUseRoutes = routingInstrumentation.wrapUseRoutes.bind(routingInstrumentation);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lookiero/checkout",
3
- "version": "0.6.0-beta.39",
3
+ "version": "0.6.0-beta.40",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [