@@ -513,14 +513,18 @@ function describeNameArg(arg: unknown) {
...
@@ -513,14 +513,18 @@ function describeNameArg(arg: unknown) {
functionwarnForSyncIteration(route?:string){
functionwarnForSyncIteration(route?:string){
constprefix=route?` In route ${route} `:''
constprefix=route?` In route ${route} `:''
console.error(
console.error(
`${prefix}cookies were iterated implicitly with something like \`for...of cookies())\` or \`[...cookies()]\`, or explicitly with \`cookies()[Symbol.iterator]()\`. \`cookies()\` now returns a Promise and the return value should be awaited before attempting to iterate over cookies. In this version of Next.js iterating cookies without awaiting first is still supported to facilitate migration but in a future version you will be required to await the result. If this \`cookies()\` use is inside an async function await the return value before accessing attempting iteration. If this use is inside a synchronous function then convert the function to async or await the call from outside this function and pass the result in.`
`${prefix}cookies were iterated over. `+
`\`cookies()\` should be awaited before using its value. `+
`${prefix}cookie property was accessed directly with \`${expression}\`. \`cookies()\` now returns a Promise and the return value should be awaited before accessing properties of the underlying cookies instance. In this version of Next.js direct access to \`${expression}\` is still supported to facilitate migration but in a future version you will be required to await the result. If this \`cookies()\` use is inside an async function await the return value before accessing attempting iteration. If this use is inside a synchronous function then convert the function to async or await the call from outside this function and pass the result in.`
`${prefix}cookie property was accessed directly with \`${expression}\`. `+
`\`cookies()\` should be awaited before using its value. `+
`${prefix}\`draftMode()\` property was accessed directly with \`${expression}\`. \`draftMode()\` now returns a Promise and the return value should be awaited before accessing properties of the underlying draftMode object. In this version of Next.js direct access to \`${expression}\` is still supported to facilitate migration but in a future version you will be required to await the result. If this \`draftMode()\` use is inside an async function await the return value before accessing attempting iteration. If this use is inside a synchronous function then convert the function to async or await the call from outside this function and pass the result in.`
`${prefix}\`draftMode()\` property was accessed directly with \`${expression}\`. `+
`\`draftMode()\` should be awaited before using its value. `+
@@ -428,14 +428,18 @@ function describeNameArg(arg: unknown) {
...
@@ -428,14 +428,18 @@ function describeNameArg(arg: unknown) {
functionwarnForSyncIteration(route?:string){
functionwarnForSyncIteration(route?:string){
constprefix=route?` In route ${route} `:''
constprefix=route?` In route ${route} `:''
console.error(
console.error(
`${prefix}headers were iterated implicitly with something like \`for...of headers())\` or \`[...headers()]\`, or explicitly with \`headers()[Symbol.iterator]()\`. \`headers()\` now returns a Promise and the return value should be awaited before attempting to iterate over headers. In this version of Next.js iterating headers without awaiting first is still supported to facilitate migration but in a future version you will be required to await the result. If this \`headers()\` use is inside an async function await the return value before accessing attempting iteration. If this use is inside a synchronous function then convert the function to async or await the call from outside this function and pass the result in.`
`${prefix}headers were iterated over. `+
`\`headers()\` should be awaited before using its value. `+
`${prefix}header property was accessed directly with \`${expression}\`. \`headers()\` now returns a Promise and the return value should be awaited before accessing properties of the underlying headers instance. In this version of Next.js direct access to \`${expression}\` is still supported to facilitate migration but in a future version you will be required to await the result. If this \`headers()\` use is inside an async function await the return value before accessing attempting iteration. If this use is inside a synchronous function then convert the function to async or await the call from outside this function and pass the result in.`
`${prefix}header property was accessed directly with \`${expression}\`. `+
`\`headers()\` should be awaited before using its value. `+
@@ -130,11 +130,15 @@ function warnForEnumeration(missingProperties: Array<string>) {
...
@@ -130,11 +130,15 @@ function warnForEnumeration(missingProperties: Array<string>) {
constdescribedMissingProperties=
constdescribedMissingProperties=
describeListOfPropertyNames(missingProperties)
describeListOfPropertyNames(missingProperties)
console.error(
console.error(
`params are being enumerated incompletely with \`{...params}\`, \`Object.keys(params)\`, or similar. The following properties were not copied: ${describedMissingProperties}. \`params\` is now a Promise, however in the current version of Next.js direct access to the underlying params object is still supported to facilitate migration to the new type. param names that conflict with Promise properties cannot be accessed directly and must be accessed by first unwrapping the \`params\` promise with \`React.use()\`.`
`params are being enumerated incompletely missing these properties: ${describedMissingProperties}. `+
`\`params\` should be unwrapped with \`React.use()\` before using its value. `+
`params are being enumerated with \`{...params}\`, \`Object.keys(params)\`, or similar. \`params\` is now a Promise, however in the current version of Next.js direct access to the underlying params object is still supported to facilitate migration to the new type. You should update your code to unwrap \`params\` with \`React.use()\` before accessing its properties.`
`params are being enumerated. `+
`\`params\` should be unwrapped with \`React.use()\` before using its value. `+
`${prefix}param property was accessed directly with ${expression}. \`params\` is now a Promise and should be awaited before accessing properties of the underlying params object. In this version of Next.js direct access to param properties is still supported to facilitate migration but in a future version you will be required to await \`params\`. If this use is inside an async function await it. If this use is inside a synchronous function then convert the function to async or await it from outside this function and pass the result in.`
`${prefix}param property was accessed directly with ${expression}. `+
`\`params\` should be awaited before accessing its properties. `+
@@ -511,11 +513,15 @@ function warnForEnumeration(
...
@@ -511,11 +513,15 @@ function warnForEnumeration(
constdescribedMissingProperties=
constdescribedMissingProperties=
describeListOfPropertyNames(missingProperties)
describeListOfPropertyNames(missingProperties)
console.error(
console.error(
`${prefix}params are being enumerated incompletely with \`{...params}\`, \`Object.keys(params)\`, or similar. The following properties were not copied: ${describedMissingProperties}. \`params\` is now a Promise, however in the current version of Next.js direct access to the underlying params object is still supported to facilitate migration to the new type. param names that conflict with Promise properties cannot be accessed directly and must be accessed by first awaiting the \`params\` promise.`
`${prefix}params are being enumerated incompletely missing these properties: ${describedMissingProperties}. `+
`\`params\` should be awaited before accessing its properties. `+
`${prefix}params are being enumerated with \`{...params}\`, \`Object.keys(params)\`, or similar. \`params\` is now a Promise, however in the current version of Next.js direct access to the underlying params object is still supported to facilitate migration to the new type. You should update your code to await \`params\` before accessing its properties.`
`${prefix}params are being enumerated. `+
`\`params\` should be awaited before accessing its properties. `+
@@ -121,12 +121,16 @@ function makeUntrackedExoticSearchParams(
...
@@ -121,12 +121,16 @@ function makeUntrackedExoticSearchParams(
functionwarnForSyncAccess(expression:string){
functionwarnForSyncAccess(expression:string){
console.error(
console.error(
`A searchParam property was accessed directly with ${expression}. \`searchParams\` is now a Promise and should be unwrapped with \`React.use()\` before accessing properties of the underlying searchParams object. In this version of Next.js direct access to searchParam properties is still supported to facilitate migration but in a future version you will be required to unwrap \`searchParams\` with \`React.use()\`.`
`A searchParam property was accessed directly with ${expression}. `+
`\`searchParams\` should be unwrapped with \`React.use()\` before accessing its properties. `+
`the keys of \`searchParams\` were accessed through something like \`Object.keys(searchParams)\` or \`{...searchParams}\`. \`searchParams\` is now a Promise and should be unwrapped with \`React.use()\` in Client Components before accessing properties of the underlying searchParams object. In this version of Next.js direct access to searchParam properties is still supported to facilitate migration but in a future version you will be required to unwrap \`searchParams\` with \`React.use()\`.`
`The keys of \`searchParams\` were accessed directly. `+
`\`searchParams\` should be unwrapped with \`React.use()\` before accessing its properties. `+
`${prefix}searchParam property was accessed directly with ${expression}. \`searchParams\` is now a Promise and should be awaited before accessing properties of the underlying searchParams object. In this version of Next.js direct access to searchParam properties is still supported to facilitate migration but in a future version you will be required to await \`searchParams\`. If this use is inside an async function await it. If this use is inside a synchronous function then convert the function to async or await it from outside this function and pass the result in.`
`${prefix}searchParam property was accessed directly with ${expression}. `+
`\`searchParams\` should be awaited before accessing properties. `+
@@ -673,11 +675,15 @@ function warnForEnumeration(
...
@@ -673,11 +675,15 @@ function warnForEnumeration(
constdescribedMissingProperties=
constdescribedMissingProperties=
describeListOfPropertyNames(missingProperties)
describeListOfPropertyNames(missingProperties)
console.error(
console.error(
`${prefix}searchParams are being enumerated incompletely with \`{...searchParams}\`, \`Object.keys(searchParams)\`, or similar. The following properties were not copied: ${describedMissingProperties}. \`searchParams\` is now a Promise, however in the current version of Next.js direct access to the underlying searchParams object is still supported to facilitate migration to the new type. search parameter names that conflict with Promise properties cannot be accessed directly and must be accessed by first awaiting the \`searchParams\` promise.`
`${prefix}searchParams are being enumerated incompletely missing these properties: ${describedMissingProperties}. `+
`\`searchParams\` should be awaited before accessing its properties. `+
`${prefix}searchParams are being enumerated with \`{...searchParams}\`, \`Object.keys(searchParams)\`, or similar. \`searchParams\` is now a Promise, however in the current version of Next.js direct access to the underlying searchParams object is still supported to facilitate migration to the new type. You should update your code to await \`searchParams\` before accessing its properties.`
`${prefix}searchParams are being enumerated. `+
`\`searchParams\` should be awaited before accessing its properties. `+