Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fast-paws-promise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@clerk/tanstack-react-start": minor
---

Bumped minimum required TanStack Start dependencies to 1.157.0+ and removed usage of deprecated `json()` in favor of standard Web APIs.
10 changes: 5 additions & 5 deletions integration/templates/tanstack-react-start/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"start": "vite start --port=$PORT"
},
"dependencies": {
"@tanstack/react-router": "1.132.47",
"@tanstack/react-router-devtools": "1.132.51",
"@tanstack/react-start": "1.132.51",
"react": "18.3.1",
"react-dom": "18.3.1",
"@tanstack/react-router": "1.157.16",
"@tanstack/react-router-devtools": "1.157.16",
"@tanstack/react-start": "1.157.16",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"tailwind-merge": "^2.5.4"
},
"devDependencies": {
Expand Down
26 changes: 13 additions & 13 deletions integration/templates/tanstack-react-start/src/routeTree.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.

import { Route as rootRouteImport } from './routes/__root';
import { Route as SignInRouteImport } from './routes/sign-in';
import { Route as SignInRouteImport } from './routes/sign-in.$';
import { Route as IndexRouteImport } from './routes/index';

const SignInRoute = SignInRouteImport.update({
id: '/sign-in',
path: '/sign-in',
id: '/sign-in/$',
path: '/sign-in/$',
getParentRoute: () => rootRouteImport,
} as any);
const IndexRoute = IndexRouteImport.update({
Expand All @@ -25,23 +25,23 @@ const IndexRoute = IndexRouteImport.update({

export interface FileRoutesByFullPath {
'/': typeof IndexRoute;
'/sign-in': typeof SignInRoute;
'/sign-in/$': typeof SignInRoute;
}
export interface FileRoutesByTo {
'/': typeof IndexRoute;
'/sign-in': typeof SignInRoute;
'/sign-in/$': typeof SignInRoute;
}
export interface FileRoutesById {
__root__: typeof rootRouteImport;
'/': typeof IndexRoute;
'/sign-in': typeof SignInRoute;
'/sign-in/$': typeof SignInRoute;
}
export interface FileRouteTypes {
fileRoutesByFullPath: FileRoutesByFullPath;
fullPaths: '/' | '/sign-in';
fullPaths: '/' | '/sign-in/$';
fileRoutesByTo: FileRoutesByTo;
to: '/' | '/sign-in';
id: '__root__' | '/' | '/sign-in';
to: '/' | '/sign-in/$';
id: '__root__' | '/' | '/sign-in/$';
fileRoutesById: FileRoutesById;
}
export interface RootRouteChildren {
Expand All @@ -58,10 +58,10 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof IndexRouteImport;
parentRoute: typeof rootRouteImport;
};
'/sign-in': {
id: '/sign-in';
path: '/sign-in';
fullPath: '/sign-in';
'/sign-in/$': {
id: '/sign-in/$';
path: '/sign-in/$';
fullPath: '/sign-in/$';
preLoaderRoute: typeof SignInRouteImport;
parentRoute: typeof rootRouteImport;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { SignIn } from '@clerk/tanstack-react-start';
import { createFileRoute } from '@tanstack/react-router';

export const Route = createFileRoute('/sign-in')({
export const Route = createFileRoute('/sign-in/$')({
component: Page,
});

Expand Down
8 changes: 4 additions & 4 deletions packages/tanstack-react-start/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@
"tslib": "catalog:repo"
},
"devDependencies": {
"@tanstack/react-router": "1.132.0",
"@tanstack/react-start": "1.132.0",
"@tanstack/react-router": "1.157.16",
"@tanstack/react-start": "1.157.16",
"esbuild-plugin-file-path-extensions": "^2.1.4"
},
"peerDependencies": {
"@tanstack/react-router": "^1.132.0",
"@tanstack/react-start": "^1.132.0",
"@tanstack/react-router": "^1.157.0",
"@tanstack/react-start": "^1.157.0",
"react": "catalog:peer-react",
"react-dom": "catalog:peer-react"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/tanstack-react-start/src/server/clerkMiddleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { AuthStatus, constants, createClerkRequest } from '@clerk/backend/intern
import { handleNetlifyCacheInDevInstance } from '@clerk/shared/netlifyCacheHandler';
import type { PendingSessionOptions } from '@clerk/types';
import type { AnyRequestMiddleware } from '@tanstack/react-start';
import { createMiddleware, json } from '@tanstack/react-start';
import { createMiddleware } from '@tanstack/react-start';

import { clerkClient } from './clerkClient';
import { loadOptions } from './loadOptions';
Expand All @@ -28,7 +28,7 @@ export const clerkMiddleware = (options?: ClerkMiddlewareOptions): AnyRequestMid
});
// Trigger a handshake redirect
// eslint-disable-next-line @typescript-eslint/only-throw-error
throw json(null, { status: 307, headers: requestState.headers });
throw new Response(null, { status: 307, headers: requestState.headers });
}

if (requestState.status === AuthStatus.Handshake) {
Expand Down
Loading
Loading