Skip to content

Commit

Permalink
Next.js 15 is now GA. updated some other packages also.
Browse files Browse the repository at this point in the history
  • Loading branch information
KishiTheMechanic committed Nov 11, 2024
1 parent 1b2013f commit 11c06dc
Show file tree
Hide file tree
Showing 28 changed files with 620 additions and 15,825 deletions.
1,110 changes: 497 additions & 613 deletions deno.lock

Large diffs are not rendered by default.

15,014 changes: 0 additions & 15,014 deletions package-lock.json

This file was deleted.

105 changes: 13 additions & 92 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@
"class-variance-authority": "0.7.0",
"clsx": "2.1.1",
"crypto-js": "4.2.0",
"jotai": "2.8.2",
"next": "15.0.0-canary.2",
"jotai": "2.10.1",
"next": "15.0.3",
"next-auth": "5.0.0-beta.20",
"next-intl": "3.14.1",
"next-intl": "3.25.0",
"next-themes": "0.3.0",
"react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-rc-f994737d14-20240522",
"react": "19.0.0-rc-66855b96-20241106",
"react-dom": "19.0.0-rc-66855b96-20241106",
"react-hook-form": "7.51.5",
"react-markdown": "8.0.7",
"react-syntax-highlighter": "15.5.0",
Expand All @@ -84,13 +84,13 @@
"@types/react-syntax-highlighter": "15.5.13",
"@types/ws": "8.5.10",
"autoprefixer": "10.4.19",
"babel-plugin-react-compiler": "0.0.0-experimental-487cb0e-20240529",
"eslint": "8.57.0",
"eslint-config-next": "14.2.3",
"babel-plugin-react-compiler": "19.0.0-beta-63b359f-20241101",
"eslint": "9.14.0",
"eslint-config-next": "15.0.3",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-next-on-pages": "1.11.3",
"postcss": "8.4.38",
"prettier": "3.2.5",
"prettier": "3.3.3",
"prettier-plugin-tailwindcss": "0.6.1",
"prisma": "5.19.0",
"tailwind-merge": "2.3.0",
Expand All @@ -99,89 +99,10 @@
"tailwindcss-animate": "1.0.7",
"typescript": "5.6.3",
"vercel": "37.8.0",
"wrangler": "3.80.4"
"wrangler": "3.86.0"
},
"overrides": {
"@fortawesome/react-fontawesome": {
"react": "19.0.0-rc-f994737d14-20240522"
},
"@radix-ui/react-avatar": {
"react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-rc-f994737d14-20240522"
},
"@radix-ui/react-checkbox": {
"react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-rc-f994737d14-20240522"
},
"@radix-ui/react-dialog": {
"react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-rc-f994737d14-20240522"
},
"@radix-ui/react-dropdown-menu": {
"react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-rc-f994737d14-20240522"
},
"@radix-ui/react-icons": {
"react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-rc-f994737d14-20240522"
},
"@radix-ui/react-label": {
"react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-rc-f994737d14-20240522"
},
"@radix-ui/react-separator": {
"react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-rc-f994737d14-20240522"
},
"@radix-ui/react-slot": {
"react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-rc-f994737d14-20240522"
},
"@radix-ui/react-toast": {
"react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-rc-f994737d14-20240522"
},
"@radix-ui/react-tooltip": {
"react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-rc-f994737d14-20240522"
},
"ai": {
"react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-rc-f994737d14-20240522"
},
"jotai": {
"react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-rc-f994737d14-20240522",
"@types/react": "npm:[email protected]"
},
"next-intl": {
"react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-rc-f994737d14-20240522",
"next": "15.0.0-canary.2"
},
"next-themes": {
"react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-rc-f994737d14-20240522",
"next": "15.0.0-canary.2"
},
"react-hook-form": {
"react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-rc-f994737d14-20240522"
},
"react-markdown": {
"react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-rc-f994737d14-20240522",
"@types/react": "npm:[email protected]"
},
"react-syntax-highlighter": {
"react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-rc-f994737d14-20240522",
"@types/react": "npm:[email protected]"
},
"react-textarea-autosize": {
"react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-rc-f994737d14-20240522",
"@types/react": "npm:[email protected]"
}
"peerDependencies": {
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0",
"react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0"
}
}
1 change: 0 additions & 1 deletion prisma/auth/PrismaAuthClient/edge.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ const config = {
"db"
],
"activeProvider": "sqlite",
"postinstall": false,
"inlineDatasources": {
"db": {
"url": {
Expand Down
1 change: 0 additions & 1 deletion prisma/auth/PrismaAuthClient/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ const config = {
"db"
],
"activeProvider": "sqlite",
"postinstall": false,
"inlineDatasources": {
"db": {
"url": {
Expand Down
1 change: 0 additions & 1 deletion prisma/auth/PrismaAuthClient/wasm.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ const config = {
"db"
],
"activeProvider": "sqlite",
"postinstall": false,
"inlineDatasources": {
"db": {
"url": {
Expand Down
6 changes: 3 additions & 3 deletions src/app/[locale]/(default)/(home)/SignInForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import {
CardDescription,
CardFooter,
CardHeader,
CardTitle,
CardTitle
} from '@/components/ui/card'
import { Input } from '@/components/ui/input'
import { Label } from '@/components/ui/label'
import { useToast } from '@/components/ui/use-toast'
import { useRouter } from '@/navigation'
import { useRouter } from '@/i18n/routing'
import { useTranslations } from 'next-intl'
import { useTransition } from 'react'
import { DEFAULT_PATHS } from '../defaultNavs'
Expand All @@ -33,7 +33,7 @@ export default function SignInForm() {
if (e instanceof Error) {
toast({
title: t('auth.errorSignInTitle'),
description: t('auth.errorSignInDescription'),
description: t('auth.errorSignInDescription')
})
}
}
Expand Down
11 changes: 6 additions & 5 deletions src/app/[locale]/(default)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,24 @@ import appInfo from '@appInfo'
import { auth } from '@/auth'
import { LanguageToggle } from '@/components/config/LanguageToggle'
import { ModeToggle } from '@/components/config/ModeToggle'
import { redirect } from '@/navigation'
import { redirect } from '@/i18n/routing'
import { USER_PATHS } from '../user/userNavs'
import {
DiscordIconLink,
GithubIconLink,
TwitterIconLink,
TwitterIconLink
} from '@/components/common/icons'

type Props = {
children: React.ReactNode
params: { locale: string }
params: Promise<{ locale: string }>
}

export default async function DefaultLayout({ children }: Props) {
export default async function DefaultLayout({ children, params }: Props) {
const { locale } = await params
const session = await auth()
if (session) {
redirect(USER_PATHS.home)
redirect({ href: USER_PATHS.home, locale })
}

return (
Expand Down
16 changes: 7 additions & 9 deletions src/app/[locale]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,35 +12,33 @@ import { TooltipProvider } from '@/components/ui/tooltip'
const inter = Inter({
subsets: ['latin'],
display: 'swap',
variable: '--font-inter',
variable: '--font-inter'
})

const notoSansJP = Noto_Sans_JP({
subsets: ['latin'],
display: 'swap',
variable: '--font-noto-sans-jp',
variable: '--font-noto-sans-jp'
})

type Props = {
children: React.ReactNode
params: {
params: Promise<{
locale: string
}
}>
}

export const runtime = 'edge'

export default async function LocaleLayout({
children,
params: { locale },
}: Props) {
export default async function LocaleLayout({ children, params }: Props) {
const { locale } = await params
const messages = await getMessages()
return (
<html lang={locale} suppressHydrationWarning>
<body
className={cn(
'overflow-hidden',
`${inter.variable} ${notoSansJP.variable}`,
`${inter.variable} ${notoSansJP.variable}`
)}
suppressHydrationWarning
>
Expand Down
4 changes: 2 additions & 2 deletions src/app/[locale]/user/ModalNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { HamburgerMenuIcon } from '@radix-ui/react-icons'
import { Button } from '@/components/ui/button'
import { Link, usePathname } from '@/navigation'
import { Link, usePathname } from '@/i18n/routing'

import { Sheet, SheetContent, SheetTrigger } from '@/components/ui/sheet'
import LogoHorizontalLink from '@/components/common/LogoHorizontalLink'
Expand Down Expand Up @@ -44,7 +44,7 @@ export default function UserModalNav() {
pathname === navItem.path
? 'bg-muted text-foreground hover:text-foreground dark:bg-muted/40'
: 'text-muted-foreground hover:text-foreground',
'mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2',
'mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2'
)}
onClick={() => setOpen(false)}
>
Expand Down
4 changes: 2 additions & 2 deletions src/app/[locale]/user/SiderNav.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client'

import { Link, usePathname } from '@/navigation'
import { Link, usePathname } from '@/i18n/routing'
import LogoHorizontalLink from '@/components/common/LogoHorizontalLink'
import UpgradeCard from '@/components/common/UpgradeCard'
import { useTranslations } from 'next-intl'
Expand Down Expand Up @@ -28,7 +28,7 @@ export default function UserSiderNav() {
pathname === navItem.path
? 'bg-muted text-primary transition-all hover:text-primary dark:bg-muted/40'
: 'text-muted-foreground hover:text-primary',
'flex items-center gap-3 rounded-lg px-3 py-2 transition-all',
'flex items-center gap-3 rounded-lg px-3 py-2 transition-all'
)}
>
<navItem.icon className="h-5 w-5" />
Expand Down
8 changes: 4 additions & 4 deletions src/app/[locale]/user/UserMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import {
DropdownMenuItem,
DropdownMenuLabel,
DropdownMenuSeparator,
DropdownMenuTrigger,
DropdownMenuTrigger
} from '@/components/ui/dropdown-menu'

import signOutAction from '@/actions/auth/signOutAction'
import { useToast } from '@/components/ui/use-toast'
import { useRouter } from '@/navigation'
import { useRouter } from '@/i18n/routing'
import { useSession } from 'next-auth/react'
import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'
import { getGravatarUrl } from '@/lib/utils'
Expand All @@ -33,13 +33,13 @@ export default function UserMenu() {
router.push(DEFAULT_PATHS.home)
toast({
title: t('auth.signOutTitle'),
description: t('auth.signOutDescription'),
description: t('auth.signOutDescription')
})
} catch (e) {
if (e instanceof Error) {
toast({
title: t('auth.errorSignOutTitle'),
description: t('auth.errorSignOutDescription'),
description: t('auth.errorSignOutDescription')
})
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/app/[locale]/user/discord-action/DiscordLinking.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client'

import { Link } from '@/navigation'
import { Link } from '@/i18n/routing'
import { DiscordLogoIcon } from '@radix-ui/react-icons'
import { useTranslations } from 'next-intl'
import { USER_PATHS } from '../userNavs'
Expand All @@ -10,7 +10,7 @@ import { useTransition, useEffect, useCallback, useState } from 'react'
import discordLinkAction from '@/actions/discord/discordLink'
import { cn } from '@/lib/utils'
import { useToast } from '@/components/ui/use-toast'
import { useRouter } from '@/navigation'
import { useRouter } from '@/i18n/routing'

export default function DiscordLinking() {
const t = useTranslations()
Expand All @@ -31,13 +31,13 @@ export default function DiscordLinking() {
} catch (e) {
toast({
title: t('settings.discordLink.errorTitle'),
description: t('settings.discordLink.errorDescription'),
description: t('settings.discordLink.errorDescription')
})
router.push(USER_PATHS.settings)
}
})
},
[toast, t, router],
[toast, t, router]
)

useEffect(() => {
Expand All @@ -53,7 +53,7 @@ export default function DiscordLinking() {
<DiscordLogoIcon
className={cn(
isLinked ? 'text-green-400' : 'text-zinc-500 dark:text-zinc-200',
'h-24 w-24',
'h-24 w-24'
)}
/>
<h1 className="text-2xl font-bold tracking-tight text-zinc-900 dark:text-white md:text-3xl">
Expand Down
9 changes: 5 additions & 4 deletions src/app/[locale]/user/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { auth } from '@/auth'
import { ModeToggle } from '@/components/config/ModeToggle'
import { redirect } from '@/navigation'
import { redirect } from '@/i18n/routing'
import UserMenu from './UserMenu'
import { LanguageToggle } from '@/components/config/LanguageToggle'
import UserModalNav from './ModalNav'
Expand All @@ -9,13 +9,14 @@ import { DEFAULT_PATHS } from '../(default)/defaultNavs'

type Props = {
children: React.ReactNode
params: { locale: string }
params: Promise<{ locale: string }>
}

export default async function UserLayout({ children }: Props) {
export default async function UserLayout({ children, params }: Props) {
const { locale } = await params
const session = await auth()
if (!session || !session.user?.id) {
redirect(DEFAULT_PATHS.home)
redirect({ href: DEFAULT_PATHS.home, locale })
}

return (
Expand Down
Loading

0 comments on commit 11c06dc

Please sign in to comment.