@@ -369,8 +369,8 @@ export interface RouterInit {
369
369
future ?: Partial < FutureConfig > ;
370
370
hydrationData ?: HydrationState ;
371
371
window ?: Window ;
372
+ dataStrategy ?: DataStrategyFunction ;
372
373
patchRoutesOnNavigation ?: AgnosticPatchRoutesOnNavigationFunction ;
373
- unstable_dataStrategy ?: DataStrategyFunction ;
374
374
}
375
375
376
376
/**
@@ -399,15 +399,15 @@ export interface StaticHandler {
399
399
opts ?: {
400
400
requestContext ?: unknown ;
401
401
skipLoaderErrorBubbling ?: boolean ;
402
- unstable_dataStrategy ?: DataStrategyFunction ;
402
+ dataStrategy ?: DataStrategyFunction ;
403
403
}
404
404
) : Promise < StaticHandlerContext | Response > ;
405
405
queryRoute (
406
406
request : Request ,
407
407
opts ?: {
408
408
routeId ?: string ;
409
409
requestContext ?: unknown ;
410
- unstable_dataStrategy ?: DataStrategyFunction ;
410
+ dataStrategy ?: DataStrategyFunction ;
411
411
}
412
412
) : Promise < any > ;
413
413
}
@@ -808,7 +808,7 @@ export function createRouter(init: RouterInit): Router {
808
808
) ;
809
809
let inFlightDataRoutes : AgnosticDataRouteObject [ ] | undefined ;
810
810
let basename = init . basename || "/" ;
811
- let dataStrategyImpl = init . unstable_dataStrategy || defaultDataStrategy ;
811
+ let dataStrategyImpl = init . dataStrategy || defaultDataStrategy ;
812
812
let patchRoutesOnNavigationImpl = init . patchRoutesOnNavigation ;
813
813
814
814
// Config driven behavior flags
@@ -3410,11 +3410,11 @@ export function createStaticHandler(
3410
3410
{
3411
3411
requestContext,
3412
3412
skipLoaderErrorBubbling,
3413
- unstable_dataStrategy ,
3413
+ dataStrategy ,
3414
3414
} : {
3415
3415
requestContext ?: unknown ;
3416
3416
skipLoaderErrorBubbling ?: boolean ;
3417
- unstable_dataStrategy ?: DataStrategyFunction ;
3417
+ dataStrategy ?: DataStrategyFunction ;
3418
3418
} = { }
3419
3419
) : Promise < StaticHandlerContext | Response > {
3420
3420
let url = new URL ( request . url ) ;
@@ -3464,7 +3464,7 @@ export function createStaticHandler(
3464
3464
location ,
3465
3465
matches ,
3466
3466
requestContext ,
3467
- unstable_dataStrategy || null ,
3467
+ dataStrategy || null ,
3468
3468
skipLoaderErrorBubbling === true ,
3469
3469
null
3470
3470
) ;
@@ -3509,11 +3509,11 @@ export function createStaticHandler(
3509
3509
{
3510
3510
routeId,
3511
3511
requestContext,
3512
- unstable_dataStrategy ,
3512
+ dataStrategy ,
3513
3513
} : {
3514
3514
requestContext ?: unknown ;
3515
3515
routeId ?: string ;
3516
- unstable_dataStrategy ?: DataStrategyFunction ;
3516
+ dataStrategy ?: DataStrategyFunction ;
3517
3517
} = { }
3518
3518
) : Promise < any > {
3519
3519
let url = new URL ( request . url ) ;
@@ -3547,7 +3547,7 @@ export function createStaticHandler(
3547
3547
location ,
3548
3548
matches ,
3549
3549
requestContext ,
3550
- unstable_dataStrategy || null ,
3550
+ dataStrategy || null ,
3551
3551
false ,
3552
3552
match
3553
3553
) ;
@@ -3582,7 +3582,7 @@ export function createStaticHandler(
3582
3582
location : Location ,
3583
3583
matches : AgnosticDataRouteMatch [ ] ,
3584
3584
requestContext : unknown ,
3585
- unstable_dataStrategy : DataStrategyFunction | null ,
3585
+ dataStrategy : DataStrategyFunction | null ,
3586
3586
skipLoaderErrorBubbling : boolean ,
3587
3587
routeMatch : AgnosticDataRouteMatch | null
3588
3588
) : Promise < Omit < StaticHandlerContext , "location" | "basename" > | Response > {
@@ -3598,7 +3598,7 @@ export function createStaticHandler(
3598
3598
matches ,
3599
3599
routeMatch || getTargetMatch ( matches , location ) ,
3600
3600
requestContext ,
3601
- unstable_dataStrategy ,
3601
+ dataStrategy ,
3602
3602
skipLoaderErrorBubbling ,
3603
3603
routeMatch != null
3604
3604
) ;
@@ -3609,7 +3609,7 @@ export function createStaticHandler(
3609
3609
request ,
3610
3610
matches ,
3611
3611
requestContext ,
3612
- unstable_dataStrategy ,
3612
+ dataStrategy ,
3613
3613
skipLoaderErrorBubbling ,
3614
3614
routeMatch
3615
3615
) ;
@@ -3644,7 +3644,7 @@ export function createStaticHandler(
3644
3644
matches : AgnosticDataRouteMatch [ ] ,
3645
3645
actionMatch : AgnosticDataRouteMatch ,
3646
3646
requestContext : unknown ,
3647
- unstable_dataStrategy : DataStrategyFunction | null ,
3647
+ dataStrategy : DataStrategyFunction | null ,
3648
3648
skipLoaderErrorBubbling : boolean ,
3649
3649
isRouteRequest : boolean
3650
3650
) : Promise < Omit < StaticHandlerContext , "location" | "basename" > | Response > {
@@ -3671,7 +3671,7 @@ export function createStaticHandler(
3671
3671
matches ,
3672
3672
isRouteRequest ,
3673
3673
requestContext ,
3674
- unstable_dataStrategy
3674
+ dataStrategy
3675
3675
) ;
3676
3676
result = results [ actionMatch . route . id ] ;
3677
3677
@@ -3731,7 +3731,7 @@ export function createStaticHandler(
3731
3731
loaderRequest ,
3732
3732
matches ,
3733
3733
requestContext ,
3734
- unstable_dataStrategy ,
3734
+ dataStrategy ,
3735
3735
skipLoaderErrorBubbling ,
3736
3736
null ,
3737
3737
[ boundaryMatch . route . id , result ]
@@ -3756,7 +3756,7 @@ export function createStaticHandler(
3756
3756
loaderRequest ,
3757
3757
matches ,
3758
3758
requestContext ,
3759
- unstable_dataStrategy ,
3759
+ dataStrategy ,
3760
3760
skipLoaderErrorBubbling ,
3761
3761
null
3762
3762
) ;
@@ -3778,7 +3778,7 @@ export function createStaticHandler(
3778
3778
request : Request ,
3779
3779
matches : AgnosticDataRouteMatch [ ] ,
3780
3780
requestContext : unknown ,
3781
- unstable_dataStrategy : DataStrategyFunction | null ,
3781
+ dataStrategy : DataStrategyFunction | null ,
3782
3782
skipLoaderErrorBubbling : boolean ,
3783
3783
routeMatch : AgnosticDataRouteMatch | null ,
3784
3784
pendingActionResult ?: PendingActionResult
@@ -3840,7 +3840,7 @@ export function createStaticHandler(
3840
3840
matches ,
3841
3841
isRouteRequest ,
3842
3842
requestContext ,
3843
- unstable_dataStrategy
3843
+ dataStrategy
3844
3844
) ;
3845
3845
3846
3846
if ( request . signal . aborted ) {
@@ -3880,10 +3880,10 @@ export function createStaticHandler(
3880
3880
matches : AgnosticDataRouteMatch [ ] ,
3881
3881
isRouteRequest : boolean ,
3882
3882
requestContext : unknown ,
3883
- unstable_dataStrategy : DataStrategyFunction | null
3883
+ dataStrategy : DataStrategyFunction | null
3884
3884
) : Promise < Record < string , DataResult > > {
3885
3885
let results = await callDataStrategyImpl (
3886
- unstable_dataStrategy || defaultDataStrategy ,
3886
+ dataStrategy || defaultDataStrategy ,
3887
3887
type ,
3888
3888
null ,
3889
3889
request ,
@@ -4867,7 +4867,7 @@ async function convertDataStrategyResultToDataResult(
4867
4867
} ;
4868
4868
}
4869
4869
4870
- // Convert thrown unstable_data () to ErrorResponse instances
4870
+ // Convert thrown data () to ErrorResponse instances
4871
4871
result = new ErrorResponseImpl (
4872
4872
result . init ?. status || 500 ,
4873
4873
undefined ,
0 commit comments