@@ -18,59 +18,48 @@ describe('build-output-prerender', () => {
1818
1919 beforeAll ( ( ) => next . build ( ) )
2020
21- // TODO: Re-enable this test once we move the cache components flag
22- it . skip ( 'prints only the user-selected experimental flags (and the ones enabled via env variable)' , async ( ) => {
21+ it ( 'prints only the user-selected experimental flags (and the ones enabled via env variable)' , async ( ) => {
2322 if ( cacheComponentsEnabled ) {
2423 if ( isTurbopack ) {
2524 expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot ( `
26- "▲ Next.js x.y.z (Turbopack)
25+ "▲ Next.js x.y.z (Turbopack, Cache Components )
2726 - Experiments (use with caution):
28- ✓ cacheComponents
2927 ✓ reactDebugChannel (enabled by \`__NEXT_EXPERIMENTAL_DEBUG_CHANNEL\`)"
3028 ` )
3129 } else {
3230 expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot ( `
33- "▲ Next.js x.y.z (webpack)
31+ "▲ Next.js x.y.z (webpack, Cache Components )
3432 - Experiments (use with caution):
35- ✓ cacheComponents
3633 ✓ reactDebugChannel (enabled by \`__NEXT_EXPERIMENTAL_DEBUG_CHANNEL\`)"
3734 ` )
3835 }
3936 } else if ( pprEnabled ) {
4037 if ( isTurbopack ) {
4138 expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot ( `
42- "▲ Next.js x.y.z (Turbopack)
39+ "▲ Next.js x.y.z (Turbopack, Cache Components )
4340 - Experiments (use with caution):
44- ✓ cacheComponents
4541 ✓ ppr (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)"
4642 ` )
4743 } else {
4844 expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot ( `
49- "▲ Next.js x.y.z (webpack)
45+ "▲ Next.js x.y.z (webpack, Cache Components )
5046 - Experiments (use with caution):
51- ✓ cacheComponents
5247 ✓ ppr (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)"
5348 ` )
5449 }
5550 } else {
5651 if ( isTurbopack ) {
57- expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot ( `
58- "▲ Next.js x.y.z (Turbopack)
59- - Experiments (use with caution):
60- ✓ cacheComponents"
61- ` )
52+ expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot (
53+ `"▲ Next.js x.y.z (Turbopack, Cache Components)"`
54+ )
6255 } else if ( isRspack ) {
6356 expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot ( `
64- "▲ Next.js x.y.z (Rspack)
65- - Experiments (use with caution):
66- ✓ cacheComponents"
57+ "▲ Next.js x.y.z (Rspack, Cache Components)"
6758 ` )
6859 } else {
69- expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot ( `
70- "▲ Next.js x.y.z (webpack)
71- - Experiments (use with caution):
72- ✓ cacheComponents"
73- ` )
60+ expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot (
61+ `"▲ Next.js x.y.z (webpack, Cache Components)"`
62+ )
7463 }
7564 }
7665 } )
@@ -116,15 +105,13 @@ describe('build-output-prerender', () => {
116105
117106 beforeAll ( ( ) => next . build ( ) )
118107
119- // TODO: Re-enable this test once we move the cache components flag
120- it . skip ( 'prints a warning and the customized experimental flags' , async ( ) => {
108+ it ( 'prints a warning and the customized experimental flags' , async ( ) => {
121109 if ( cacheComponentsEnabled ) {
122110 if ( isTurbopack ) {
123111 expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot ( `
124112 "⚠ Prerendering is running in debug mode. Note: This may affect performance and should not be used for production.
125- ▲ Next.js x.y.z (Turbopack)
113+ ▲ Next.js x.y.z (Turbopack, Cache Components )
126114 - Experiments (use with caution):
127- ✓ cacheComponents
128115 ⨯ prerenderEarlyExit (disabled by \`--debug-prerender\`)
129116 ✓ reactDebugChannel (enabled by \`__NEXT_EXPERIMENTAL_DEBUG_CHANNEL\`)
130117 ✓ serverSourceMaps (enabled by \`--debug-prerender\`)
@@ -133,9 +120,8 @@ describe('build-output-prerender', () => {
133120 } else {
134121 expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot ( `
135122 "⚠ Prerendering is running in debug mode. Note: This may affect performance and should not be used for production.
136- ▲ Next.js x.y.z (webpack)
123+ ▲ Next.js x.y.z (webpack, Cache Components )
137124 - Experiments (use with caution):
138- ✓ cacheComponents
139125 ⨯ prerenderEarlyExit (disabled by \`--debug-prerender\`)
140126 ✓ reactDebugChannel (enabled by \`__NEXT_EXPERIMENTAL_DEBUG_CHANNEL\`)
141127 ⨯ serverMinification (disabled by \`--debug-prerender\`)
@@ -146,9 +132,8 @@ describe('build-output-prerender', () => {
146132 if ( isTurbopack ) {
147133 expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot ( `
148134 "⚠ Prerendering is running in debug mode. Note: This may affect performance and should not be used for production.
149- ▲ Next.js x.y.z (Turbopack)
135+ ▲ Next.js x.y.z (Turbopack, Cache Components )
150136 - Experiments (use with caution):
151- ✓ cacheComponents
152137 ✓ ppr (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
153138 ⨯ prerenderEarlyExit (disabled by \`--debug-prerender\`)
154139 ✓ serverSourceMaps (enabled by \`--debug-prerender\`)
@@ -157,9 +142,8 @@ describe('build-output-prerender', () => {
157142 } else {
158143 expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot ( `
159144 "⚠ Prerendering is running in debug mode. Note: This may affect performance and should not be used for production.
160- ▲ Next.js x.y.z (webpack)
145+ ▲ Next.js x.y.z (webpack, Cache Components )
161146 - Experiments (use with caution):
162- ✓ cacheComponents
163147 ✓ ppr (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
164148 ⨯ prerenderEarlyExit (disabled by \`--debug-prerender\`)
165149 ⨯ serverMinification (disabled by \`--debug-prerender\`)
@@ -170,29 +154,26 @@ describe('build-output-prerender', () => {
170154 if ( isTurbopack ) {
171155 expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot ( `
172156 "⚠ Prerendering is running in debug mode. Note: This may affect performance and should not be used for production.
173- ▲ Next.js x.y.z (Turbopack)
157+ ▲ Next.js x.y.z (Turbopack, Cache Components )
174158 - Experiments (use with caution):
175- ✓ cacheComponents
176159 ⨯ prerenderEarlyExit (disabled by \`--debug-prerender\`)
177160 ✓ serverSourceMaps (enabled by \`--debug-prerender\`)
178161 ⨯ turbopackMinify (disabled by \`--debug-prerender\`)"
179162 ` )
180163 } else if ( isRspack ) {
181164 expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot ( `
182165 "⚠ Prerendering is running in debug mode. Note: This may affect performance and should not be used for production.
183- ▲ Next.js x.y.z (Rspack)
166+ ▲ Next.js x.y.z (Rspack, Cache Components )
184167 - Experiments (use with caution):
185- ✓ cacheComponents
186168 ⨯ prerenderEarlyExit (disabled by \`--debug-prerender\`)
187169 ⨯ serverMinification (disabled by \`--debug-prerender\`)
188170 ✓ serverSourceMaps (enabled by \`--debug-prerender\`)"
189171 ` )
190172 } else {
191173 expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot ( `
192174 "⚠ Prerendering is running in debug mode. Note: This may affect performance and should not be used for production.
193- ▲ Next.js x.y.z (webpack)
175+ ▲ Next.js x.y.z (webpack, Cache Components )
194176 - Experiments (use with caution):
195- ✓ cacheComponents
196177 ⨯ prerenderEarlyExit (disabled by \`--debug-prerender\`)
197178 ⨯ serverMinification (disabled by \`--debug-prerender\`)
198179 ✓ serverSourceMaps (enabled by \`--debug-prerender\`)"
@@ -241,21 +222,18 @@ describe('build-output-prerender', () => {
241222
242223 beforeAll ( ( ) => next . build ( ) )
243224
244- // TODO: Re-enable this test once we move the cache components flag
245- it . skip ( 'prints no experimental flags (unless enabled via env variable)' , async ( ) => {
225+ it ( 'prints no experimental flags (unless enabled via env variable)' , async ( ) => {
246226 if ( cacheComponentsEnabled ) {
247227 if ( isTurbopack ) {
248228 expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot ( `
249- "▲ Next.js x.y.z (Turbopack)
229+ "▲ Next.js x.y.z (Turbopack, Cache Components )
250230 - Experiments (use with caution):
251- ✓ cacheComponents (enabled by \`__NEXT_CACHE_COMPONENTS\`)
252231 ✓ reactDebugChannel (enabled by \`__NEXT_EXPERIMENTAL_DEBUG_CHANNEL\`)"
253232 ` )
254233 } else {
255234 expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot ( `
256- "▲ Next.js x.y.z (webpack)
235+ "▲ Next.js x.y.z (webpack, Cache Components )
257236 - Experiments (use with caution):
258- ✓ cacheComponents (enabled by \`__NEXT_CACHE_COMPONENTS\`)
259237 ✓ reactDebugChannel (enabled by \`__NEXT_EXPERIMENTAL_DEBUG_CHANNEL\`)"
260238 ` )
261239 }
@@ -300,15 +278,13 @@ describe('build-output-prerender', () => {
300278
301279 beforeAll ( ( ) => next . build ( ) )
302280
303- // TODO: Re-enable this test once we move the cache components flag
304- it . skip ( 'prints a warning and the customized experimental flags' , async ( ) => {
281+ it ( 'prints a warning and the customized experimental flags' , async ( ) => {
305282 if ( cacheComponentsEnabled ) {
306283 if ( isTurbopack ) {
307284 expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot ( `
308285 "⚠ Prerendering is running in debug mode. Note: This may affect performance and should not be used for production.
309- ▲ Next.js x.y.z (Turbopack)
286+ ▲ Next.js x.y.z (Turbopack, Cache Components )
310287 - Experiments (use with caution):
311- ✓ cacheComponents (enabled by \`__NEXT_CACHE_COMPONENTS\`)
312288 ⨯ prerenderEarlyExit (disabled by \`--debug-prerender\`)
313289 ✓ reactDebugChannel (enabled by \`__NEXT_EXPERIMENTAL_DEBUG_CHANNEL\`)
314290 ✓ serverSourceMaps (enabled by \`--debug-prerender\`)
@@ -317,9 +293,8 @@ describe('build-output-prerender', () => {
317293 } else {
318294 expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot ( `
319295 "⚠ Prerendering is running in debug mode. Note: This may affect performance and should not be used for production.
320- ▲ Next.js x.y.z (webpack)
296+ ▲ Next.js x.y.z (webpack, Cache Components )
321297 - Experiments (use with caution):
322- ✓ cacheComponents (enabled by \`__NEXT_CACHE_COMPONENTS\`)
323298 ⨯ prerenderEarlyExit (disabled by \`--debug-prerender\`)
324299 ✓ reactDebugChannel (enabled by \`__NEXT_EXPERIMENTAL_DEBUG_CHANNEL\`)
325300 ⨯ serverMinification (disabled by \`--debug-prerender\`)
0 commit comments