@lookiero/checkout 0.6.0-beta.30 → 0.6.0-beta.31

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.
@@ -4,6 +4,6 @@ import { ReactNativeTransportOptions } from "@sentry/react-native/dist/js/option
4
4
  import { Transport, Integration } from "@sentry/types";
5
5
  import { ComponentType } from "react";
6
6
  declare const transport: (options: ReactNativeTransportOptions) => Transport;
7
- declare const integrations: (basename: string) => Integration[];
7
+ declare const integrations: Integration[];
8
8
  declare const wrap: <P>(Component: ComponentType<P>) => ComponentType<P>;
9
9
  export { BrowserClient as Client, Hub, ErrorBoundary, transport, integrations, wrap };
@@ -4,12 +4,12 @@ import { reactRouterV6Instrumentation } from "@sentry/react";
4
4
  import { BrowserTracing } from "@sentry/tracing";
5
5
  import { useEffect } from "react";
6
6
  import { createRoutesFromChildren, useLocation, useNavigationType } from "react-router-native";
7
- import { matchRoutesForBasename } from "./matchRoutes";
7
+ import { matchRoutes } from "./matchRoutes";
8
8
  const transport = (options, nativeFetch) => makeFetchTransport(options, nativeFetch);
9
- const integrations = (basename) => [
9
+ const integrations = [
10
10
  ...defaultIntegrations,
11
11
  new BrowserTracing({
12
- routingInstrumentation: reactRouterV6Instrumentation(useEffect, useLocation, useNavigationType, createRoutesFromChildren, matchRoutesForBasename(basename)),
12
+ routingInstrumentation: reactRouterV6Instrumentation(useEffect, useLocation, useNavigationType, createRoutesFromChildren, matchRoutes),
13
13
  }),
14
14
  ];
15
15
  const wrap = (Component) => Component;
@@ -3,6 +3,6 @@ import { ReactNativeTransportOptions } from "@sentry/react-native/dist/js/option
3
3
  import { Transport, Integration } from "@sentry/types";
4
4
  import { ComponentType } from "react";
5
5
  declare const transport: (options: ReactNativeTransportOptions) => Transport;
6
- declare const integrations: () => Integration[];
6
+ declare const integrations: Integration[];
7
7
  declare const wrap: <P>(Component: ComponentType<P>) => ComponentType<P>;
8
8
  export { ReactNativeClient as Client, Hub, ErrorBoundary, transport, integrations, wrap };
@@ -4,7 +4,7 @@ import { makeReactNativeTransport } from "@sentry/react-native/dist/js/transport
4
4
  import { NATIVE } from "@sentry/react-native/dist/js/wrapper";
5
5
  import { ReactRouterV6Instrumentation } from "./reactRouterV6Instrumentation.native";
6
6
  const transport = (options, nativeFetch) => NATIVE.isNativeTransportAvailable() ? makeReactNativeTransport(options) : makeFetchTransport(options, nativeFetch);
7
- const integrations = () => [
7
+ const integrations = [
8
8
  new ReactNativeTracing({
9
9
  routingInstrumentation: new ReactRouterV6Instrumentation(),
10
10
  }),
@@ -1,7 +1,6 @@
1
1
  import { ComponentType } from "react";
2
2
  import { Platform } from "react-native";
3
3
  interface SentryLoggerFunctionArgs {
4
- readonly routerBasename: string;
5
4
  readonly publicKey: string;
6
5
  readonly environment: `${typeof Platform.OS}-${"DEV" | "PROD"}`;
7
6
  readonly release: string;
@@ -9,13 +9,13 @@ import {
9
9
  // Routes as ReactRouterRoutes,
10
10
  useRoutes as reactRouterUseRoutes, } from "react-router-native";
11
11
  import { Client, Hub, ErrorBoundary, transport, integrations, wrap } from "./SentryDependencies";
12
- const sentryLogger = ({ routerBasename, publicKey, environment, release, project }) => {
12
+ const sentryLogger = ({ publicKey, environment, release, project }) => {
13
13
  let mainHub;
14
14
  const client = new Client({
15
15
  environment,
16
16
  release,
17
17
  dsn: `https://${publicKey}@o179049.ingest.sentry.io/${project}`,
18
- integrations: integrations(routerBasename),
18
+ integrations,
19
19
  tracesSampleRate: 1.0,
20
20
  debug: true,
21
21
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -1,6 +1,3 @@
1
- import { matchRoutes } from "@remix-run/router";
2
- interface MatchRoutesForBasenameFunction {
3
- (basename: string): typeof matchRoutes;
4
- }
5
- declare const matchRoutesForBasename: MatchRoutesForBasenameFunction;
6
- export { matchRoutesForBasename };
1
+ import { matchRoutes as reactRouterMatchRoutes } from "@remix-run/router";
2
+ declare const matchRoutes: typeof reactRouterMatchRoutes;
3
+ export { matchRoutes };
@@ -1,7 +1,7 @@
1
- import { matchRoutes } from "@remix-run/router";
2
- const matchRoutesForBasename = (basename) => (routes, locationArg) => {
1
+ import { matchRoutes as reactRouterMatchRoutes } from "@remix-run/router";
2
+ const matchRoutes = (routes, locationArg) => {
3
3
  // Remove the location's first path ("/checkout"). Otherwise it won't match the proper route.
4
4
  const location = (typeof locationArg === "string" ? locationArg : locationArg?.pathname || "").replace(/^\/\w+/, "");
5
- return matchRoutes(routes, location, basename);
5
+ return reactRouterMatchRoutes(routes, location);
6
6
  };
7
- export { matchRoutesForBasename };
7
+ export { matchRoutes };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lookiero/checkout",
3
- "version": "0.6.0-beta.30",
3
+ "version": "0.6.0-beta.31",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [