"1461":"Expected segment cache to have data for stage '%s'",
"1462":"Unexpected chunk emitted in Before stage",
"1463":"\\`experimental.turbopackGenerateComponentChunks\\` has been moved to \\`experimental.turbopackChunking.generateComponentChunks\\`. Please update your next.config.js file accordingly.",
"1464":"\\`experimental.turbopackChunkingHeuristics\\` has been renamed to \\`experimental.turbopackChunking\\`. Please update your next.config.js file accordingly."
"1464":"\\`experimental.turbopackChunkingHeuristics\\` has been renamed to \\`experimental.turbopackChunking\\`. Please update your next.config.js file accordingly.",
"1465":"\\`experimental.useCache\\` cannot be disabled when \\`cacheComponents\\` is enabled, because Cache Components relies on the \\`\"use cache\"\\` directive. Please remove it from %s."
`\`experimental.useCache\` cannot be disabled when \`cacheComponents\` is enabled, because Cache Components relies on the \`"use cache"\` directive. Please remove it from ${configFileName}.`
)
}
if(!silent){
if(result.cacheComponents){
Log.warnOnce(
`\`experimental.useCache\` is no longer needed, because \`cacheComponents\` already enables the \`"use cache"\` directive. You can remove it from ${configFileName}.`
)
}else{
Log.warnOnce(
`\`experimental.useCache\` is deprecated. Please use the top-level \`cacheComponents\` option instead in ${configFileName}.`
)
}
}
}
// "use cache" was originally implicitly enabled with the cacheComponents flag, so
// we transfer the value for cacheComponents to the explicit useCache flag to ensure
it('should warn that the `experimental.useCache` config option is deprecated',async()=>{
// The fixture enables `experimental.useCache`, so the warning is emitted
// when the server loads the config, shortly after it reports readiness.
// Which of the two variants is printed depends on whether `cacheComponents`
// already enables the directive.
awaitretry(async()=>{
expect(stripAnsi(next.cliOutput)).toContain(
withCacheComponents
?'`experimental.useCache` is no longer needed, because `cacheComponents` already enables the `"use cache"` directive. You can remove it from next.config.js.'
:'`experimental.useCache` is deprecated. Please use the top-level `cacheComponents` option instead in next.config.js.'