@@ -18,59 +18,49 @@ 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):
2827 ✓ cacheComponents
2928 ✓ reactDebugChannel (enabled by \`__NEXT_EXPERIMENTAL_DEBUG_CHANNEL\`)"
3029 ` )
3130 } else {
3231 expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot ( `
33- "▲ Next.js x.y.z (webpack)
32+ "▲ Next.js x.y.z (webpack, Cache Components )
3433 - Experiments (use with caution):
35- ✓ cacheComponents
3634 ✓ reactDebugChannel (enabled by \`__NEXT_EXPERIMENTAL_DEBUG_CHANNEL\`)"
3735 ` )
3836 }
3937 } else if ( pprEnabled ) {
4038 if ( isTurbopack ) {
4139 expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot ( `
42- "▲ Next.js x.y.z (Turbopack)
40+ "▲ Next.js x.y.z (Turbopack, Cache Components )
4341 - Experiments (use with caution):
44- ✓ cacheComponents
4542 ✓ ppr (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)"
4643 ` )
4744 } else {
4845 expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot ( `
49- "▲ Next.js x.y.z (webpack)
46+ "▲ Next.js x.y.z (webpack, Cache Components )
5047 - Experiments (use with caution):
51- ✓ cacheComponents
5248 ✓ ppr (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)"
5349 ` )
5450 }
5551 } else {
5652 if ( isTurbopack ) {
57- expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot ( `
58- "▲ Next.js x.y.z (Turbopack)
59- - Experiments (use with caution):
60- ✓ cacheComponents"
61- ` )
53+ expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot (
54+ `"▲ Next.js x.y.z (Turbopack, Cache Components)"`
55+ )
6256 } else if ( isRspack ) {
6357 expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot ( `
64- "▲ Next.js x.y.z (Rspack)
65- - Experiments (use with caution):
66- ✓ cacheComponents"
58+ "▲ Next.js x.y.z (Rspack, Cache Components)"
6759 ` )
6860 } else {
69- expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot ( `
70- "▲ Next.js x.y.z (webpack)
71- - Experiments (use with caution):
72- ✓ cacheComponents"
73- ` )
61+ expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot (
62+ `"▲ Next.js x.y.z (webpack, Cache Components)"`
63+ )
7464 }
7565 }
7666 } )
@@ -116,15 +106,13 @@ describe('build-output-prerender', () => {
116106
117107 beforeAll ( ( ) => next . build ( ) )
118108
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 ( ) => {
109+ it ( 'prints a warning and the customized experimental flags' , async ( ) => {
121110 if ( cacheComponentsEnabled ) {
122111 if ( isTurbopack ) {
123112 expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot ( `
124113 "⚠ 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)
114+ ▲ Next.js x.y.z (Turbopack, Cache Components )
126115 - Experiments (use with caution):
127- ✓ cacheComponents
128116 ⨯ prerenderEarlyExit (disabled by \`--debug-prerender\`)
129117 ✓ reactDebugChannel (enabled by \`__NEXT_EXPERIMENTAL_DEBUG_CHANNEL\`)
130118 ✓ serverSourceMaps (enabled by \`--debug-prerender\`)
@@ -133,9 +121,8 @@ describe('build-output-prerender', () => {
133121 } else {
134122 expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot ( `
135123 "⚠ 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)
124+ ▲ Next.js x.y.z (webpack, Cache Components )
137125 - Experiments (use with caution):
138- ✓ cacheComponents
139126 ⨯ prerenderEarlyExit (disabled by \`--debug-prerender\`)
140127 ✓ reactDebugChannel (enabled by \`__NEXT_EXPERIMENTAL_DEBUG_CHANNEL\`)
141128 ⨯ serverMinification (disabled by \`--debug-prerender\`)
@@ -146,9 +133,8 @@ describe('build-output-prerender', () => {
146133 if ( isTurbopack ) {
147134 expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot ( `
148135 "⚠ 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)
136+ ▲ Next.js x.y.z (Turbopack, Cache Components )
150137 - Experiments (use with caution):
151- ✓ cacheComponents
152138 ✓ ppr (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
153139 ⨯ prerenderEarlyExit (disabled by \`--debug-prerender\`)
154140 ✓ serverSourceMaps (enabled by \`--debug-prerender\`)
@@ -157,9 +143,8 @@ describe('build-output-prerender', () => {
157143 } else {
158144 expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot ( `
159145 "⚠ 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)
146+ ▲ Next.js x.y.z (webpack, Cache Components )
161147 - Experiments (use with caution):
162- ✓ cacheComponents
163148 ✓ ppr (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
164149 ⨯ prerenderEarlyExit (disabled by \`--debug-prerender\`)
165150 ⨯ serverMinification (disabled by \`--debug-prerender\`)
@@ -170,29 +155,26 @@ describe('build-output-prerender', () => {
170155 if ( isTurbopack ) {
171156 expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot ( `
172157 "⚠ 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)
158+ ▲ Next.js x.y.z (Turbopack, Cache Components )
174159 - Experiments (use with caution):
175- ✓ cacheComponents
176160 ⨯ prerenderEarlyExit (disabled by \`--debug-prerender\`)
177161 ✓ serverSourceMaps (enabled by \`--debug-prerender\`)
178162 ⨯ turbopackMinify (disabled by \`--debug-prerender\`)"
179163 ` )
180164 } else if ( isRspack ) {
181165 expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot ( `
182166 "⚠ 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)
167+ ▲ Next.js x.y.z (Rspack, Cache Components )
184168 - Experiments (use with caution):
185- ✓ cacheComponents
186169 ⨯ prerenderEarlyExit (disabled by \`--debug-prerender\`)
187170 ⨯ serverMinification (disabled by \`--debug-prerender\`)
188171 ✓ serverSourceMaps (enabled by \`--debug-prerender\`)"
189172 ` )
190173 } else {
191174 expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot ( `
192175 "⚠ 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)
176+ ▲ Next.js x.y.z (webpack, Cache Components )
194177 - Experiments (use with caution):
195- ✓ cacheComponents
196178 ⨯ prerenderEarlyExit (disabled by \`--debug-prerender\`)
197179 ⨯ serverMinification (disabled by \`--debug-prerender\`)
198180 ✓ serverSourceMaps (enabled by \`--debug-prerender\`)"
@@ -241,21 +223,18 @@ describe('build-output-prerender', () => {
241223
242224 beforeAll ( ( ) => next . build ( ) )
243225
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 ( ) => {
226+ it ( 'prints no experimental flags (unless enabled via env variable)' , async ( ) => {
246227 if ( cacheComponentsEnabled ) {
247228 if ( isTurbopack ) {
248229 expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot ( `
249- "▲ Next.js x.y.z (Turbopack)
230+ "▲ Next.js x.y.z (Turbopack, Cache Components )
250231 - Experiments (use with caution):
251- ✓ cacheComponents (enabled by \`__NEXT_CACHE_COMPONENTS\`)
252232 ✓ reactDebugChannel (enabled by \`__NEXT_EXPERIMENTAL_DEBUG_CHANNEL\`)"
253233 ` )
254234 } else {
255235 expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot ( `
256- "▲ Next.js x.y.z (webpack)
236+ "▲ Next.js x.y.z (webpack, Cache Components )
257237 - Experiments (use with caution):
258- ✓ cacheComponents (enabled by \`__NEXT_CACHE_COMPONENTS\`)
259238 ✓ reactDebugChannel (enabled by \`__NEXT_EXPERIMENTAL_DEBUG_CHANNEL\`)"
260239 ` )
261240 }
@@ -300,15 +279,13 @@ describe('build-output-prerender', () => {
300279
301280 beforeAll ( ( ) => next . build ( ) )
302281
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 ( ) => {
282+ it ( 'prints a warning and the customized experimental flags' , async ( ) => {
305283 if ( cacheComponentsEnabled ) {
306284 if ( isTurbopack ) {
307285 expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot ( `
308286 "⚠ 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)
287+ ▲ Next.js x.y.z (Turbopack, Cache Components )
310288 - Experiments (use with caution):
311- ✓ cacheComponents (enabled by \`__NEXT_CACHE_COMPONENTS\`)
312289 ⨯ prerenderEarlyExit (disabled by \`--debug-prerender\`)
313290 ✓ reactDebugChannel (enabled by \`__NEXT_EXPERIMENTAL_DEBUG_CHANNEL\`)
314291 ✓ serverSourceMaps (enabled by \`--debug-prerender\`)
@@ -317,9 +294,8 @@ describe('build-output-prerender', () => {
317294 } else {
318295 expect ( getPreambleOutput ( next . cliOutput ) ) . toMatchInlineSnapshot ( `
319296 "⚠ 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)
297+ ▲ Next.js x.y.z (webpack, Cache Components )
321298 - Experiments (use with caution):
322- ✓ cacheComponents (enabled by \`__NEXT_CACHE_COMPONENTS\`)
323299 ⨯ prerenderEarlyExit (disabled by \`--debug-prerender\`)
324300 ✓ reactDebugChannel (enabled by \`__NEXT_EXPERIMENTAL_DEBUG_CHANNEL\`)
325301 ⨯ serverMinification (disabled by \`--debug-prerender\`)
0 commit comments