File tree Expand file tree Collapse file tree 4 files changed +8
-5
lines changed Expand file tree Collapse file tree 4 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ The `Environment` instance was first introduced at `v6.0`. The deprecation of `s
1515future : {
1616 removeServerModuleGraph : ' warn' ,
1717 removeServerTransformRequest : ' warn' ,
18+ removeServerWarmupRequest : ' warn' ,
1819}
1920```
2021
Original file line number Diff line number Diff line change @@ -485,6 +485,7 @@ export interface FutureOptions {
485485 removeServerModuleGraph ?: 'warn'
486486 removeServerHot ?: 'warn'
487487 removeServerTransformRequest ?: 'warn'
488+ removeServerWarmupRequest ?: 'warn'
488489
489490 removeSsrLoadModule ?: 'warn'
490491}
@@ -703,6 +704,7 @@ export const configDefaults = Object.freeze({
703704 removeServerModuleGraph : undefined ,
704705 removeServerHot : undefined ,
705706 removeServerTransformRequest : undefined ,
707+ removeServerWarmupRequest : undefined ,
706708 removeSsrLoadModule : undefined ,
707709 } ,
708710 legacy : {
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ const deprecationCode = {
1010 removeServerModuleGraph : 'changes/per-environment-apis' ,
1111 removeServerHot : 'changes/per-environment-apis' ,
1212 removeServerTransformRequest : 'changes/per-environment-apis' ,
13+ removeServerWarmupRequest : 'changes/per-environment-apis' ,
1314
1415 removeSsrLoadModule : 'changes/ssr-using-modulerunner' ,
1516} satisfies Record < keyof FutureOptions , string >
@@ -25,6 +26,8 @@ const deprecationMessages = {
2526 removeServerHot : 'The `server.hot` is replaced with `this.environment.hot`.' ,
2627 removeServerTransformRequest :
2728 'The `server.transformRequest` is replaced with `this.environment.transformRequest`.' ,
29+ removeServerWarmupRequest :
30+ 'The `server.warmupRequest` is replaced with `this.environment.warmupRequest`.' ,
2831
2932 removeSsrLoadModule :
3033 'The `server.ssrLoadModule` is replaced with Environment Runner.' ,
Original file line number Diff line number Diff line change @@ -592,15 +592,12 @@ export async function _createServer(
592592 } )
593593 } ,
594594 transformRequest ( url , options ) {
595- warnFutureDeprecation (
596- config ,
597- 'removeServerTransformRequest' ,
598- 'server.transformRequest() is deprecated. Use environment.transformRequest() instead.' ,
599- )
595+ warnFutureDeprecation ( config , 'removeServerTransformRequest' )
600596 const environment = server . environments [ options ?. ssr ? 'ssr' : 'client' ]
601597 return environment . transformRequest ( url )
602598 } ,
603599 warmupRequest ( url , options ) {
600+ warnFutureDeprecation ( config , 'removeServerWarmupRequest' )
604601 const environment = server . environments [ options ?. ssr ? 'ssr' : 'client' ]
605602 return environment . warmupRequest ( url )
606603 } ,
You can’t perform that action at this time.
0 commit comments