Skip to content

Commit 6dceb73

Browse files
author
Brian Vaughn
committed
Flow/Lint fix
1 parent b039e52 commit 6dceb73

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
@@ -34,7 +34,8 @@ export const replayFailedUnitOfWorkWithInvokeGuardedCallback = __DEV__;
3434
export const warnAboutDeprecatedLifecycles = false;
3535

3636
// Gather advanced timing metrics for Profiler subtrees.
37-
export const enableProfilerTimer = __DEV__ || __PROFILER__;
37+
export const enableProfilerTimer =
38+
__DEV__ || process.env.REACT_ENABLE_PROFILING === true;
3839

3940
// Fires getDerivedStateFromProps for state *or* props changes
4041
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
@@ -19,7 +19,8 @@ export const enableGetDerivedStateFromCatch = false;
1919
export const enableSuspense = false;
2020
export const warnAboutDeprecatedLifecycles = false;
2121
export const replayFailedUnitOfWorkWithInvokeGuardedCallback = __DEV__;
22-
export const enableProfilerTimer = __DEV__ || __PROFILER__;
22+
export const enableProfilerTimer =
23+
__DEV__ || process.env.REACT_ENABLE_PROFILING;
2324
export const fireGetDerivedStateFromPropsOnStateUpdates = true;
2425

2526
// 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
@@ -19,7 +19,8 @@ export const enableSuspense = false;
1919
export const enableUserTimingAPI = __DEV__;
2020
export const replayFailedUnitOfWorkWithInvokeGuardedCallback = __DEV__;
2121
export const warnAboutDeprecatedLifecycles = false;
22-
export const enableProfilerTimer = __DEV__ || __PROFILER__;
22+
export const enableProfilerTimer =
23+
__DEV__ || process.env.REACT_ENABLE_PROFILING;
2324
export const fireGetDerivedStateFromPropsOnStateUpdates = true;
2425

2526
// 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)