Skip to content

Commit

Permalink
Flow/Lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Vaughn committed May 25, 2018
1 parent dd4edbc commit a50b70c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
1 change: 0 additions & 1 deletion .eslintrc.js
Expand Up @@ -81,6 +81,5 @@ module.exports = {
spyOnDev: true,
spyOnDevAndProd: true,
spyOnProd: true,
__PROFILER__: true,
},
};
3 changes: 2 additions & 1 deletion packages/shared/ReactFeatureFlags.js
Expand Up @@ -37,7 +37,8 @@ export const warnAboutDeprecatedLifecycles = false;
export const warnAboutLegacyContextAPI = false;

// Gather advanced timing metrics for Profiler subtrees.
export const enableProfilerTimer = __DEV__ || __PROFILER__;
export const enableProfilerTimer =
__DEV__ || process.env.REACT_ENABLE_PROFILING === true;

// Fires getDerivedStateFromProps for state *or* props changes
export const fireGetDerivedStateFromPropsOnStateUpdates = true;
Expand Down
3 changes: 2 additions & 1 deletion packages/shared/forks/ReactFeatureFlags.native-fabric-oss.js
Expand Up @@ -20,7 +20,8 @@ export const enableSuspense = false;
export const warnAboutDeprecatedLifecycles = false;
export const warnAboutLegacyContextAPI = false;
export const replayFailedUnitOfWorkWithInvokeGuardedCallback = __DEV__;
export const enableProfilerTimer = __DEV__ || __PROFILER__;
export const enableProfilerTimer =
__DEV__ || process.env.REACT_ENABLE_PROFILING;
export const fireGetDerivedStateFromPropsOnStateUpdates = true;

// Only used in www builds.
Expand Down
3 changes: 2 additions & 1 deletion packages/shared/forks/ReactFeatureFlags.native-oss.js
Expand Up @@ -20,7 +20,8 @@ export const enableUserTimingAPI = __DEV__;
export const replayFailedUnitOfWorkWithInvokeGuardedCallback = __DEV__;
export const warnAboutDeprecatedLifecycles = false;
export const warnAboutLegacyContextAPI = false;
export const enableProfilerTimer = __DEV__ || __PROFILER__;
export const enableProfilerTimer =
__DEV__ || process.env.REACT_ENABLE_PROFILING;
export const fireGetDerivedStateFromPropsOnStateUpdates = true;

// Only used in www builds.
Expand Down
2 changes: 1 addition & 1 deletion scripts/rollup/build.js
Expand Up @@ -290,7 +290,7 @@ function getPlugins(
// Turn __DEV__ and process.env checks into constants.
replace({
__DEV__: isProduction ? 'false' : 'true',
__PROFILER__: isProfiling ? 'true' : 'false',
'process.env.REACT_ENABLE_PROFILING': isProfiling ? 'true' : 'false',
'process.env.NODE_ENV': isProduction ? "'production'" : "'development'",
}),
// We still need CommonJS for external deps like object-assign.
Expand Down

0 comments on commit a50b70c

Please sign in to comment.