diff --git a/packages/react-dom/client.js b/packages/react-dom/client.js index 1379aaa9d3c53..21aac9369ebb8 100644 --- a/packages/react-dom/client.js +++ b/packages/react-dom/client.js @@ -19,7 +19,7 @@ import type { import { createRoot as createRootImpl, hydrateRoot as hydrateRootImpl, - __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED as Internals, + __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE as Internals, } from './'; export function createRoot( diff --git a/packages/react-dom/index.classic.fb.js b/packages/react-dom/index.classic.fb.js index 37a39667a86fc..a565a91f43b1f 100644 --- a/packages/react-dom/index.classic.fb.js +++ b/packages/react-dom/index.classic.fb.js @@ -44,4 +44,4 @@ export { unmountComponentAtNode, } from './src/client/ReactDOMRootFB'; -export {Internals as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED}; +export {Internals as __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE}; diff --git a/packages/react-dom/index.experimental.js b/packages/react-dom/index.experimental.js index 0d38031e60b21..f2d3c27aea0c5 100644 --- a/packages/react-dom/index.experimental.js +++ b/packages/react-dom/index.experimental.js @@ -7,7 +7,7 @@ * @flow */ -export {default as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED} from './src/ReactDOMSharedInternals'; +export {default as __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE} from './src/ReactDOMSharedInternals'; export { createPortal, createRoot, diff --git a/packages/react-dom/index.js b/packages/react-dom/index.js index 4357044d90818..50ad087dfaf6c 100644 --- a/packages/react-dom/index.js +++ b/packages/react-dom/index.js @@ -9,7 +9,7 @@ // Export all exports so that they're available in tests. // We can't use export * from in Flow for some reason. -export {default as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED} from './src/ReactDOMSharedInternals'; +export {default as __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE} from './src/ReactDOMSharedInternals'; export { createPortal, createRoot, diff --git a/packages/react-dom/index.modern.fb.js b/packages/react-dom/index.modern.fb.js index f392b0dd9490f..0d2fa4b4dccbd 100644 --- a/packages/react-dom/index.modern.fb.js +++ b/packages/react-dom/index.modern.fb.js @@ -7,7 +7,7 @@ * @flow */ -export {default as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED} from './src/ReactDOMSharedInternalsFB'; +export {default as __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE} from './src/ReactDOMSharedInternalsFB'; export { createPortal, flushSync, diff --git a/packages/react-dom/index.stable.js b/packages/react-dom/index.stable.js index 6da13efa643cd..a9306083c0e61 100644 --- a/packages/react-dom/index.stable.js +++ b/packages/react-dom/index.stable.js @@ -7,7 +7,7 @@ * @flow */ -export {default as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED} from './src/ReactDOMSharedInternals'; +export {default as __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE} from './src/ReactDOMSharedInternals'; export { createPortal, createRoot, diff --git a/packages/react-dom/npm/client.js b/packages/react-dom/npm/client.js index bef4756404cfd..af04d9eb2ad9f 100644 --- a/packages/react-dom/npm/client.js +++ b/packages/react-dom/npm/client.js @@ -5,7 +5,7 @@ if (process.env.NODE_ENV === 'production') { exports.createRoot = m.createRoot; exports.hydrateRoot = m.hydrateRoot; } else { - var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; + var i = m.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; exports.createRoot = function (c, o) { i.usingClientEntryPoint = true; try { diff --git a/packages/react-dom/server-rendering-stub.js b/packages/react-dom/server-rendering-stub.js index db427710333a5..30f4f80e38903 100644 --- a/packages/react-dom/server-rendering-stub.js +++ b/packages/react-dom/server-rendering-stub.js @@ -13,7 +13,7 @@ import ReactVersion from 'shared/ReactVersion'; export {ReactVersion as version}; -export {default as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED} from './src/ReactDOMSharedInternals'; +export {default as __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE} from './src/ReactDOMSharedInternals'; export { createPortal, diff --git a/packages/react-dom/src/ReactDOMServer.js b/packages/react-dom/src/ReactDOMServer.js index 9322ed3c1ba23..01aa77d759cfe 100644 --- a/packages/react-dom/src/ReactDOMServer.js +++ b/packages/react-dom/src/ReactDOMServer.js @@ -8,7 +8,7 @@ */ // This is the subset of APIs that can be accessed from Server Component modules -export {default as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED} from './ReactDOMSharedInternals'; +export {default as __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE} from './ReactDOMSharedInternals'; export { prefetchDNS, preconnect, diff --git a/packages/react-dom/src/__tests__/ReactDOM-test.js b/packages/react-dom/src/__tests__/ReactDOM-test.js index 2cb0f24e6944a..e4d7b0ddec658 100644 --- a/packages/react-dom/src/__tests__/ReactDOM-test.js +++ b/packages/react-dom/src/__tests__/ReactDOM-test.js @@ -23,7 +23,8 @@ describe('ReactDOM', () => { React = require('react'); ReactDOM = require('react-dom'); findDOMNode = - ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.findDOMNode; + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE + .findDOMNode; ReactDOMClient = require('react-dom/client'); ReactDOMServer = require('react-dom/server'); diff --git a/packages/react-dom/src/__tests__/ReactDOMComponent-test.js b/packages/react-dom/src/__tests__/ReactDOMComponent-test.js index 1d0c3581387da..b72b3da8ced02 100644 --- a/packages/react-dom/src/__tests__/ReactDOMComponent-test.js +++ b/packages/react-dom/src/__tests__/ReactDOMComponent-test.js @@ -2121,7 +2121,7 @@ describe('ReactDOMComponent', () => { componentWillUnmount() { // Should not throw expect( - ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.findDOMNode( + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.findDOMNode( this, ).nodeName, ).toBe('SPAN'); diff --git a/packages/react-dom/src/__tests__/ReactDOMEventListener-test.js b/packages/react-dom/src/__tests__/ReactDOMEventListener-test.js index 189bc1d99f423..f6447642bceba 100644 --- a/packages/react-dom/src/__tests__/ReactDOMEventListener-test.js +++ b/packages/react-dom/src/__tests__/ReactDOMEventListener-test.js @@ -115,14 +115,14 @@ describe('ReactDOMEventListener', () => { }; componentDidMount() { expect( - ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.findDOMNode( + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.findDOMNode( this, ), ).toBe(container.firstChild); } componentDidUpdate() { expect( - ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.findDOMNode( + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.findDOMNode( this, ), ).toBe(container.firstChild); diff --git a/packages/react-dom/src/__tests__/ReactDOMLegacyFiber-test.js b/packages/react-dom/src/__tests__/ReactDOMLegacyFiber-test.js index 9725d5fe0fbdc..b81dea9f18263 100644 --- a/packages/react-dom/src/__tests__/ReactDOMLegacyFiber-test.js +++ b/packages/react-dom/src/__tests__/ReactDOMLegacyFiber-test.js @@ -112,7 +112,7 @@ describe('ReactDOMLegacyFiber', () => { ); const textNode = - ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.findDOMNode( + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.findDOMNode( instance, ); expect(textNode).toBe(container.firstChild); @@ -134,7 +134,7 @@ describe('ReactDOMLegacyFiber', () => { expect(container.childNodes.length).toBe(2); const firstNode = - ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.findDOMNode( + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.findDOMNode( instance, ); expect(firstNode).toBe(container.firstChild); @@ -166,7 +166,7 @@ describe('ReactDOMLegacyFiber', () => { expect(container.childNodes.length).toBe(2); const firstNode = - ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.findDOMNode( + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.findDOMNode( instance, ); expect(firstNode).toBe(container.firstChild); @@ -193,7 +193,7 @@ describe('ReactDOMLegacyFiber', () => { expect(container.childNodes.length).toBe(2); const firstNode = - ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.findDOMNode( + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.findDOMNode( instance, ); expect(firstNode).toBe(container.firstChild); @@ -891,7 +891,7 @@ describe('ReactDOMLegacyFiber', () => { const myNodeA = ReactDOM.render(, container); const a = - ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.findDOMNode( + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.findDOMNode( myNodeA, ); expect(a.tagName).toBe('DIV'); @@ -900,7 +900,7 @@ describe('ReactDOMLegacyFiber', () => { expect(myNodeA === myNodeB).toBe(true); const b = - ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.findDOMNode( + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.findDOMNode( myNodeB, ); expect(b.tagName).toBe('SPAN'); diff --git a/packages/react-dom/src/__tests__/ReactDOMSuspensePlaceholder-test.js b/packages/react-dom/src/__tests__/ReactDOMSuspensePlaceholder-test.js index 12916166ecf0a..69789ad482349 100644 --- a/packages/react-dom/src/__tests__/ReactDOMSuspensePlaceholder-test.js +++ b/packages/react-dom/src/__tests__/ReactDOMSuspensePlaceholder-test.js @@ -26,7 +26,8 @@ describe('ReactDOMSuspensePlaceholder', () => { React = require('react'); ReactDOM = require('react-dom'); findDOMNode = - ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.findDOMNode; + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE + .findDOMNode; ReactDOMClient = require('react-dom/client'); Scheduler = require('scheduler'); act = require('internal-test-utils').act; diff --git a/packages/react-dom/src/__tests__/ReactEmptyComponent-test.js b/packages/react-dom/src/__tests__/ReactEmptyComponent-test.js index d5274f964c2b5..0cb47904b6f56 100644 --- a/packages/react-dom/src/__tests__/ReactEmptyComponent-test.js +++ b/packages/react-dom/src/__tests__/ReactEmptyComponent-test.js @@ -27,7 +27,8 @@ describe('ReactEmptyComponent', () => { React = require('react'); ReactDOM = require('react-dom'); findDOMNode = - ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.findDOMNode; + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE + .findDOMNode; ReactDOMClient = require('react-dom/client'); Scheduler = require('scheduler'); const InternalTestUtils = require('internal-test-utils'); diff --git a/packages/react-dom/src/__tests__/ReactLegacyCompositeComponent-test.js b/packages/react-dom/src/__tests__/ReactLegacyCompositeComponent-test.js index 1f62d9ab20d97..a39fbb0540881 100644 --- a/packages/react-dom/src/__tests__/ReactLegacyCompositeComponent-test.js +++ b/packages/react-dom/src/__tests__/ReactLegacyCompositeComponent-test.js @@ -22,7 +22,8 @@ describe('ReactLegacyCompositeComponent', () => { React = require('react'); ReactDOM = require('react-dom'); findDOMNode = - ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.findDOMNode; + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE + .findDOMNode; ReactDOMClient = require('react-dom/client'); PropTypes = require('prop-types'); act = require('internal-test-utils').act; diff --git a/packages/react-dom/src/__tests__/ReactLegacyUpdates-test.js b/packages/react-dom/src/__tests__/ReactLegacyUpdates-test.js index 942191372a3c0..2d539e750cfca 100644 --- a/packages/react-dom/src/__tests__/ReactLegacyUpdates-test.js +++ b/packages/react-dom/src/__tests__/ReactLegacyUpdates-test.js @@ -24,7 +24,8 @@ describe('ReactLegacyUpdates', () => { React = require('react'); ReactDOM = require('react-dom'); findDOMNode = - ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.findDOMNode; + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE + .findDOMNode; act = require('internal-test-utils').act; Scheduler = require('scheduler'); diff --git a/packages/react-dom/src/__tests__/ReactUpdates-test.js b/packages/react-dom/src/__tests__/ReactUpdates-test.js index d4acfaa9b35f8..d2a02f7956ec1 100644 --- a/packages/react-dom/src/__tests__/ReactUpdates-test.js +++ b/packages/react-dom/src/__tests__/ReactUpdates-test.js @@ -25,7 +25,8 @@ describe('ReactUpdates', () => { React = require('react'); ReactDOM = require('react-dom'); findDOMNode = - ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.findDOMNode; + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE + .findDOMNode; ReactDOMClient = require('react-dom/client'); act = require('internal-test-utils').act; Scheduler = require('scheduler'); diff --git a/packages/react-dom/src/__tests__/react-dom-server-rendering-stub-test.js b/packages/react-dom/src/__tests__/react-dom-server-rendering-stub-test.js index 28c4cb536d77d..9425ca1dd1f15 100644 --- a/packages/react-dom/src/__tests__/react-dom-server-rendering-stub-test.js +++ b/packages/react-dom/src/__tests__/react-dom-server-rendering-stub-test.js @@ -31,7 +31,8 @@ describe('react-dom-server-rendering-stub', () => { expect(ReactDOM.hydrateRoot).toBe(undefined); expect(ReactDOM.findDOMNode).toBe(undefined); expect( - ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.findDOMNode, + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE + .findDOMNode, ).toBe(null); expect(ReactDOM.hydrate).toBe(undefined); expect(ReactDOM.render).toBe(undefined); diff --git a/packages/react-dom/src/test-utils/ReactTestUtilsFB.js b/packages/react-dom/src/test-utils/ReactTestUtilsFB.js index 0c82865384b9e..ad9a18d58abda 100644 --- a/packages/react-dom/src/test-utils/ReactTestUtilsFB.js +++ b/packages/react-dom/src/test-utils/ReactTestUtilsFB.js @@ -27,7 +27,7 @@ import isArray from 'shared/isArray'; // Keep in sync with ReactDOM.js: const SecretInternals = - ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; const EventInternals = SecretInternals.Events; const getInstanceFromNode = EventInternals[0]; const getNodeFromInstance = EventInternals[1]; diff --git a/packages/react-dom/unstable_testing.classic.fb.js b/packages/react-dom/unstable_testing.classic.fb.js index 9958b22cc3277..db9a26388fb93 100644 --- a/packages/react-dom/unstable_testing.classic.fb.js +++ b/packages/react-dom/unstable_testing.classic.fb.js @@ -26,7 +26,7 @@ export { preinit, preinitModule, version, - __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, + __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, } from './index.classic.fb.js'; export {createRoot, hydrateRoot} from './client.js'; diff --git a/packages/react-dom/unstable_testing.experimental.js b/packages/react-dom/unstable_testing.experimental.js index 2cbd3557cca93..da7aeb1fb1a92 100644 --- a/packages/react-dom/unstable_testing.experimental.js +++ b/packages/react-dom/unstable_testing.experimental.js @@ -20,7 +20,7 @@ export { preinit, preinitModule, version, - __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, + __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, } from './index.experimental.js'; export {createRoot, hydrateRoot} from './client.js'; diff --git a/packages/react-dom/unstable_testing.modern.fb.js b/packages/react-dom/unstable_testing.modern.fb.js index 17e78ae012adc..244d82025105f 100644 --- a/packages/react-dom/unstable_testing.modern.fb.js +++ b/packages/react-dom/unstable_testing.modern.fb.js @@ -21,7 +21,7 @@ export { preinit, preinitModule, version, - __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, + __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, } from './index.modern.fb.js'; export {createRoot, hydrateRoot} from './client.js'; export { diff --git a/packages/react-dom/unstable_testing.stable.js b/packages/react-dom/unstable_testing.stable.js index a0a460ce83a99..59b667fa15a7d 100644 --- a/packages/react-dom/unstable_testing.stable.js +++ b/packages/react-dom/unstable_testing.stable.js @@ -20,6 +20,6 @@ export { preinit, preinitModule, version, - __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, + __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, } from './index.stable.js'; export {createRoot, hydrateRoot} from './client.js'; diff --git a/packages/shared/ReactDOMSharedInternals.js b/packages/shared/ReactDOMSharedInternals.js index d1cec6cab9785..515628acafe4e 100644 --- a/packages/shared/ReactDOMSharedInternals.js +++ b/packages/shared/ReactDOMSharedInternals.js @@ -10,6 +10,6 @@ import * as ReactDOM from 'react-dom'; const ReactDOMSharedInternals = - ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; export default ReactDOMSharedInternals; diff --git a/scripts/rollup/shims/facebook-www/ReactBrowserEventEmitter_DO_NOT_USE.js b/scripts/rollup/shims/facebook-www/ReactBrowserEventEmitter_DO_NOT_USE.js index f262007ff65ba..38a1171bc2921 100644 --- a/scripts/rollup/shims/facebook-www/ReactBrowserEventEmitter_DO_NOT_USE.js +++ b/scripts/rollup/shims/facebook-www/ReactBrowserEventEmitter_DO_NOT_USE.js @@ -8,8 +8,8 @@ 'use strict'; const { - __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, + __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, } = require('ReactDOM'); module.exports = - __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactBrowserEventEmitter; + __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.ReactBrowserEventEmitter;