Skip to content

Commit d9fa221

Browse files
chore(web): Upgrade to NextJS 15 (#477)
1 parent b36de34 commit d9fa221

File tree

45 files changed

+1338
-733
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1338
-733
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Changed
11+
- Updated NextJS to version 15. [#477](https://github.com/sourcebot-dev/sourcebot/pull/477)
12+
1013
## [4.6.4] - 2025-08-11
1114

1215
### Added

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,8 @@
2424
"dotenv-cli": "^8.0.0",
2525
"npm-run-all": "^4.1.5"
2626
},
27-
"packageManager": "yarn@4.7.0"
27+
"packageManager": "yarn@4.7.0",
28+
"resolutions": {
29+
"prettier": "3.5.3"
30+
}
2831
}

packages/backend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"@types/micromatch": "^4.0.9",
1616
"@types/node": "^22.7.5",
1717
"cross-env": "^7.0.3",
18-
"json-schema-to-typescript": "^15.0.2",
18+
"json-schema-to-typescript": "^15.0.4",
1919
"tsc-watch": "^6.2.0",
2020
"tsx": "^4.19.1",
2121
"typescript": "^5.6.2",

packages/web/.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# shadcn components
22
src/components/
3+
next-env.d.ts

packages/web/next.config.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ const nextConfig = {
3838
},
3939
]
4040
},
41+
42+
turbopack: {}
4143
};
4244

4345
export default withSentryConfig(nextConfig, {

packages/web/package.json

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
"version": "0.1.0",
44
"private": true,
55
"scripts": {
6-
"dev": "next dev",
6+
"dev": "next dev --turbopack",
77
"build": "cross-env SKIP_ENV_VALIDATION=1 next build",
88
"start": "next start",
9-
"lint": "cross-env SKIP_ENV_VALIDATION=1 next lint",
9+
"lint": "cross-env SKIP_ENV_VALIDATION=1 eslint .",
1010
"test": "vitest",
1111
"dev:emails": "email dev --dir ./src/emails",
1212
"stripe:listen": "stripe listen --forward-to http://localhost:3000/api/stripe"
@@ -146,7 +146,7 @@
146146
"langfuse-vercel": "^3.38.4",
147147
"lucide-react": "^0.517.0",
148148
"micromatch": "^4.0.8",
149-
"next": "14.2.30",
149+
"next": "15.5.0",
150150
"next-auth": "^5.0.0-beta.25",
151151
"next-navigation-guard": "^0.2.0",
152152
"next-themes": "^0.3.0",
@@ -157,9 +157,9 @@
157157
"posthog-js": "^1.161.5",
158158
"pretty-bytes": "^6.1.1",
159159
"psl": "^1.15.0",
160-
"react": "^18",
160+
"react": "19.1.1",
161161
"react-device-detect": "^2.2.3",
162-
"react-dom": "^18",
162+
"react-dom": "19.1.1",
163163
"react-hook-form": "^7.53.0",
164164
"react-hotkeys-hook": "^4.5.1",
165165
"react-icons": "^5.3.0",
@@ -187,21 +187,23 @@
187187
"zod-to-json-schema": "^3.24.5"
188188
},
189189
"devDependencies": {
190+
"@eslint/eslintrc": "^3",
190191
"@tanstack/eslint-plugin-query": "^5.74.7",
191-
"@testing-library/react-hooks": "^8.0.1",
192+
"@testing-library/dom": "^10.4.1",
193+
"@testing-library/react": "^16.3.0",
192194
"@types/micromatch": "^4.0.9",
193195
"@types/node": "^20",
194196
"@types/nodemailer": "^6.4.17",
195197
"@types/psl": "^1.1.3",
196-
"@types/react": "^18",
197-
"@types/react-dom": "^18",
198-
"@typescript-eslint/eslint-plugin": "^8.3.0",
199-
"@typescript-eslint/parser": "^8.3.0",
198+
"@types/react": "19.1.10",
199+
"@types/react-dom": "19.1.7",
200+
"@typescript-eslint/eslint-plugin": "^8.40.0",
201+
"@typescript-eslint/parser": "^8.40.0",
200202
"cross-env": "^7.0.3",
201203
"eslint": "^8",
202-
"eslint-config-next": "14.2.6",
203-
"eslint-plugin-react": "^7.35.0",
204-
"eslint-plugin-react-hooks": "^4.6.2",
204+
"eslint-config-next": "15.5.0",
205+
"eslint-plugin-react": "^7.37.5",
206+
"eslint-plugin-react-hooks": "^5.2.0",
205207
"jsdom": "^25.0.1",
206208
"npm-run-all": "^4.1.5",
207209
"postcss": "^8",
@@ -211,5 +213,9 @@
211213
"typescript": "^5",
212214
"vite-tsconfig-paths": "^5.1.3",
213215
"vitest": "^2.1.5"
216+
},
217+
"resolutions": {
218+
"@types/react": "19.1.10",
219+
"@types/react-dom": "19.1.7"
214220
}
215221
}

packages/web/src/actions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ export const withTenancyModeEnforcement = async<T>(mode: TenancyMode, fn: () =>
186186

187187
////// Actions ///////
188188

189-
export const createOrg = (name: string, domain: string): Promise<{ id: number } | ServiceError> => sew(() =>
189+
export const createOrg = async (name: string, domain: string): Promise<{ id: number } | ServiceError> => sew(() =>
190190
withTenancyModeEnforcement('multi', () =>
191191
withAuth(async (userId) => {
192192
const org = await prisma.org.create({
@@ -293,7 +293,7 @@ export const completeOnboarding = async (domain: string): Promise<{ success: boo
293293
})
294294
));
295295

296-
export const getSecrets = (domain: string): Promise<{ createdAt: Date; key: string; }[] | ServiceError> => sew(() =>
296+
export const getSecrets = async (domain: string): Promise<{ createdAt: Date; key: string; }[] | ServiceError> => sew(() =>
297297
withAuth((userId) =>
298298
withOrgMembership(userId, domain, async ({ org }) => {
299299
const secrets = await prisma.secret.findMany({
@@ -1990,7 +1990,7 @@ export const rejectAccountRequest = async (requestId: string, domain: string) =>
19901990
));
19911991

19921992
export const dismissMobileUnsupportedSplashScreen = async () => sew(async () => {
1993-
await cookies().set(MOBILE_UNSUPPORTED_SPLASH_SCREEN_DISMISSED_COOKIE_NAME, 'true');
1993+
await (await cookies()).set(MOBILE_UNSUPPORTED_SPLASH_SCREEN_DISMISSED_COOKIE_NAME, 'true');
19941994
return true;
19951995
});
19961996

packages/web/src/app/[domain]/agents/page.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,13 @@ const agents = [
1313
},
1414
];
1515

16-
export default function AgentsPage({ params: { domain } }: { params: { domain: string } }) {
16+
export default async function AgentsPage(props: { params: Promise<{ domain: string }> }) {
17+
const params = await props.params;
18+
19+
const {
20+
domain
21+
} = params;
22+
1723
return (
1824
<div className="flex flex-col items-center overflow-hidden min-h-screen">
1925
<NavigationMenu domain={domain} />

packages/web/src/app/[domain]/browse/[...path]/page.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,20 @@ import { Loader2 } from "lucide-react";
55
import { TreePreviewPanel } from "./components/treePreviewPanel";
66

77
interface BrowsePageProps {
8-
params: {
8+
params: Promise<{
99
path: string[];
1010
domain: string;
11-
};
11+
}>;
1212
}
1313

14-
export default async function BrowsePage({ params: { path: _rawPath, domain } }: BrowsePageProps) {
14+
export default async function BrowsePage(props: BrowsePageProps) {
15+
const params = await props.params;
16+
17+
const {
18+
path: _rawPath,
19+
domain
20+
} = params;
21+
1522
const rawPath = decodeURIComponent(_rawPath.join('/'));
1623
const { repoName, revisionName, path, pathType } = getBrowseParamsFromPathParam(rawPath);
1724

packages/web/src/app/[domain]/chat/[id]/page.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@ import { ChatSidePanel } from '../components/chatSidePanel';
1313
import { ResizablePanelGroup } from '@/components/ui/resizable';
1414

1515
interface PageProps {
16-
params: {
16+
params: Promise<{
1717
domain: string;
1818
id: string;
19-
};
19+
}>;
2020
}
2121

22-
export default async function Page({ params }: PageProps) {
22+
export default async function Page(props: PageProps) {
23+
const params = await props.params;
2324
const languageModels = await getConfiguredLanguageModelsInfo();
2425
const repos = await getRepos(params.domain);
2526
const searchContexts = await getSearchContexts(params.domain);

0 commit comments

Comments
 (0)