Skip to content

Commit

Permalink
[flags] remove enableRemoveConsolePatches (#32425)
Browse files Browse the repository at this point in the history
wait to merge until we sync
#32376, since that enables it in
some testing builds that might break
  • Loading branch information
rickhanlonii authored Feb 24, 2025
1 parent 9dd378f commit 2567726
Show file tree
Hide file tree
Showing 14 changed files with 0 additions and 279 deletions.
2 changes: 0 additions & 2 deletions packages/react-reconciler/src/ReactFiberDevToolsHook.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import {
log,
unstable_setDisableYieldValue,
} from './Scheduler';
import {setSuppressWarning} from 'shared/consoleWithStackDev';

declare const __REACT_DEVTOOLS_GLOBAL_HOOK__: Object | void;

Expand Down Expand Up @@ -191,7 +190,6 @@ export function setIsStrictModeForDevtools(newIsStrictMode: boolean) {
// in SchedulerMock. To reduce the noise in strict mode tests,
// suppress warnings and disable scheduler yielding during the double render
unstable_setDisableYieldValue(newIsStrictMode);
setSuppressWarning(newIsStrictMode);
}

if (injectedHook && typeof injectedHook.setStrictMode === 'function') {
Expand Down
2 changes: 0 additions & 2 deletions packages/shared/ReactFeatureFlags.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,5 +267,3 @@ export const enableUpdaterTracking = __PROFILE__;

// Internal only.
export const enableDO_NOT_USE_disableStrictPassiveEffect = false;

export const enableRemoveConsolePatches = true;
18 changes: 0 additions & 18 deletions packages/shared/consoleWithStackDev.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/shared/forks/ReactFeatureFlags.native-fb.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export const {

// These two can be removed
export const enableOwnerStacks = true;
export const enableRemoveConsolePatches = true;

// The rest of the flags are static for better dead code elimination.
export const disableClientCache = true;
Expand Down
1 change: 0 additions & 1 deletion packages/shared/forks/ReactFeatureFlags.native-oss.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ export const enableProfilerTimer = __PROFILE__;
export const enableProfilerCommitHooks = __PROFILE__;
export const enableProfilerNestedUpdatePhase = __PROFILE__;
export const enableUpdaterTracking = __PROFILE__;
export const enableRemoveConsolePatches = true;

// Flow magic to verify the exports of this file match the original version.
((((null: any): ExportsType): FeatureFlagsType): ExportsType);
1 change: 0 additions & 1 deletion packages/shared/forks/ReactFeatureFlags.test-renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ export const disableDefaultPropsExceptForClasses = true;

export const enableObjectFiber = false;
export const enableOwnerStacks = true;
export const enableRemoveConsolePatches = true;

// Flow magic to verify the exports of this file match the original version.
((((null: any): ExportsType): FeatureFlagsType): ExportsType);
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ export const enableHydrationLaneScheduling = true;
export const enableYieldingBeforePassive = false;
export const enableThrottledScheduling = false;
export const enableViewTransition = false;
export const enableRemoveConsolePatches = true;
export const enableSwipeTransition = false;
export const enableFastAddPropertiesInDiffing = false;
export const enableLazyPublicInstanceInFabric = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ export const enableYieldingBeforePassive = false;

export const enableThrottledScheduling = false;
export const enableViewTransition = false;
export const enableRemoveConsolePatches = true;
export const enableSwipeTransition = false;
export const enableFastAddPropertiesInDiffing = false;
export const enableLazyPublicInstanceInFabric = false;
Expand Down
1 change: 0 additions & 1 deletion packages/shared/forks/ReactFeatureFlags.www.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export const {

// Can remove these two
export const enableOwnerStacks = true;
export const enableRemoveConsolePatches = true;

export const enableProfilerTimer = __PROFILE__;
export const enableProfilerCommitHooks = __PROFILE__;
Expand Down
72 changes: 0 additions & 72 deletions packages/shared/forks/consoleWithStackDev.rn.js

This file was deleted.

68 changes: 0 additions & 68 deletions packages/shared/forks/consoleWithStackDev.www.js

This file was deleted.

82 changes: 0 additions & 82 deletions scripts/babel/transform-replace-console-calls.js

This file was deleted.

17 changes: 0 additions & 17 deletions scripts/rollup/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,6 @@ function getBabelConfig(
isDevelopment,
bundle
) {
const canAccessReactObject =
packageName === 'react' || externals.indexOf('react') !== -1;
let options = {
exclude: '/**/node_modules/**',
babelrc: false,
Expand All @@ -158,21 +156,6 @@ function getBabelConfig(
};
if (isDevelopment) {
options.plugins.push(...babelToES5Plugins);
if (
bundleType === FB_WWW_DEV ||
bundleType === RN_OSS_DEV ||
bundleType === RN_FB_DEV
) {
options.plugins.push(
// Turn console.error/warn() into a custom wrapper
[
require('../babel/transform-replace-console-calls'),
{
shouldError: !canAccessReactObject,
},
]
);
}
}
if (updateBabelOptions) {
options = updateBabelOptions(options);
Expand Down
12 changes: 0 additions & 12 deletions scripts/rollup/forks.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,18 +209,6 @@ const forks = Object.freeze({
}
},

'./packages/shared/consoleWithStackDev.js': (bundleType, entry) => {
switch (bundleType) {
case FB_WWW_DEV:
return './packages/shared/forks/consoleWithStackDev.www.js';
case RN_OSS_DEV:
case RN_FB_DEV:
return './packages/shared/forks/consoleWithStackDev.rn.js';
default:
return null;
}
},

'./packages/shared/DefaultPrepareStackTrace.js': (
bundleType,
entry,
Expand Down

0 comments on commit 2567726

Please sign in to comment.