File tree Expand file tree Collapse file tree 4 files changed +9
-11
lines changed Expand file tree Collapse file tree 4 files changed +9
-11
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 @@ -484,6 +484,7 @@ export interface FutureOptions {
484484 removeServerModuleGraph ?: 'warn'
485485 removeServerHot ?: 'warn'
486486 removeServerTransformRequest ?: 'warn'
487+ removeServerWarmupRequest ?: 'warn'
487488
488489 removeSsrLoadModule ?: 'warn'
489490}
@@ -702,6 +703,7 @@ export const configDefaults = Object.freeze({
702703 removeServerModuleGraph : undefined ,
703704 removeServerHot : undefined ,
704705 removeServerTransformRequest : undefined ,
706+ removeServerWarmupRequest : undefined ,
705707 removeSsrLoadModule : undefined ,
706708 } ,
707709 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 >
@@ -24,7 +25,9 @@ const deprecationMessages = {
2425 'The `server.moduleGraph` is replaced with `this.environment.moduleGraph`.' ,
2526 removeServerHot : 'The `server.hot` is replaced with `this.environment.hot`.' ,
2627 removeServerTransformRequest :
27- 'The `server.transformRequest` related APIs are replaced with methods in `this.environment`.' ,
28+ '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,20 +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 ) {
604- warnFutureDeprecation (
605- config ,
606- 'removeServerTransformRequest' ,
607- 'server.warmupRequest() is deprecated. Use environment.warmupRequest() instead.' ,
608- )
600+ warnFutureDeprecation ( config , 'removeServerWarmupRequest' )
609601 const environment = server . environments [ options ?. ssr ? 'ssr' : 'client' ]
610602 return environment . warmupRequest ( url )
611603 } ,
You can’t perform that action at this time.
0 commit comments