Skip to content

Commit 9afaabf

Browse files
authored
chore(tanstackstart-react)!: Remove empty placeholder implementations (#18338)
Just cleaning up, we won't be needing any of these. I am aware this is breaking, but I think it's fine since we are still in alpha and these are empty anyways.
1 parent 98854d4 commit 9afaabf

File tree

4 files changed

+4
-53
lines changed

4 files changed

+4
-53
lines changed
Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1 @@
1-
/**
2-
* A middleware handler that can be passed to TanStack Start's `createMiddleware().server(...)` method as [global middleware](https://tanstack.com/start/latest/docs/framework/react/middleware#global-middleware) for instrumenting server functions.
3-
*/
4-
export function sentryGlobalServerMiddlewareHandler() {
5-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
6-
return function <T>(server: { next: (...args: any[]) => T }): T {
7-
return server.next();
8-
};
9-
}
10-
11-
/**
12-
* Wraps a TanStack Start stream handler with Sentry instrumentation that can be passed to `createStartHandler(...)`.
13-
*/
14-
export function wrapStreamHandlerWithSentry<H>(handler: H): H {
15-
return handler;
16-
}
17-
18-
/**
19-
* Wraps the create root route function with Sentry for server-client tracing with SSR.
20-
*/
21-
export function wrapCreateRootRouteWithSentry<F>(createRootRoute: F): F {
22-
return createRootRoute;
23-
}
1+
export {};
Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1 @@
1-
/**
2-
* Wraps a TanStack Start config.
3-
*/
4-
export function wrapVinxiConfigWithSentry<C>(
5-
config: C,
6-
// TODO: Expand this type in the future. Right now it is just so that TS doesn't complain for our users when they copy paste from the docs.
7-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
8-
sentryBuildOptions: {
9-
org?: string;
10-
project?: string;
11-
silent?: boolean;
12-
authToken?: string;
13-
} = {},
14-
): C {
15-
return config;
16-
}
1+
export {};
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* eslint-disable import/export */
2+
13
export * from './config';
24
export * from './server';
35
export * from './common';

packages/tanstackstart-react/src/server/index.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,6 @@ export const ErrorBoundary = (props: React.PropsWithChildren<unknown>): React.Re
1616
return props.children;
1717
};
1818

19-
/**
20-
* A passthrough redux enhancer for the server that doesn't depend on anything from the `@sentry/react` package.
21-
*/
22-
export function createReduxEnhancer() {
23-
return (createStore: unknown) => createStore;
24-
}
25-
2619
/**
2720
* A passthrough error boundary wrapper for the server that doesn't depend on any react. Error boundaries don't catch
2821
* SSR errors so they should simply be a passthrough.
@@ -33,10 +26,3 @@ export function withErrorBoundary<P extends Record<string, any>>(
3326
): React.FC<P> {
3427
return WrappedComponent as React.FC<P>;
3528
}
36-
37-
/**
38-
* Just a passthrough since we're on the server and showing the report dialog on the server doesn't make any sense.
39-
*/
40-
export function showReportDialog(): void {
41-
return;
42-
}

0 commit comments

Comments
 (0)