From b320eca16029f0ce6ae0379298958fad0c383ad0 Mon Sep 17 00:00:00 2001 From: Rick Hanlon Date: Sat, 14 Dec 2024 12:58:11 -0500 Subject: [PATCH 1/2] [flags] Delete enableDebugTracing --- .../ReactDOMServerIntegrationModes-test.js | 50 -- packages/react-reconciler/src/DebugTracing.js | 231 --------- packages/react-reconciler/src/ReactFiber.js | 9 - .../src/ReactFiberClassComponent.js | 29 -- .../react-reconciler/src/ReactFiberHooks.js | 11 - .../react-reconciler/src/ReactFiberThrow.js | 11 - .../src/ReactFiberWorkLoop.js | 75 --- .../__tests__/DebugTracing-test.internal.js | 440 ------------------ packages/react-server/src/ReactFizzServer.js | 2 - packages/react/src/ReactClient.js | 2 - .../ReactServer.experimental.development.js | 2 - .../react/src/ReactServer.experimental.js | 2 - packages/shared/ReactFeatureFlags.js | 5 - packages/shared/ReactSymbols.js | 3 - .../forks/ReactFeatureFlags.native-fb.js | 1 - .../forks/ReactFeatureFlags.native-oss.js | 1 - .../forks/ReactFeatureFlags.test-renderer.js | 1 - ...actFeatureFlags.test-renderer.native-fb.js | 1 - .../ReactFeatureFlags.test-renderer.www.js | 1 - .../forks/ReactFeatureFlags.www-dynamic.js | 6 - .../shared/forks/ReactFeatureFlags.www.js | 1 - packages/shared/isValidElementType.js | 3 - 22 files changed, 887 deletions(-) delete mode 100644 packages/react-reconciler/src/DebugTracing.js delete mode 100644 packages/react-reconciler/src/__tests__/DebugTracing-test.internal.js diff --git a/packages/react-dom/src/__tests__/ReactDOMServerIntegrationModes-test.js b/packages/react-dom/src/__tests__/ReactDOMServerIntegrationModes-test.js index 9dbac22704d17..5770bd1e20c9f 100644 --- a/packages/react-dom/src/__tests__/ReactDOMServerIntegrationModes-test.js +++ b/packages/react-dom/src/__tests__/ReactDOMServerIntegrationModes-test.js @@ -37,56 +37,6 @@ describe('ReactDOMServerIntegration', () => { resetModules(); }); - // Test pragmas don't support itRenders abstraction - if ( - __EXPERIMENTAL__ && - require('shared/ReactFeatureFlags').enableDebugTracing - ) { - describe('React.unstable_DebugTracingMode', () => { - beforeEach(() => { - spyOnDevAndProd(console, 'log'); - }); - - itRenders('with one child', async render => { - const e = await render( - -
text1
-
, - ); - const parent = e.parentNode; - expect(parent.childNodes[0].tagName).toBe('DIV'); - }); - - itRenders('mode with several children', async render => { - const Header = props => { - return

header

; - }; - const Footer = props => { - return ( - -

footer

-

about

-
- ); - }; - const e = await render( - -
text1
- text2 -
-