File tree Expand file tree Collapse file tree 9 files changed +495
-98
lines changed Expand file tree Collapse file tree 9 files changed +495
-98
lines changed Original file line number Diff line number Diff line change @@ -2,12 +2,13 @@ import { getSong } from "@example/shared/api";
22import Modal from "@example/shared/components/Modal" ;
33
44type Props = {
5- params : {
5+ params : Promise < {
66 album : string ;
77 song : string ;
8- } ;
8+ } > ;
99} ;
10- export default async function SongPage ( { params } : Props ) {
10+ export default async function SongPage ( props : Props ) {
11+ const params = await props . params ;
1112 const song = await getSong ( params . album , params . song ) ;
1213 return (
1314 < Modal >
Original file line number Diff line number Diff line change 11import Modal from "@example/shared/components/Modal" ;
22
33type Props = {
4- params : {
4+ params : Promise < {
55 artist : string ;
6- } ;
6+ } > ;
77} ;
8- export default function ArtistPage ( { params } : Props ) {
8+ export default async function ArtistPage ( props : Props ) {
9+ const params = await props . params ;
910 return < Modal > Artists { params . artist } </ Modal > ;
1011}
Original file line number Diff line number Diff line change 11import { getSong } from "@example/shared/api" ;
22
33type Props = {
4- params : {
4+ params : Promise < {
55 album : string ;
66 song : string ;
7- } ;
7+ } > ;
88} ;
9- export default async function Song ( { params } : Props ) {
9+ export default async function Song ( props : Props ) {
10+ const params = await props . params ;
1011 const song = await getSong ( params . album , params . song ) ;
1112
1213 return (
Original file line number Diff line number Diff line change 11import { headers } from "next/headers" ;
22
3- export default function Headers ( ) {
4- const middlewareHeader = headers ( ) . get ( "request-header" ) ;
3+ export default async function Headers ( ) {
4+ const middlewareHeader = ( await headers ( ) ) . get ( "request-header" ) ;
55 return (
66 < div >
77 < h1 > Headers</ h1 >
Original file line number Diff line number Diff line change 11import { headers } from "next/headers" ;
22
3- export default function SearchQuery ( {
4- searchParams : propsSearchParams ,
5- } : {
6- searchParams : Record < string , string | string [ ] > ;
3+ export default async function SearchQuery ( props : {
4+ searchParams : Promise < Record < string , string | string [ ] > > ;
75} ) {
8- const mwSearchParams = headers ( ) . get ( "search-params" ) ;
6+ const propsSearchParams = await props . searchParams ;
7+ const mwSearchParams = ( await headers ( ) ) . get ( "search-params" ) ;
98 const multiValueParams = propsSearchParams [ "multi" ] ;
109 const multiValueArray = Array . isArray ( multiValueParams )
1110 ? multiValueParams
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ async function getTime() {
1313
1414export default async function SSR ( ) {
1515 const time = await getTime ( ) ;
16- const headerList = headers ( ) ;
16+ const headerList = await headers ( ) ;
1717 return (
1818 < div >
1919 < h1 > Time: { time } </ h1 >
Original file line number Diff line number Diff line change 1- /** @type {import('next').NextConfig } */
2- const nextConfig = {
1+ import type { NextConfig } from "next" ;
2+
3+ const nextConfig : NextConfig = {
34 poweredByHeader : false ,
45 cleanDistDir : true ,
56 transpilePackages : [ "@example/shared" ] ,
67 output : "standalone" ,
7- outputFileTracing : "../sst" ,
8- experimental : {
9- serverActions : true ,
10- } ,
8+ outputFileTracingRoot : "../sst" ,
119 eslint : {
1210 ignoreDuringBuilds : true ,
1311 } ,
@@ -19,7 +17,7 @@ const nextConfig = {
1917 } ,
2018 ] ,
2119 } ,
22- redirects : ( ) => {
20+ redirects : async ( ) => {
2321 return [
2422 {
2523 source : "/next-config-redirect-missing" ,
@@ -60,7 +58,7 @@ const nextConfig = {
6058 } ,
6159 ] ;
6260 } ,
63- headers ( ) {
61+ async headers ( ) {
6462 return [
6563 {
6664 source : "/(.*)" ,
@@ -75,4 +73,4 @@ const nextConfig = {
7573 } ,
7674} ;
7775
78- module . exports = nextConfig ;
76+ export default nextConfig ;
Original file line number Diff line number Diff line change 1313 "dependencies" : {
1414 "@example/shared" : " workspace:*" ,
1515 "@open-next/utils" : " workspace:*" ,
16- "next" : " ^14.1.4 " ,
16+ "next" : " 15.0.0 " ,
1717 "@opennextjs/aws" : " workspace:*" ,
18- "react" : " latest " ,
19- "react-dom" : " latest "
18+ "react" : " 19.0.0-rc-65a56d0e-20241020 " ,
19+ "react-dom" : " 19.0.0-rc-65a56d0e-20241020 "
2020 },
2121 "devDependencies" : {
2222 "@types/node" : " 20.5.0" ,
23- "@types/react" : " 18.2.20 " ,
24- "@types/react-dom" : " 18.2.7 " ,
23+ "@types/react" : " npm:types-react@19.0.0-rc.1 " ,
24+ "@types/react-dom" : " npm:types-react-dom@19.0.0-rc.1 " ,
2525 "autoprefixer" : " 10.4.15" ,
2626 "postcss" : " 8.4.27" ,
2727 "tailwindcss" : " 3.3.3" ,
2828 "typescript" : " ^4.9.3"
29+ },
30+ "pnpm" : {
31+ "overrides" : {
32+ "@types/react" : " npm:types-react@19.0.0-rc.1" ,
33+ "@types/react-dom" : " npm:types-react-dom@19.0.0-rc.1"
34+ }
2935 }
3036}
You can’t perform that action at this time.
0 commit comments