Skip to content

Commit

Permalink
chore(deps): update dependency next to v15 (#556)
Browse files Browse the repository at this point in the history
* chore(deps): update dependency next to v15

* fix: Next.js breaking change fix

`headers`/`params` awaited

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: akfm.sato <[email protected]>
  • Loading branch information
renovate[bot] and akfm.sato authored Nov 8, 2024
1 parent 2c4b2bf commit 3a77317
Show file tree
Hide file tree
Showing 12 changed files with 364 additions and 94 deletions.
2 changes: 1 addition & 1 deletion apps/example-next-basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@types/node": "22.9.0",
"@types/react": "18.3.12",
"@types/react-dom": "18.3.1",
"next": "14.2.17",
"next": "15.0.3",
"react": "18.3.1",
"react-dom": "18.3.1",
"typescript": "5.6.3",
Expand Down
4 changes: 2 additions & 2 deletions apps/example-next-basic/src/app/dynamic/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { List } from "@/components/List";
import { headers } from "next/headers";
import Link from "next/link";

export default function Page() {
const headersList = headers();
export default async function Page() {
const headersList = await headers();
const referer = headersList.get("referer");

return (
Expand Down
2 changes: 1 addition & 1 deletion apps/example-next-conform/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@conform-to/zod": "1.2.2",
"@location-state/core": "workspace:*",
"@location-state/conform": "workspace:*",
"next": "14.2.17",
"next": "15.0.3",
"react": "18.3.1",
"react-dom": "18.3.1",
"zod": "3.23.8"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import Form from "./form";

export default function Page({
params: { storeName },
}: { params: { storeName: string } }) {
export default async function Page({
params,
}: {
params: Promise<{ storeName: string }>;
}) {
const { storeName } = await params;

if (storeName !== "session" && storeName !== "url") {
throw new Error("Invalid storeName");
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import Form from "./form";

export default function Page({
params: { storeName },
}: { params: { storeName: string } }) {
export default async function Page({
params,
}: {
params: Promise<{ storeName: string }>;
}) {
const { storeName } = await params;

if (storeName !== "session" && storeName !== "url") {
throw new Error("Invalid storeName");
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import Form from "./form";

export default function Page({
params: { storeName },
}: { params: { storeName: string } }) {
export default async function Page({
params,
}: { params: Promise<{ storeName: string }> }) {
const { storeName } = await params;

if (storeName !== "session" && storeName !== "url") {
throw new Error("Invalid storeName");
}
Expand Down
2 changes: 1 addition & 1 deletion apps/example-next-custom-store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@types/node": "22.9.0",
"@types/react": "18.3.12",
"@types/react-dom": "18.3.1",
"next": "14.2.17",
"next": "15.0.3",
"qs": "6.13.0",
"react": "18.3.1",
"react-dom": "18.3.1",
Expand Down
4 changes: 2 additions & 2 deletions apps/example-next-custom-store/src/app/dynamic/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { List } from "@/components/List";
import { headers } from "next/headers";
import Link from "next/link";

export default function Page() {
const headersList = headers();
export default async function Page() {
const headersList = await headers();
const referer = headersList.get("referer");

return (
Expand Down
2 changes: 1 addition & 1 deletion apps/example-next-unsafe-navigation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@types/node": "22.9.0",
"@types/react": "18.3.12",
"@types/react-dom": "18.3.1",
"next": "14.2.17",
"next": "15.0.3",
"react": "18.3.1",
"react-dom": "18.3.1",
"typescript": "5.6.3",
Expand Down
4 changes: 2 additions & 2 deletions apps/example-next-unsafe-navigation/src/app/dynamic/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { List } from "@/components/List";
import { headers } from "next/headers";
import Link from "next/link";

export default function Page() {
const headersList = headers();
export default async function Page() {
const headersList = await headers();
const referer = headersList.get("referer");

return (
Expand Down
4 changes: 2 additions & 2 deletions packages/location-state-next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@
"@repo/configs": "workspace:*",
"@types/react": "18.3.12",
"navigation-api-types": "0.5.1",
"next": "14.2.17",
"next": "15.0.3",
"react": "18.3.1"
},
"peerDependencies": {
"next": "^13.0.0 || ^14.0.0",
"next": "^13.0.0 || ^14.0.0 || ^15.0.0",
"react": "^18.2.0"
}
}
Loading

0 comments on commit 3a77317

Please sign in to comment.