Skip to content

Commit 653bc58

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

File tree

4 files changed

+31
-1
lines changed

4 files changed

+31
-1
lines changed
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+
export const enableSchedulerDebugging = true;

packages/scheduler/src/Scheduler.js

+1-1
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
var ImmediatePriority = 1;
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+
export const enableSchedulerDebugging = false;

scripts/rollup/forks.js

+12
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)