Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/next/src/server/lib/app-info-log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ export function logStartInfo({
: bold('⨯')
: '·'

const suffix = typeof exp.value === 'number' ? `: ${exp.value}` : ''
const suffix =
typeof exp.value === 'number' || typeof exp.value === 'string'
? `: ${JSON.stringify(exp.value)}`
: ''

const reason = exp.reason ? ` (${exp.reason})` : ''

Log.bootstrap(` ${symbol} ${exp.key}${suffix}${reason}`)
Expand Down
14 changes: 14 additions & 0 deletions test/integration/config-experimental-warning/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,20 @@ describe('Config Experimental Warning', () => {
expect(stdout).toMatch(' · cpus: 2')
})

it('should show the configured value for string features', async () => {
configFile.write(`
module.exports = {
experimental: {
ppr: 'incremental'
}
}
`)

const stdout = await collectStdoutFromDev(appDir)
expect(stdout).toMatch(experimentalHeader)
expect(stdout).toMatch(' · ppr: "incremental"')
})

it('should show warning with config from object with experimental and multiple keys', async () => {
configFile.write(`
module.exports = {
Expand Down