Skip to content

Commit 4983d89

Browse files
chore(deps): modernize deps & tooling (#6164)
1 parent ddbe9b4 commit 4983d89

File tree

10 files changed

+47
-39
lines changed

10 files changed

+47
-39
lines changed

next.config.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

next.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { NextConfig } from 'next';
2+
3+
export default {
4+
output: 'standalone',
5+
} satisfies NextConfig;

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
"class-variance-authority": "^0.7.0",
2626
"date-fns": "^3.6.0",
2727
"drizzle-orm": "^0.31.2",
28-
"next": "^14.2.5",
29-
"next-auth": "npm:next-auth@5.0.0-beta.19",
28+
"next": "^15.0.2",
29+
"next-auth": "5.0.0-beta.25",
3030
"postgres": "^3.4.4",
3131
"react": "^18.3.1",
3232
"react-dom": "^18.3.1",

postcss.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/** @type {import('postcss-load-config').Config} */
21
const config = {
32
plugins: {
43
tailwindcss: {},

src/app/channels/[channelId]/chat.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,14 @@ export function Chat(props: Readonly<{ channelId: string }>) {
104104
livePosts.query.isFetchingNextPage
105105
}
106106
onClick={() => {
107-
livePosts.query.fetchNextPage();
107+
void livePosts.query.fetchNextPage();
108108
}}
109109
>
110110
{livePosts.query.isFetchingNextPage
111111
? 'Loading...'
112112
: !livePosts.query.hasNextPage
113-
? 'Fetched everything!'
114-
: 'Load more'}
113+
? 'Fetched everything!'
114+
: 'Load more'}
115115
</Button>
116116
</div>
117117

@@ -136,7 +136,7 @@ export function Chat(props: Readonly<{ channelId: string }>) {
136136
<div className="flex flex-col gap-1">
137137
<div
138138
className={cx(
139-
'rounded-lg bg-gray-100 p-3 text-sm ',
139+
'rounded-lg bg-gray-100 p-3 text-sm',
140140
isMe
141141
? 'bg-gray-300 dark:bg-gray-800'
142142
: 'bg-gray-200 dark:bg-gray-700',

src/app/channels/[channelId]/layout.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,12 @@ import Link from 'next/link';
88
import { Suspense } from 'react';
99

1010
export default async function Home(
11-
props: Readonly<{ params: { channelId: string }; children: React.ReactNode }>,
11+
props: Readonly<{
12+
params: Promise<{ channelId: string }>;
13+
children: React.ReactNode;
14+
}>,
1215
) {
13-
const channelId = props.params.channelId;
16+
const { channelId } = await props.params;
1417
const session = await auth();
1518
const channels = await caller.channel.list();
1619

src/app/channels/[channelId]/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import { Suspense } from 'react';
22
import { Chat } from './chat';
33

44
export default async function Home(
5-
props: Readonly<{ params: { channelId: string } }>,
5+
props: Readonly<{ params: Promise<{ channelId: string }> }>,
66
) {
7-
const channelId = props.params.channelId;
7+
const { channelId } = await props.params;
88

99
return (
1010
<Suspense

src/server/db/migrations/meta/0001_snapshot.json

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,8 @@
8989
"name": "sse-chat_post_channel_id_sse-chat_channel_id_fk",
9090
"tableFrom": "sse-chat_post",
9191
"tableTo": "sse-chat_channel",
92-
"columnsFrom": [
93-
"channel_id"
94-
],
95-
"columnsTo": [
96-
"id"
97-
],
92+
"columnsFrom": ["channel_id"],
93+
"columnsTo": ["id"],
9894
"onDelete": "no action",
9995
"onUpdate": "no action"
10096
}
@@ -110,4 +106,4 @@
110106
"schemas": {},
111107
"tables": {}
112108
}
113-
}
109+
}

src/server/db/migrations/meta/_journal.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
"breakpoints": true
1818
}
1919
]
20-
}
20+
}

tsconfig.json

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,38 @@
11
{
22
"compilerOptions": {
3-
"lib": ["dom", "dom.iterable", "esnext"],
4-
"allowJs": true,
3+
/* Base Options: */
54
"skipLibCheck": true,
5+
"target": "es2022",
6+
"allowJs": true,
7+
"moduleDetection": "force",
8+
"isolatedModules": true,
9+
10+
/* Strictness */
611
"strict": true,
12+
"checkJs": true,
13+
"allowImportingTsExtensions": true,
14+
15+
/* Bundled projects */
16+
"lib": ["dom", "dom.iterable", "ES2022"],
717
"noEmit": true,
8-
"esModuleInterop": true,
9-
"module": "esnext",
18+
"module": "Preserve",
1019
"moduleResolution": "bundler",
11-
"resolveJsonModule": true,
12-
"isolatedModules": true,
13-
"noUncheckedIndexedAccess": true,
1420
"jsx": "preserve",
21+
"plugins": [{ "name": "next" }],
1522
"incremental": true,
16-
"plugins": [
17-
{
18-
"name": "next"
19-
}
20-
],
23+
24+
/* Path aliases */
25+
"baseUrl": ".",
2126
"paths": {
22-
"~/*": ["./src/*"]
27+
"~/*": ["src/*"]
2328
}
2429
},
25-
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
30+
"include": [
31+
"next-env.d.ts",
32+
"**/*.ts",
33+
"**/*.tsx",
34+
"*.js",
35+
".next/types/**/*.ts"
36+
],
2637
"exclude": ["node_modules"]
2738
}

0 commit comments

Comments
 (0)