Unverified Commit 10fb5bc6 authored by Jiachi Liu's avatar Jiachi Liu Committed by GitHub

[devtool] enable segment explorer by default (#81737)

Enable `experimental.devtoolSegmentExplorer` on canary by default and update snapshots
parent 719bc5e7
...@@ -1463,7 +1463,7 @@ export const defaultConfig = Object.freeze({ ...@@ -1463,7 +1463,7 @@ export const defaultConfig = Object.freeze({
useCache: undefined, useCache: undefined,
slowModuleDetection: undefined, slowModuleDetection: undefined,
globalNotFound: false, globalNotFound: false,
devtoolSegmentExplorer: false, devtoolSegmentExplorer: true,
browserDebugInfoInTerminal: false, browserDebugInfoInTerminal: false,
optimizeRouterScrolling: false, optimizeRouterScrolling: false,
strictNextHead: true, strictNextHead: true,
......
...@@ -21,10 +21,14 @@ describe('hydration-error-count', () => { ...@@ -21,10 +21,14 @@ describe('hydration-error-count', () => {
<RedirectBoundary> <RedirectBoundary>
<RedirectErrorBoundary router={{...}}> <RedirectErrorBoundary router={{...}}>
<InnerLayoutRouter url="/bad-nesting" tree={[...]} cacheNode={{lazyData:null, ...}} ...> <InnerLayoutRouter url="/bad-nesting" tree={[...]} cacheNode={{lazyData:null, ...}} ...>
<SegmentViewNode type="page" pagePath="bad-nestin...">
<SegmentTrieNode>
<ClientPageRoot Component={function Page} searchParams={{}} params={{}}> <ClientPageRoot Component={function Page} searchParams={{}} params={{}}>
<Page params={Promise} searchParams={Promise}> <Page params={Promise} searchParams={Promise}>
> <p> > <p>
> <p> > <p>
...
...
...", ...",
"description": "In HTML, <p> cannot be a descendant of <p>. "description": "In HTML, <p> cannot be a descendant of <p>.
This will cause a hydration error.", This will cause a hydration error.",
...@@ -69,11 +73,15 @@ describe('hydration-error-count', () => { ...@@ -69,11 +73,15 @@ describe('hydration-error-count', () => {
<RedirectBoundary> <RedirectBoundary>
<RedirectErrorBoundary router={{...}}> <RedirectErrorBoundary router={{...}}>
<InnerLayoutRouter url="/html-diff" tree={[...]} cacheNode={{lazyData:null, ...}} segmentPath={[...]}> <InnerLayoutRouter url="/html-diff" tree={[...]} cacheNode={{lazyData:null, ...}} segmentPath={[...]}>
<SegmentViewNode type="page" pagePath="html-diff/...">
<SegmentTrieNode>
<ClientPageRoot Component={function Page} searchParams={{}} params={{}}> <ClientPageRoot Component={function Page} searchParams={{}} params={{}}>
<Page params={Promise} searchParams={Promise}> <Page params={Promise} searchParams={Promise}>
<p> <p>
+ client + client
- server - server
...
...
...", ...",
"description": "Hydration failed because the server rendered text didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:", "description": "Hydration failed because the server rendered text didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:",
"environmentLabel": null, "environmentLabel": null,
...@@ -105,10 +113,14 @@ describe('hydration-error-count', () => { ...@@ -105,10 +113,14 @@ describe('hydration-error-count', () => {
<RedirectBoundary> <RedirectBoundary>
<RedirectErrorBoundary router={{...}}> <RedirectErrorBoundary router={{...}}>
<InnerLayoutRouter url="/two-issues" tree={[...]} cacheNode={{lazyData:null, ...}} ...> <InnerLayoutRouter url="/two-issues" tree={[...]} cacheNode={{lazyData:null, ...}} ...>
<SegmentViewNode type="page" pagePath="two-issues...">
<SegmentTrieNode>
<ClientPageRoot Component={function Page} searchParams={{}} params={{}}> <ClientPageRoot Component={function Page} searchParams={{}} params={{}}>
<Page params={Promise} searchParams={Promise}> <Page params={Promise} searchParams={Promise}>
> <p className="client"> > <p className="client">
> <p> > <p>
...
...
...", ...",
"description": "In HTML, <p> cannot be a descendant of <p>. "description": "In HTML, <p> cannot be a descendant of <p>.
This will cause a hydration error.", This will cause a hydration error.",
...@@ -133,12 +145,16 @@ describe('hydration-error-count', () => { ...@@ -133,12 +145,16 @@ describe('hydration-error-count', () => {
<RedirectBoundary> <RedirectBoundary>
<RedirectErrorBoundary router={{...}}> <RedirectErrorBoundary router={{...}}>
<InnerLayoutRouter url="/two-issues" tree={[...]} cacheNode={{lazyData:null, ...}} ...> <InnerLayoutRouter url="/two-issues" tree={[...]} cacheNode={{lazyData:null, ...}} ...>
<SegmentViewNode type="page" pagePath="two-issues...">
<SegmentTrieNode>
<ClientPageRoot Component={function Page} searchParams={{}} params={{}}> <ClientPageRoot Component={function Page} searchParams={{}} params={{}}>
<Page params={Promise} searchParams={Promise}> <Page params={Promise} searchParams={Promise}>
<p <p
+ className="client" + className="client"
- className="server" - className="server"
> >
...
...
...", ...",
"description": "Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:", "description": "Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:",
"environmentLabel": null, "environmentLabel": null,
...@@ -171,10 +187,14 @@ describe('hydration-error-count', () => { ...@@ -171,10 +187,14 @@ describe('hydration-error-count', () => {
<RedirectBoundary> <RedirectBoundary>
<RedirectErrorBoundary router={{...}}> <RedirectErrorBoundary router={{...}}>
<InnerLayoutRouter url="/hydration..." tree={[...]} cacheNode={{lazyData:null, ...}} ...> <InnerLayoutRouter url="/hydration..." tree={[...]} cacheNode={{lazyData:null, ...}} ...>
<SegmentViewNode type="page" pagePath="hydration-...">
<SegmentTrieNode>
<ClientPageRoot Component={function Page} searchParams={{}} params={{}}> <ClientPageRoot Component={function Page} searchParams={{}} params={{}}>
<Page params={Promise} searchParams={Promise}> <Page params={Promise} searchParams={Promise}>
> <p> > <p>
> <p> > <p>
...
...
...", ...",
"description": "In HTML, <p> cannot be a descendant of <p>. "description": "In HTML, <p> cannot be a descendant of <p>.
This will cause a hydration error.", This will cause a hydration error.",
......
...@@ -142,6 +142,7 @@ describe('client-dev-overlay', () => { ...@@ -142,6 +142,7 @@ describe('client-dev-overlay', () => {
Static Static
Turbopack Turbopack
Enabled Enabled
Route Info
Preferences" Preferences"
`) `)
} else { } else {
...@@ -151,6 +152,7 @@ describe('client-dev-overlay', () => { ...@@ -151,6 +152,7 @@ describe('client-dev-overlay', () => {
Route Route
Static Static
Try Turbopack Try Turbopack
Route Info
Preferences" Preferences"
`) `)
} }
......
...@@ -13,7 +13,7 @@ const EXTERNAL = { ...@@ -13,7 +13,7 @@ const EXTERNAL = {
const COLLECTOR_PORT = 9001 const COLLECTOR_PORT = 9001
describe('opentelemetry', () => { describe('opentelemetry', () => {
const { next, skipped } = nextTestSetup({ const { next, skipped, isNextDev } = nextTestSetup({
files: __dirname, files: __dirname,
skipDeployment: true, skipDeployment: true,
dependencies: require('./package.json').dependencies, dependencies: require('./package.json').dependencies,
...@@ -170,7 +170,7 @@ describe('opentelemetry', () => { ...@@ -170,7 +170,7 @@ describe('opentelemetry', () => {
}, },
{ {
attributes: { attributes: {
'next.clientComponentLoadCount': 7, 'next.clientComponentLoadCount': isNextDev ? 8 : 7,
'next.span_type': 'next.span_type':
'NextNodeServer.clientComponentLoading', 'NextNodeServer.clientComponentLoading',
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment