Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
8 changes: 4 additions & 4 deletions packages/next/src/server/config-shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export type NextConfigComplete = Required<Omit<NextConfig, 'configFile'>> & {
prefetchInlining?: PrefetchInliningConfig
// Normalized by config.ts: defaulted to 90% of staticPageGenerationTimeout
useCacheTimeout: number
// Normalized by config.ts `finalizeConfig`: defaulted to `'manual-warning'`
// Normalized by config.ts `finalizeConfig`: defaulted to `'warning'`
instantInsights: { validationLevel: ValidationLevel }
}
// The root directory of the distDir. In development mode, this is the parent directory of `distDir`
Expand Down Expand Up @@ -1086,10 +1086,10 @@ export interface ExperimentalConfig {
/**
* Controls the validation behavior of Instant Insights
*
* - `'warning'`: Validates all navigations for Instant UI in development
* - `'manual-warning'`: Validates navigations for Instant UI in development when configured with `unstable_instant` in Pages and Layouts
* - `'warning'` (default): Validates all navigations for Instant UI in development
* - `'manual-warning'`: Validates navigations for Instant UI in development only when configured with `unstable_instant` in Pages and Layouts
* - `'experimental-error'`: Validates all navigations for Instant in development and build. Use with caution.
* - `'experimental-manual-error'`: Validates navigations for Instant UI in developement and build when configured with `unstable_instant` in Pages and Layouts. Use with caution.
* - `'experimental-manual-error'`: Validates navigations for Instant UI in development and build when configured with `unstable_instant` in Pages and Layouts. Use with caution.
*/
validationLevel?: ValidationLevel
}
Expand Down
2 changes: 1 addition & 1 deletion packages/next/src/server/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1618,7 +1618,7 @@ function assignDefaultsAndValidate(
function finalizeConfig(config: NextConfigComplete): NextConfigComplete {
config.experimental.instantInsights = {
validationLevel:
config.experimental.instantInsights?.validationLevel ?? 'manual-warning',
config.experimental.instantInsights?.validationLevel ?? 'warning',
Comment thread
vercel[bot] marked this conversation as resolved.
}
return config
}
Expand Down
8 changes: 4 additions & 4 deletions test/unit/instant-config-normalization.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function uniqueDir(tag: string) {
// `experimental.instantInsights.validationLevel` to a concrete value in
// one place so consumers don't each need to know the current framework default.
describe('experimental.instantInsights validationLevel normalization', () => {
it('defaults to manual-warning when the instantInsights config is absent', async () => {
it('defaults to warning when the instantInsights config is absent', async () => {
const config = await loadConfig(
PHASE_PRODUCTION_SERVER,
uniqueDir('absent'),
Expand All @@ -23,11 +23,11 @@ describe('experimental.instantInsights validationLevel normalization', () => {
}
)
expect(config.experimental.instantInsights).toEqual({
validationLevel: 'manual-warning',
validationLevel: 'warning',
})
})

it('defaults to manual-warning when experimental.instantInsights is an empty object', async () => {
it('defaults to warning when experimental.instantInsights is an empty object', async () => {
const config = await loadConfig(
PHASE_PRODUCTION_SERVER,
uniqueDir('empty'),
Expand All @@ -36,7 +36,7 @@ describe('experimental.instantInsights validationLevel normalization', () => {
}
)
expect(config.experimental.instantInsights).toEqual({
validationLevel: 'manual-warning',
validationLevel: 'warning',
})
})

Expand Down
Loading