Skip to content

Commit 653bc58

Browse files
authored
Create separate SchedulerFeatureFlags instead of using ReactFeatureFlags (#14455)
1 parent 8bfef0d commit 653bc58

4 files changed

Lines changed: 31 additions & 1 deletion

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
* Copyright (c) Facebook, Inc. and its affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*
7+
*/
8+
9+
exportconstenableSchedulerDebugging=true;

‎packages/scheduler/src/Scheduler.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
/* eslint-disable no-var */
1010

11-
import{enableSchedulerDebugging}from'shared/ReactFeatureFlags';
11+
import{enableSchedulerDebugging}from'./SchedulerFeatureFlags';
1212

1313
// TODO: Use symbols?
1414
varImmediatePriority=1;
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
* Copyright (c) Facebook, Inc. and its affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*
7+
*/
8+
9+
exportconstenableSchedulerDebugging=false;

‎scripts/rollup/forks.js‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,18 @@ const forks = Object.freeze({
157157
}
158158
},
159159

160+
'scheduler/src/SchedulerFeatureFlags': (bundleType,entry,dependencies)=>{
161+
if(
162+
entry==='scheduler'&&
163+
(bundleType===FB_WWW_DEV||
164+
bundleType===FB_WWW_PROD||
165+
bundleType===FB_WWW_PROFILING)
166+
){
167+
return'scheduler/forks/SchedulerFeatureFlags.www.js';
168+
}
169+
return'scheduler/src/SchedulerFeatureFlags';
170+
},
171+
160172
// This logic is forked on www to fork the formatting function.
161173
'shared/invariant': (bundleType,entry)=>{
162174
switch(bundleType){

0 commit comments

Comments
 (0)