Skip to content

Commit a50b70c

Browse files
author
Brian Vaughn
committed
Flow/Lint fix
1 parent dd4edbc commit a50b70c

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed

.eslintrc.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,5 @@ module.exports = {
8181
spyOnDev: true,
8282
spyOnDevAndProd: true,
8383
spyOnProd: true,
84-
__PROFILER__: true,
8584
},
8685
};

packages/shared/ReactFeatureFlags.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ export const warnAboutDeprecatedLifecycles = false;
3737
export const warnAboutLegacyContextAPI = false;
3838

3939
// Gather advanced timing metrics for Profiler subtrees.
40-
export const enableProfilerTimer = __DEV__ || __PROFILER__;
40+
export const enableProfilerTimer =
41+
__DEV__ || process.env.REACT_ENABLE_PROFILING === true;
4142

4243
// Fires getDerivedStateFromProps for state *or* props changes
4344
export const fireGetDerivedStateFromPropsOnStateUpdates = true;

packages/shared/forks/ReactFeatureFlags.native-fabric-oss.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ export const enableSuspense = false;
2020
export const warnAboutDeprecatedLifecycles = false;
2121
export const warnAboutLegacyContextAPI = false;
2222
export const replayFailedUnitOfWorkWithInvokeGuardedCallback = __DEV__;
23-
export const enableProfilerTimer = __DEV__ || __PROFILER__;
23+
export const enableProfilerTimer =
24+
__DEV__ || process.env.REACT_ENABLE_PROFILING;
2425
export const fireGetDerivedStateFromPropsOnStateUpdates = true;
2526

2627
// Only used in www builds.

packages/shared/forks/ReactFeatureFlags.native-oss.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ export const enableUserTimingAPI = __DEV__;
2020
export const replayFailedUnitOfWorkWithInvokeGuardedCallback = __DEV__;
2121
export const warnAboutDeprecatedLifecycles = false;
2222
export const warnAboutLegacyContextAPI = false;
23-
export const enableProfilerTimer = __DEV__ || __PROFILER__;
23+
export const enableProfilerTimer =
24+
__DEV__ || process.env.REACT_ENABLE_PROFILING;
2425
export const fireGetDerivedStateFromPropsOnStateUpdates = true;
2526

2627
// Only used in www builds.

scripts/rollup/build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ function getPlugins(
290290
// Turn __DEV__ and process.env checks into constants.
291291
replace({
292292
__DEV__: isProduction ? 'false' : 'true',
293-
__PROFILER__: isProfiling ? 'true' : 'false',
293+
'process.env.REACT_ENABLE_PROFILING': isProfiling ? 'true' : 'false',
294294
'process.env.NODE_ENV': isProduction ? "'production'" : "'development'",
295295
}),
296296
// We still need CommonJS for external deps like object-assign.

0 commit comments

Comments
 (0)