Skip to content

Commit

Permalink
Merge pull request #267 from DNDACADEMY/develop
Browse files Browse the repository at this point in the history
chore(deps): next.js v15 & react 19 마이그레이션
  • Loading branch information
saseungmin authored Dec 15, 2024
2 parents 47703f4 + 1a312e5 commit 4133d1a
Show file tree
Hide file tree
Showing 255 changed files with 1,077 additions and 1,725 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/depd-npm-2.0.0-b6c51a4b43-c0c8ff3607.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/etag-npm-1.8.1-54a3b989d9-571aeb3dbe.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/mime-npm-1.6.0-60ae95038a-b7d98bb1e0.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/ms-npm-2.0.0-9e1101a471-0e6a22b8b7.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/vary-npm-1.1.2-b49f70ae63-31389debef.zip
Binary file not shown.
8 changes: 8 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,11 @@ enableGlobalCache: false
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.5.3.cjs

packageExtensions:
"react@*":
dependencies:
"@types/react": "19.0.1"
"react-dom@*":
dependencies:
"@types/react-dom": "19.0.2"
1 change: 0 additions & 1 deletion apps/admin/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ const nextConfig = {
},
],
},
swcMinify: true,
experimental: {
typedRoutes: true,
},
Expand Down
20 changes: 10 additions & 10 deletions apps/admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,30 @@
"dependencies": {
"@dnd-academy/core": "workspace:*",
"@dnd-academy/ui": "workspace:*",
"@tanstack/react-query": "5.52.0",
"@tanstack/react-query": "5.62.7",
"@vercel/blob": "0.23.4",
"clsx": "2.1.1",
"google-auth-library": "9.15.0",
"google-spreadsheet": "4.1.4",
"motion": "11.11.17",
"next": "14.2.15",
"next-auth": "5.0.0-beta.19",
"react": "18.3.1",
"react-dom": "18.3.1",
"motion": "11.14.4",
"next": "15.0.4",
"next-auth": "5.0.0-beta.25",
"react": "19.0.0",
"react-dom": "19.0.0",
"react-perfect-scrollbar": "1.5.8"
},
"devDependencies": {
"@dnd-academy/eslint-config": "workspace:*",
"@next/eslint-plugin-next": "14.2.15",
"@next/eslint-plugin-next": "15.0.4",
"@testing-library/dom": "10.3.1",
"@testing-library/jest-dom": "6.4.6",
"@testing-library/react": "16.0.0",
"@testing-library/react": "16.1.0",
"@types/identity-obj-proxy": "^3",
"@types/jest": "29.5.9",
"@types/jest-plugin-context": "2.9.7",
"@types/node": "20",
"@types/react": "18.3.2",
"@types/react-dom": "18.3.0",
"@types/react": "19.0.1",
"@types/react-dom": "19.0.2",
"@typescript-eslint/eslint-plugin": "7.9.0",
"@typescript-eslint/parser": "7.9.0",
"eslint": "8.56.0",
Expand Down
4 changes: 3 additions & 1 deletion apps/admin/src/app/api/blob/latest/[name]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import { api, ApiError, getLatestItemReduce } from '@dnd-academy/core';
import { list } from '@vercel/blob';

// eslint-disable-next-line import/prefer-default-export
export async function GET(_: NextRequest, { params }: { params: { name: string } }) {
export async function GET(_: NextRequest, props: { params: Promise<{ name: string }> }) {
const params = await props.params;

if (!params?.name) {
return NextResponse.json(null, {
status: 400,
Expand Down
2 changes: 1 addition & 1 deletion apps/admin/src/app/current-applicant-count/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import CurrentApplicantCountAction from '@/components/CurrentApplicantCountActio
import styles from './page.module.scss';

async function Page() {
const headersList = headers();
const headersList = await headers();
const host = headersList.get('host');

const protocol = process.env.NODE_ENV === 'production' ? 'https' : 'http';
Expand Down
5 changes: 3 additions & 2 deletions apps/admin/src/app/login/page.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import SignIn from '@/components/auth/SignIn';

type Props = {
searchParams: { [key: string]: string | undefined; };
searchParams: Promise<{ [key: string]: string | undefined; }>;
};

async function LoginPage({ searchParams }: Props) {
const params = await searchParams;
return (
<>
<div>login</div>
{searchParams?.error === 'unauthorized_email' && (
{params?.error === 'unauthorized_email' && (
<div>
접근이 불가능한 이메일 입니다.
</div>
Expand Down
2 changes: 1 addition & 1 deletion apps/admin/src/app/total-count-status/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import TotalCountStatusForm from '@/components/TotalCountStatusForm';
import styles from './page.module.scss';

async function Page() {
const headersList = headers();
const headersList = await headers();
const host = headersList.get('host');

const protocol = process.env.NODE_ENV === 'production' ? 'https' : 'http';
Expand Down
4 changes: 2 additions & 2 deletions apps/admin/src/components/TotalCountStatusForm/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';

import { useFormState } from 'react-dom';
import { useActionState } from 'react';

import { type TotalCountStatus } from '@dnd-academy/core';
import clsx from 'clsx';
Expand All @@ -15,7 +15,7 @@ type Props = {
};

function TotalCountStatusForm({ initialTotalCountStatus }: Props) {
const [state, formAction] = useFormState(totalCountStatusAction, null);
const [state, formAction] = useActionState(totalCountStatusAction, null);

const {
cumulativeApplicants, dropouts, totalParticipants, totalProjects,
Expand Down
2 changes: 1 addition & 1 deletion apps/admin/src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { NextResponse } from 'next/server';
import { auth as middleware } from '@/auth';
import { isEmailAllowed } from '@/utils';

export default middleware((req) => {
export default middleware((req: any) => {
if (req.nextUrl.pathname === '/login' || process.env.NODE_ENV === 'development') {
return NextResponse.next({
request: req,
Expand Down
2 changes: 1 addition & 1 deletion apps/web/@types/svg.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
declare module '*.svg' {
const content: React.FunctionComponent<React.SVGAttributes<SVGElement>>;
const content: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;

export default content;
}
1 change: 0 additions & 1 deletion apps/web/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ const nextConfig = {
},
],
},
swcMinify: true,
experimental: {
typedRoutes: true,
},
Expand Down
36 changes: 18 additions & 18 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@
"@channel.io/channel-web-sdk-loader": "1.1.7",
"@dnd-academy/core": "workspace:*",
"@dnd-academy/ui": "workspace:*",
"@next/third-parties": "14.2.15",
"@next/third-parties": "15.0.4",
"@vercel/blob": "0.23.4",
"clsx": "2.1.1",
"dayjs": "1.11.11",
"motion": "11.11.17",
"next": "14.2.15",
"react": "18.3.1",
"motion": "11.14.4",
"next": "15.0.4",
"react": "19.0.0",
"react-countup": "6.5.3",
"react-dom": "18.3.1",
"react-dom": "19.0.0",
"react-fast-marquee": "1.6.4",
"react-pdf": "9.1.1",
"react-perfect-scrollbar": "1.5.8",
Expand All @@ -59,26 +59,26 @@
"@chromatic-com/storybook": "2.0.2",
"@codecov/nextjs-webpack-plugin": "1.2.0",
"@dnd-academy/eslint-config": "workspace:*",
"@next/env": "14.2.15",
"@next/eslint-plugin-next": "14.2.15",
"@storybook/addon-essentials": "8.3.3",
"@storybook/addon-interactions": "8.3.3",
"@storybook/addon-links": "8.3.3",
"@storybook/blocks": "8.3.3",
"@storybook/nextjs": "8.3.3",
"@storybook/react": "8.3.3",
"@storybook/test": "8.3.3",
"@next/env": "15.0.4",
"@next/eslint-plugin-next": "15.0.4",
"@storybook/addon-essentials": "8.4.7",
"@storybook/addon-interactions": "8.4.7",
"@storybook/addon-links": "8.4.7",
"@storybook/blocks": "8.4.7",
"@storybook/nextjs": "8.4.7",
"@storybook/react": "8.4.7",
"@storybook/test": "8.4.7",
"@svgr/webpack": "8.1.0",
"@testing-library/dom": "10.3.1",
"@testing-library/jest-dom": "6.4.6",
"@testing-library/react": "16.0.0",
"@testing-library/react": "16.1.0",
"@types/identity-obj-proxy": "^3",
"@types/jest": "29.5.9",
"@types/jest-plugin-context": "2.9.7",
"@types/node": "20",
"@types/prop-types": "^15",
"@types/react": "18.3.2",
"@types/react-dom": "18.3.0",
"@types/react": "19.0.1",
"@types/react-dom": "19.0.2",
"@types/react-responsive-masonry": "^2",
"@typescript-eslint/eslint-plugin": "7.9.0",
"@typescript-eslint/parser": "7.9.0",
Expand Down Expand Up @@ -108,7 +108,7 @@
"sass": "1.69.6",
"sass-loader": "12.6.0",
"start-server-and-test": "1.14.0",
"storybook": "8.3.3",
"storybook": "8.4.7",
"typescript": "5.2.2",
"webpack": "5.95.0"
}
Expand Down
4 changes: 3 additions & 1 deletion apps/web/src/app/api/blob/latest/[name]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import { api, ApiError, getLatestItemReduce } from '@dnd-academy/core';
import { list } from '@vercel/blob';

// eslint-disable-next-line import/prefer-default-export
export async function GET(_: NextRequest, { params }: { params: { name: string } }) {
export async function GET(_: NextRequest, props: { params: Promise<{ name: string }> }) {
const params = await props.params;

if (!params?.name) {
return NextResponse.json(null, {
status: 400,
Expand Down
4 changes: 3 additions & 1 deletion apps/web/src/app/dnd/about/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { Metadata } from 'next';

import AboutPage from '@/components/pages/AboutPage';
import METADATA from '@/lib/constants/metadata';

const title = '소개 - DND';

export const metadata = {
export const metadata: Metadata = {
metadataBase: METADATA.metadataBase,
title,
openGraph: {
Expand Down
4 changes: 3 additions & 1 deletion apps/web/src/app/dnd/culture/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { Metadata } from 'next';

import CulturePage from '@/components/pages/CulturePage';
import METADATA from '@/lib/constants/metadata';

const title = '문화 - DND';

export const metadata = {
export const metadata: Metadata = {
metadataBase: METADATA.metadataBase,
title,
openGraph: {
Expand Down
6 changes: 4 additions & 2 deletions apps/web/src/app/jobs/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ type SearchParams = {
flag: string | undefined;
};

function Page({ searchParams }: { searchParams?: SearchParams; }) {
const jobs = getJobs({ flag: searchParams?.flag });
async function Page({ searchParams }: { searchParams?: Promise<SearchParams>; }) {
const params = await searchParams;

const jobs = getJobs({ flag: params?.flag });

return (
<JobsPage jobs={jobs} />
Expand Down
12 changes: 7 additions & 5 deletions apps/web/src/app/organizers/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ import METADATA, { DEFAULT_METADATA } from '@/lib/constants/metadata';
export const dynamicParams = false;

type Props = {
params: {
params: Promise<{
id: string;
};
}>;
};

export function generateMetadata({ params }: Props): Metadata {
export async function generateMetadata(props: Props): Promise<Metadata> {
const params = await props.params;
const organizer = getOrganizer({ id: Number(params.id) });

if (!organizer) {
Expand Down Expand Up @@ -53,8 +54,9 @@ export function generateStaticParams() {
}));
}

function Page({ params }: Props) {
const organizer = getOrganizer({ id: Number(params.id) });
async function Page({ params }: Props) {
const resolvedParams = await params;
const organizer = getOrganizer({ id: Number(resolvedParams.id) });

if (!organizer) {
notFound();
Expand Down
10 changes: 7 additions & 3 deletions apps/web/src/app/organizers/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { Metadata } from 'next';

import { PageTitle } from '@dnd-academy/ui';

import ShareAlarmSection from '@/components/organisms/ShareAlarmSection';
Expand All @@ -7,7 +9,7 @@ import METADATA from '@/lib/constants/metadata';

const title = '운영진 - DND';

export const metadata = {
export const metadata: Metadata = {
metadataBase: METADATA.metadataBase,
title,
openGraph: {
Expand All @@ -25,8 +27,10 @@ type SearchParams = {
position: string | undefined;
};

function Page({ searchParams }: { searchParams?: SearchParams; }) {
const organizers = getOrganizers({ position: searchParams?.position, isArchived: false });
async function Page({ searchParams }: { searchParams?: Promise<SearchParams>; }) {
const params = await searchParams;

const organizers = getOrganizers({ position: params?.position, isArchived: false });

return (
<>
Expand Down
6 changes: 4 additions & 2 deletions apps/web/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ export const metadata = DEFAULT_METADATA;
type ParamsKey = 'tab';

type Props = {
searchParams: Record<ParamsKey, string | undefined>;
searchParams: Promise<Record<ParamsKey, string | undefined>>;
};

async function Home({ searchParams }: Props) {
const params = await searchParams;

const faqData = await api<FAQ[]>({
url: '/faq.json',
type: 'blob',
Expand All @@ -23,7 +25,7 @@ async function Home({ searchParams }: Props) {

return (
<HomePage
tab={searchParams.tab}
tab={params.tab}
eventStatus={eventStatus}
faqItems={faqData}
applicantTotalCount={applicantCount.total}
Expand Down
12 changes: 7 additions & 5 deletions apps/web/src/app/projects/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ import METADATA, { DEFAULT_METADATA } from '@/lib/constants/metadata';
export const dynamicParams = false;

type Props = {
params: {
params: Promise<{
id: string;
};
}>;
};

export function generateMetadata({ params }: Props): Metadata {
export async function generateMetadata(props: Props): Promise<Metadata> {
const params = await props.params;
const project = getProject({ id: Number(params.id) });

if (!project) {
Expand Down Expand Up @@ -52,8 +53,9 @@ export function generateStaticParams() {
}));
}

function Page({ params }: Props) {
const project = getProject({ id: Number(params.id) });
async function Page({ params }: Props) {
const resolvedParams = await params;
const project = getProject({ id: Number(resolvedParams.id) });

if (!project) {
notFound();
Expand Down
Loading

0 comments on commit 4133d1a

Please sign in to comment.