Skip to content

Commit 1ca7e56

Browse files
chore(deps): update nextjs monorepo to v15 (major) (#270)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Yuta Hiroto <[email protected]>
1 parent 1345f04 commit 1ca7e56

File tree

42 files changed

+456
-180
lines changed

Some content is hidden

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

42 files changed

+456
-180
lines changed

next.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const nextConfig = {
88
transpilePackages: ["shiki"],
99
experimental: {
1010
taint: true,
11+
// typedRoutes: true,
1112
},
1213
async redirects() {
1314
return [

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
"check": "biome check --apply ."
1616
},
1717
"dependencies": {
18-
"@next/third-parties": "^14.2.16",
18+
"@next/third-parties": "^15.0.1",
1919
"@shikijs/transformers": "^1.22.2",
2020
"algoliasearch": "^4.24.0",
2121
"instantsearch.js": "^4.75.3",
22-
"next": "14.2.16",
22+
"next": "15.0.1",
2323
"react": "^18.3.1",
2424
"react-dom": "^18.3.1",
2525
"react-instantsearch": "^7.13.6",

pnpm-lock.yaml

Lines changed: 336 additions & 81 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app/_components/fileTree.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export function FileTree({ exampleName, filePaths, code, isIframe }: Props) {
4444
const initialCandidate = `${exampleName}/page.tsx`;
4545
const initialPath =
4646
filePathFromParams ??
47-
(paths.includes(initialCandidate) ? initialCandidate : paths[0] ?? "");
47+
(paths.includes(initialCandidate) ? initialCandidate : (paths[0] ?? ""));
4848
const [selectedPath, setSelectedPath] = useState(initialPath);
4949
const tree = createTree(paths);
5050

src/app/_components/link.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import NextLink, { type LinkProps } from "next/link";
22
import type { PropsWithChildren } from "react";
33

4-
type Props = PropsWithChildren<LinkProps>;
4+
type Props = PropsWithChildren<LinkProps<unknown>>;
55

66
export function Link({ children, ...rest }: Props) {
77
return (

src/app/examples/(caching)/router-cache/[id]/page.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ import { notFound } from "next/navigation";
44
import { TITLES } from "../constants";
55

66
type Props = {
7-
params: {
7+
params: Promise<{
88
id: string;
9-
};
9+
}>;
1010
};
1111

12-
export default function Page({ params }: Props) {
13-
const title = TITLES[Number(params.id)];
12+
export default async function Page({ params }: Props) {
13+
const { id } = await params;
14+
const title = TITLES[Number(id)];
1415

1516
if (!title) {
1617
return notFound();

src/app/examples/(dynamic-routes)/dynamic-optional-multiple/[[...slug]]/page.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
import { Link } from "@/app/_components/link";
22

33
type Props = {
4-
params: {
4+
params: Promise<{
55
slug: string[];
6-
};
6+
}>;
77
};
88

9-
export default function Page({ params }: Props) {
9+
export default async function Page({ params }: Props) {
10+
const { slug } = await params;
11+
1012
return (
1113
<div className="flex flex-col gap-4">
12-
<span>slug: {JSON.stringify(params.slug)}</span>
14+
<span>slug: {JSON.stringify(slug)}</span>
1315
<Link href="/examples/dynamic-optional-multiple/one">
1416
👍 /dynamic-optional-multiple/one
1517
</Link>

src/app/examples/(dynamic-routes)/dynamic-required-multiple/[...slug]/page.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
import { Link } from "@/app/_components/link";
22

33
type Props = {
4-
params: {
4+
params: Promise<{
55
slug: string[];
6-
};
6+
}>;
77
};
88

9-
export default function Page({ params }: Props) {
9+
export default async function Page({ params }: Props) {
10+
const { slug } = await params;
11+
1012
return (
1113
<div className="flex flex-col gap-4">
12-
<span>slug: {JSON.stringify(params.slug)}</span>
14+
<span>slug: {JSON.stringify(slug)}</span>
1315
<Link href="/examples/dynamic-required-multiple/one">
1416
👍 /dynamic-required-multiple/one
1517
</Link>
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
type Props = {
2-
params: {
2+
params: Promise<{
33
slug: string;
4-
};
4+
}>;
55
};
66

7-
export default function Page({ params }: Props) {
8-
return <span>slug: {params.slug}</span>;
7+
export default async function Page({ params }: Props) {
8+
const { slug } = await params;
9+
10+
return <span>slug: {slug}</span>;
911
}

src/app/examples/(metadata)/generating-opengraph-image/[slug]/opengraph-image.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ export const size = {
88
export const contentType = "image/png";
99

1010
type Props = {
11-
params: {
11+
params: Promise<{
1212
slug: string;
13-
};
13+
}>;
1414
};
1515

1616
export default async function Image({ params }: Props) {
17+
const { slug } = await params;
18+
1719
return new ImageResponse(
1820
<div
1921
style={{
@@ -26,7 +28,7 @@ export default async function Image({ params }: Props) {
2628
justifyContent: "center",
2729
}}
2830
>
29-
{alt} {params.slug}
31+
{alt} {slug}
3032
</div>,
3133
);
3234
}

0 commit comments

Comments
 (0)