mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
Rename SECRET INTERNALS to __CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE (#28789)
Follow up to #28783 and #28786. Since we've changed the implementations of these we can rename them to something a bit more descriptive while we're at it, since anyone depending on them will need to upgrade their code anyway. "react" with no condition: `__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE` "react" with "react-server" condition: `__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE` "react-dom": `__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE`
This commit is contained in:
committed by
GitHub
parent
50895bc161
commit
f613165357
@@ -10,7 +10,7 @@
|
||||
<script src="scheduler-unstable_mock.development.js"></script>
|
||||
<script src="react.development.js"></script>
|
||||
<script type="text/javascript">
|
||||
window.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler =
|
||||
window.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler =
|
||||
window.SchedulerMock;
|
||||
</script>
|
||||
<script src="react-dom.development.js"></script>
|
||||
|
||||
2
packages/react-cache/src/ReactCacheOld.js
vendored
2
packages/react-cache/src/ReactCacheOld.js
vendored
@@ -45,7 +45,7 @@ const Resolved = 1;
|
||||
const Rejected = 2;
|
||||
|
||||
const SharedInternals =
|
||||
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
||||
|
||||
function readContext(Context: ReactContext<mixed>) {
|
||||
const dispatcher = SharedInternals.H;
|
||||
|
||||
@@ -64,11 +64,11 @@ describe('editing interface', () => {
|
||||
|
||||
act(() =>
|
||||
ReactDOM.render(
|
||||
<ClassComponent
|
||||
array={[1, 2, 3]}
|
||||
object={{nested: 'initial'}}
|
||||
shallow="initial"
|
||||
/>,
|
||||
React.createElement(ClassComponent, {
|
||||
array: [1, 2, 3],
|
||||
object: {nested: 'initial'},
|
||||
shallow: 'initial',
|
||||
}),
|
||||
document.createElement('div'),
|
||||
),
|
||||
);
|
||||
@@ -270,7 +270,10 @@ describe('editing interface', () => {
|
||||
|
||||
act(() =>
|
||||
ReactDOM.render(
|
||||
<ClassComponent object={{nested: 'initial'}} shallow="initial" />,
|
||||
React.createElement(ClassComponent, {
|
||||
object: {nested: 'initial'},
|
||||
shallow: 'initial',
|
||||
}),
|
||||
document.createElement('div'),
|
||||
),
|
||||
);
|
||||
@@ -489,9 +492,11 @@ describe('editing interface', () => {
|
||||
|
||||
act(() =>
|
||||
ReactDOM.render(
|
||||
<LegacyContextProvider>
|
||||
<ClassComponent />
|
||||
</LegacyContextProvider>,
|
||||
React.createElement(
|
||||
LegacyContextProvider,
|
||||
null,
|
||||
React.createElement(ClassComponent),
|
||||
),
|
||||
document.createElement('div'),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -62,7 +62,10 @@ describe('InspectedElementContext', () => {
|
||||
const Example = () => null;
|
||||
|
||||
act(() =>
|
||||
ReactDOM.render(<Example a={1} b="abc" />, document.createElement('div')),
|
||||
ReactDOM.render(
|
||||
React.createElement(Example, {a: 1, b: 'abc'}),
|
||||
document.createElement('div'),
|
||||
),
|
||||
);
|
||||
|
||||
const id = ((store.getElementIDAtIndex(0): any): number);
|
||||
@@ -91,19 +94,19 @@ describe('InspectedElementContext', () => {
|
||||
|
||||
act(() =>
|
||||
ReactDOM.render(
|
||||
<Example
|
||||
boolean_false={false}
|
||||
boolean_true={true}
|
||||
infinity={Infinity}
|
||||
integer_zero={0}
|
||||
integer_one={1}
|
||||
float={1.23}
|
||||
string="abc"
|
||||
string_empty=""
|
||||
nan={NaN}
|
||||
value_null={null}
|
||||
value_undefined={undefined}
|
||||
/>,
|
||||
React.createElement(Example, {
|
||||
boolean_false: false,
|
||||
boolean_true: true,
|
||||
infinity: Infinity,
|
||||
integer_zero: 0,
|
||||
integer_one: 1,
|
||||
float: 1.23,
|
||||
string: 'abc',
|
||||
string_empty: '',
|
||||
nan: NaN,
|
||||
value_null: null,
|
||||
value_undefined: undefined,
|
||||
}),
|
||||
document.createElement('div'),
|
||||
),
|
||||
);
|
||||
@@ -178,28 +181,28 @@ describe('InspectedElementContext', () => {
|
||||
|
||||
act(() =>
|
||||
ReactDOM.render(
|
||||
<Example
|
||||
anonymous_fn={instance.anonymousFunction}
|
||||
array_buffer={arrayBuffer}
|
||||
array_of_arrays={arrayOfArrays}
|
||||
React.createElement(Example, {
|
||||
anonymous_fn: instance.anonymousFunction,
|
||||
array_buffer: arrayBuffer,
|
||||
array_of_arrays: arrayOfArrays,
|
||||
// eslint-disable-next-line no-undef
|
||||
big_int={BigInt(123)}
|
||||
bound_fn={exampleFunction.bind(this)}
|
||||
data_view={dataView}
|
||||
date={new Date(123)}
|
||||
fn={exampleFunction}
|
||||
html_element={div}
|
||||
immutable={immutableMap}
|
||||
map={mapShallow}
|
||||
map_of_maps={mapOfMaps}
|
||||
object_of_objects={objectOfObjects}
|
||||
react_element={<span />}
|
||||
regexp={/abc/giu}
|
||||
set={setShallow}
|
||||
set_of_sets={setOfSets}
|
||||
symbol={Symbol('symbol')}
|
||||
typed_array={typedArray}
|
||||
/>,
|
||||
big_int: BigInt(123),
|
||||
bound_fn: exampleFunction.bind(this),
|
||||
data_view: dataView,
|
||||
date: new Date(123),
|
||||
fn: exampleFunction,
|
||||
html_element: div,
|
||||
immutable: immutableMap,
|
||||
map: mapShallow,
|
||||
map_of_maps: mapOfMaps,
|
||||
object_of_objects: objectOfObjects,
|
||||
react_element: React.createElement('span'),
|
||||
regexp: /abc/giu,
|
||||
set: setShallow,
|
||||
set_of_sets: setOfSets,
|
||||
symbol: Symbol('symbol'),
|
||||
typed_array: typedArray,
|
||||
}),
|
||||
document.createElement('div'),
|
||||
),
|
||||
);
|
||||
@@ -333,7 +336,7 @@ describe('InspectedElementContext', () => {
|
||||
|
||||
act(() =>
|
||||
ReactDOM.render(
|
||||
<Example object={object} />,
|
||||
React.createElement(Example, {object}),
|
||||
document.createElement('div'),
|
||||
),
|
||||
);
|
||||
@@ -363,7 +366,7 @@ describe('InspectedElementContext', () => {
|
||||
|
||||
act(() =>
|
||||
ReactDOM.render(
|
||||
<Example object={object} />,
|
||||
React.createElement(Example, {object}),
|
||||
document.createElement('div'),
|
||||
),
|
||||
);
|
||||
@@ -390,7 +393,7 @@ describe('InspectedElementContext', () => {
|
||||
|
||||
act(() =>
|
||||
ReactDOM.render(
|
||||
<Example iteratable={iteratable} />,
|
||||
React.createElement(Example, {iteratable}),
|
||||
document.createElement('div'),
|
||||
),
|
||||
);
|
||||
@@ -445,7 +448,7 @@ describe('InspectedElementContext', () => {
|
||||
|
||||
act(() =>
|
||||
ReactDOM.render(
|
||||
<Example data={new CustomData()} />,
|
||||
React.createElement(Example, {data: new CustomData()}),
|
||||
document.createElement('div'),
|
||||
),
|
||||
);
|
||||
@@ -537,7 +540,10 @@ describe('InspectedElementContext', () => {
|
||||
});
|
||||
|
||||
act(() =>
|
||||
ReactDOM.render(<Example data={object} />, document.createElement('div')),
|
||||
ReactDOM.render(
|
||||
React.createElement(Example, {data: object}),
|
||||
document.createElement('div'),
|
||||
),
|
||||
);
|
||||
|
||||
const id = ((store.getElementIDAtIndex(0): any): number);
|
||||
@@ -605,7 +611,7 @@ describe('InspectedElementContext', () => {
|
||||
const Example = ({data}) => null;
|
||||
act(() =>
|
||||
ReactDOM.render(
|
||||
<Example data={testData} />,
|
||||
React.createElement(Example, {data: testData}),
|
||||
document.createElement('div'),
|
||||
),
|
||||
);
|
||||
@@ -631,8 +637,8 @@ describe('InspectedElementContext', () => {
|
||||
|
||||
act(() =>
|
||||
ReactDOM.render(
|
||||
<Example
|
||||
nestedObject={{
|
||||
React.createElement(Example, {
|
||||
nestedObject: {
|
||||
a: {
|
||||
b: {
|
||||
c: [
|
||||
@@ -644,8 +650,8 @@ describe('InspectedElementContext', () => {
|
||||
],
|
||||
},
|
||||
},
|
||||
}}
|
||||
/>,
|
||||
},
|
||||
}),
|
||||
document.createElement('div'),
|
||||
),
|
||||
);
|
||||
@@ -746,7 +752,7 @@ describe('InspectedElementContext', () => {
|
||||
|
||||
act(() =>
|
||||
ReactDOM.render(
|
||||
<Example nestedObject={nestedObject} />,
|
||||
React.createElement(Example, {nestedObject}),
|
||||
document.createElement('div'),
|
||||
),
|
||||
);
|
||||
@@ -802,7 +808,7 @@ describe('InspectedElementContext', () => {
|
||||
|
||||
act(() =>
|
||||
ReactDOM.render(
|
||||
<Example nestedObject={nestedObject} />,
|
||||
React.createElement(Example, {nestedObject}),
|
||||
document.createElement('div'),
|
||||
),
|
||||
);
|
||||
@@ -872,17 +878,17 @@ describe('InspectedElementContext', () => {
|
||||
|
||||
act(() =>
|
||||
ReactDOM.render(
|
||||
<Example
|
||||
arrayBuffer={arrayBuffer}
|
||||
dataView={dataView}
|
||||
map={map}
|
||||
set={set}
|
||||
mapOfMaps={mapOfMaps}
|
||||
setOfSets={setOfSets}
|
||||
typedArray={typedArray}
|
||||
immutable={immutable}
|
||||
bigInt={bigInt}
|
||||
/>,
|
||||
React.createElement(Example, {
|
||||
arrayBuffer: arrayBuffer,
|
||||
dataView: dataView,
|
||||
map: map,
|
||||
set: set,
|
||||
mapOfMaps: mapOfMaps,
|
||||
setOfSets: setOfSets,
|
||||
typedArray: typedArray,
|
||||
immutable: immutable,
|
||||
bigInt: bigInt,
|
||||
}),
|
||||
document.createElement('div'),
|
||||
),
|
||||
);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -60,7 +60,7 @@ const Resolved = 1;
|
||||
const Rejected = 2;
|
||||
|
||||
const ReactSharedInternals = (React: any)
|
||||
.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||
.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
||||
|
||||
function readContext(Context: ReactContext<null>) {
|
||||
const dispatcher = ReactSharedInternals.H;
|
||||
|
||||
2
packages/react-dom/client.js
vendored
2
packages/react-dom/client.js
vendored
@@ -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(
|
||||
|
||||
@@ -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};
|
||||
|
||||
@@ -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,
|
||||
|
||||
2
packages/react-dom/index.js
vendored
2
packages/react-dom/index.js
vendored
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
2
packages/react-dom/npm/client.js
vendored
2
packages/react-dom/npm/client.js
vendored
@@ -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 {
|
||||
|
||||
2
packages/react-dom/server-rendering-stub.js
vendored
2
packages/react-dom/server-rendering-stub.js
vendored
@@ -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,
|
||||
|
||||
2
packages/react-dom/src/ReactDOMServer.js
vendored
2
packages/react-dom/src/ReactDOMServer.js
vendored
@@ -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,
|
||||
|
||||
@@ -68,7 +68,7 @@ describe('ReactCompositeComponent', () => {
|
||||
ReactDOM = require('react-dom');
|
||||
ReactDOMClient = require('react-dom/client');
|
||||
ReactSharedInternals =
|
||||
require('react').__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||
require('react').__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
||||
Scheduler = require('scheduler');
|
||||
assertLog = require('internal-test-utils').assertLog;
|
||||
act = require('internal-test-utils').act;
|
||||
|
||||
@@ -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');
|
||||
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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(<MyNode />, 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');
|
||||
|
||||
@@ -775,7 +775,7 @@ describe('ReactDOMServerHooks', () => {
|
||||
describe('readContext', () => {
|
||||
function readContext(Context) {
|
||||
const dispatcher =
|
||||
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.H;
|
||||
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.H;
|
||||
return dispatcher.readContext(Context);
|
||||
}
|
||||
|
||||
|
||||
@@ -161,7 +161,8 @@ describe('ReactDOMServerIntegration', () => {
|
||||
itRenders('readContext() in different components', async render => {
|
||||
function readContext(Ctx) {
|
||||
const dispatcher =
|
||||
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.H;
|
||||
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
|
||||
.H;
|
||||
return dispatcher.readContext(Ctx);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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');
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ describe('ReactDOMServer', () => {
|
||||
PropTypes = require('prop-types');
|
||||
ReactDOMServer = require('react-dom/server');
|
||||
ReactSharedInternals =
|
||||
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
||||
});
|
||||
|
||||
describe('renderToString', () => {
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -949,7 +949,7 @@ describe('ReactHooks', () => {
|
||||
it('warns when reading context inside useMemo', async () => {
|
||||
const {useMemo, createContext} = React;
|
||||
const ReactSharedInternals =
|
||||
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
||||
|
||||
const ThemeContext = createContext('light');
|
||||
function App() {
|
||||
@@ -968,7 +968,7 @@ describe('ReactHooks', () => {
|
||||
it('warns when reading context inside useMemo after reading outside it', async () => {
|
||||
const {useMemo, createContext} = React;
|
||||
const ReactSharedInternals =
|
||||
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
||||
|
||||
const ThemeContext = createContext('light');
|
||||
let firstRead, secondRead;
|
||||
@@ -994,7 +994,7 @@ describe('ReactHooks', () => {
|
||||
it('throws when reading context inside useEffect', async () => {
|
||||
const {useEffect, createContext} = React;
|
||||
const ReactSharedInternals =
|
||||
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
||||
|
||||
const ThemeContext = createContext('light');
|
||||
function App() {
|
||||
@@ -1015,7 +1015,7 @@ describe('ReactHooks', () => {
|
||||
it('throws when reading context inside useLayoutEffect', async () => {
|
||||
const {useLayoutEffect, createContext} = React;
|
||||
const ReactSharedInternals =
|
||||
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
||||
|
||||
const ThemeContext = createContext('light');
|
||||
function App() {
|
||||
@@ -1038,7 +1038,7 @@ describe('ReactHooks', () => {
|
||||
it('warns when reading context inside useReducer', async () => {
|
||||
const {useReducer, createContext} = React;
|
||||
const ReactSharedInternals =
|
||||
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
||||
|
||||
const ThemeContext = createContext('light');
|
||||
function App() {
|
||||
@@ -1065,7 +1065,7 @@ describe('ReactHooks', () => {
|
||||
const ThemeContext = createContext('light');
|
||||
|
||||
const ReactSharedInternals =
|
||||
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
||||
|
||||
let _setState;
|
||||
function Fn() {
|
||||
@@ -1155,7 +1155,7 @@ describe('ReactHooks', () => {
|
||||
|
||||
it('resets warning internal state when interrupted by an error', async () => {
|
||||
const ReactSharedInternals =
|
||||
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
||||
|
||||
const ThemeContext = React.createContext('light');
|
||||
function App() {
|
||||
@@ -1243,7 +1243,7 @@ describe('ReactHooks', () => {
|
||||
it('warns when reading context inside useMemo', async () => {
|
||||
const {useMemo, createContext} = React;
|
||||
const ReactSharedInternals =
|
||||
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
||||
|
||||
const ThemeContext = createContext('light');
|
||||
function App() {
|
||||
|
||||
@@ -138,7 +138,9 @@ describe('memo', () => {
|
||||
|
||||
function readContext(Context) {
|
||||
const dispatcher =
|
||||
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.H;
|
||||
React
|
||||
.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
|
||||
.H;
|
||||
return dispatcher.readContext(Context);
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ describe('ReactNewContext', () => {
|
||||
|
||||
function readContext(Context) {
|
||||
const dispatcher =
|
||||
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.H;
|
||||
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.H;
|
||||
return dispatcher.readContext(Context);
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import * as React from 'react';
|
||||
|
||||
const ReactSharedInternalsServer =
|
||||
// $FlowFixMe: It's defined in the one we resolve to.
|
||||
React.__SECRET_SERVER_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||
React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
||||
|
||||
if (!ReactSharedInternalsServer) {
|
||||
throw new Error(
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
export {
|
||||
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
|
||||
__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
|
||||
act,
|
||||
Children,
|
||||
Component,
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
export {
|
||||
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
|
||||
__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
|
||||
act,
|
||||
Children,
|
||||
Component,
|
||||
|
||||
@@ -29,7 +29,7 @@ export type ChildrenArray<+T> = $ReadOnlyArray<ChildrenArray<T>> | T;
|
||||
// Export all exports so that they're available in tests.
|
||||
// We can't use export * from in Flow for some reason.
|
||||
export {
|
||||
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
|
||||
__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
|
||||
act,
|
||||
Children,
|
||||
Component,
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
export {
|
||||
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
|
||||
__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
|
||||
act,
|
||||
Children,
|
||||
Component,
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
export {
|
||||
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
|
||||
__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
|
||||
act,
|
||||
Children,
|
||||
Component,
|
||||
|
||||
@@ -106,7 +106,7 @@ export {
|
||||
cloneElement,
|
||||
isValidElement,
|
||||
ReactVersion as version,
|
||||
ReactSharedInternals as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
|
||||
ReactSharedInternals as __CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
|
||||
// Concurrent Mode
|
||||
useTransition,
|
||||
startTransition,
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
// Patch fetch
|
||||
import './ReactFetch';
|
||||
|
||||
export {default as __SECRET_SERVER_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED} from './ReactSharedInternalsServer';
|
||||
export {default as __SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE} from './ReactSharedInternalsServer';
|
||||
|
||||
import {forEach, map, count, toArray, only} from './ReactChildren';
|
||||
import {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
// Patch fetch
|
||||
import './ReactFetch';
|
||||
|
||||
export {default as __SECRET_SERVER_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED} from './ReactSharedInternalsServer';
|
||||
export {default as __SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE} from './ReactSharedInternalsServer';
|
||||
|
||||
import {forEach, map, count, toArray, only} from './ReactChildren';
|
||||
import {
|
||||
|
||||
@@ -20,91 +20,91 @@
|
||||
: (global.Scheduler = factory(global));
|
||||
})(this, function (global) {
|
||||
function unstable_now() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_now.apply(
|
||||
return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_now.apply(
|
||||
this,
|
||||
arguments
|
||||
);
|
||||
}
|
||||
|
||||
function unstable_scheduleCallback() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_scheduleCallback.apply(
|
||||
return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_scheduleCallback.apply(
|
||||
this,
|
||||
arguments
|
||||
);
|
||||
}
|
||||
|
||||
function unstable_cancelCallback() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_cancelCallback.apply(
|
||||
return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_cancelCallback.apply(
|
||||
this,
|
||||
arguments
|
||||
);
|
||||
}
|
||||
|
||||
function unstable_shouldYield() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_shouldYield.apply(
|
||||
return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_shouldYield.apply(
|
||||
this,
|
||||
arguments
|
||||
);
|
||||
}
|
||||
|
||||
function unstable_requestPaint() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_requestPaint.apply(
|
||||
return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_requestPaint.apply(
|
||||
this,
|
||||
arguments
|
||||
);
|
||||
}
|
||||
|
||||
function unstable_runWithPriority() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_runWithPriority.apply(
|
||||
return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_runWithPriority.apply(
|
||||
this,
|
||||
arguments
|
||||
);
|
||||
}
|
||||
|
||||
function unstable_next() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_next.apply(
|
||||
return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_next.apply(
|
||||
this,
|
||||
arguments
|
||||
);
|
||||
}
|
||||
|
||||
function unstable_wrapCallback() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_wrapCallback.apply(
|
||||
return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_wrapCallback.apply(
|
||||
this,
|
||||
arguments
|
||||
);
|
||||
}
|
||||
|
||||
function unstable_getCurrentPriorityLevel() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_getCurrentPriorityLevel.apply(
|
||||
return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_getCurrentPriorityLevel.apply(
|
||||
this,
|
||||
arguments
|
||||
);
|
||||
}
|
||||
|
||||
function unstable_getFirstCallbackNode() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_getFirstCallbackNode.apply(
|
||||
return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_getFirstCallbackNode.apply(
|
||||
this,
|
||||
arguments
|
||||
);
|
||||
}
|
||||
|
||||
function unstable_pauseExecution() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_pauseExecution.apply(
|
||||
return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_pauseExecution.apply(
|
||||
this,
|
||||
arguments
|
||||
);
|
||||
}
|
||||
|
||||
function unstable_continueExecution() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_continueExecution.apply(
|
||||
return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_continueExecution.apply(
|
||||
this,
|
||||
arguments
|
||||
);
|
||||
}
|
||||
|
||||
function unstable_forceFrameRate() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_forceFrameRate.apply(
|
||||
return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_forceFrameRate.apply(
|
||||
this,
|
||||
arguments
|
||||
);
|
||||
@@ -125,27 +125,33 @@
|
||||
unstable_getFirstCallbackNode: unstable_getFirstCallbackNode,
|
||||
unstable_forceFrameRate: unstable_forceFrameRate,
|
||||
get unstable_IdlePriority() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
|
||||
return global.React
|
||||
.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
|
||||
.Scheduler.unstable_IdlePriority;
|
||||
},
|
||||
get unstable_ImmediatePriority() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
|
||||
return global.React
|
||||
.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
|
||||
.Scheduler.unstable_ImmediatePriority;
|
||||
},
|
||||
get unstable_LowPriority() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
|
||||
return global.React
|
||||
.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
|
||||
.Scheduler.unstable_LowPriority;
|
||||
},
|
||||
get unstable_NormalPriority() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
|
||||
return global.React
|
||||
.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
|
||||
.Scheduler.unstable_NormalPriority;
|
||||
},
|
||||
get unstable_UserBlockingPriority() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
|
||||
return global.React
|
||||
.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
|
||||
.Scheduler.unstable_UserBlockingPriority;
|
||||
},
|
||||
get unstable_Profiling() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
|
||||
return global.React
|
||||
.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
|
||||
.Scheduler.unstable_Profiling;
|
||||
},
|
||||
});
|
||||
|
||||
@@ -20,70 +20,70 @@
|
||||
: (global.Scheduler = factory(global));
|
||||
})(this, function (global) {
|
||||
function unstable_now() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_now.apply(
|
||||
return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_now.apply(
|
||||
this,
|
||||
arguments
|
||||
);
|
||||
}
|
||||
|
||||
function unstable_scheduleCallback() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_scheduleCallback.apply(
|
||||
return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_scheduleCallback.apply(
|
||||
this,
|
||||
arguments
|
||||
);
|
||||
}
|
||||
|
||||
function unstable_cancelCallback() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_cancelCallback.apply(
|
||||
return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_cancelCallback.apply(
|
||||
this,
|
||||
arguments
|
||||
);
|
||||
}
|
||||
|
||||
function unstable_shouldYield() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_shouldYield.apply(
|
||||
return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_shouldYield.apply(
|
||||
this,
|
||||
arguments
|
||||
);
|
||||
}
|
||||
|
||||
function unstable_requestPaint() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_requestPaint.apply(
|
||||
return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_requestPaint.apply(
|
||||
this,
|
||||
arguments
|
||||
);
|
||||
}
|
||||
|
||||
function unstable_runWithPriority() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_runWithPriority.apply(
|
||||
return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_runWithPriority.apply(
|
||||
this,
|
||||
arguments
|
||||
);
|
||||
}
|
||||
|
||||
function unstable_next() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_next.apply(
|
||||
return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_next.apply(
|
||||
this,
|
||||
arguments
|
||||
);
|
||||
}
|
||||
|
||||
function unstable_wrapCallback() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_wrapCallback.apply(
|
||||
return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_wrapCallback.apply(
|
||||
this,
|
||||
arguments
|
||||
);
|
||||
}
|
||||
|
||||
function unstable_getCurrentPriorityLevel() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_getCurrentPriorityLevel.apply(
|
||||
return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_getCurrentPriorityLevel.apply(
|
||||
this,
|
||||
arguments
|
||||
);
|
||||
}
|
||||
|
||||
function unstable_getFirstCallbackNode() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_getFirstCallbackNode.apply(
|
||||
return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_getFirstCallbackNode.apply(
|
||||
this,
|
||||
arguments
|
||||
);
|
||||
@@ -98,7 +98,7 @@
|
||||
}
|
||||
|
||||
function unstable_forceFrameRate() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_forceFrameRate.apply(
|
||||
return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_forceFrameRate.apply(
|
||||
this,
|
||||
arguments
|
||||
);
|
||||
@@ -119,27 +119,33 @@
|
||||
unstable_getFirstCallbackNode: unstable_getFirstCallbackNode,
|
||||
unstable_forceFrameRate: unstable_forceFrameRate,
|
||||
get unstable_IdlePriority() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
|
||||
return global.React
|
||||
.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
|
||||
.Scheduler.unstable_IdlePriority;
|
||||
},
|
||||
get unstable_ImmediatePriority() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
|
||||
return global.React
|
||||
.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
|
||||
.Scheduler.unstable_ImmediatePriority;
|
||||
},
|
||||
get unstable_LowPriority() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
|
||||
return global.React
|
||||
.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
|
||||
.Scheduler.unstable_LowPriority;
|
||||
},
|
||||
get unstable_NormalPriority() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
|
||||
return global.React
|
||||
.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
|
||||
.Scheduler.unstable_NormalPriority;
|
||||
},
|
||||
get unstable_UserBlockingPriority() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
|
||||
return global.React
|
||||
.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
|
||||
.Scheduler.unstable_UserBlockingPriority;
|
||||
},
|
||||
get unstable_Profiling() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
|
||||
return global.React
|
||||
.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
|
||||
.Scheduler.unstable_Profiling;
|
||||
},
|
||||
});
|
||||
|
||||
@@ -20,70 +20,70 @@
|
||||
: (global.Scheduler = factory(global));
|
||||
})(this, function (global) {
|
||||
function unstable_now() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_now.apply(
|
||||
return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_now.apply(
|
||||
this,
|
||||
arguments
|
||||
);
|
||||
}
|
||||
|
||||
function unstable_scheduleCallback() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_scheduleCallback.apply(
|
||||
return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_scheduleCallback.apply(
|
||||
this,
|
||||
arguments
|
||||
);
|
||||
}
|
||||
|
||||
function unstable_cancelCallback() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_cancelCallback.apply(
|
||||
return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_cancelCallback.apply(
|
||||
this,
|
||||
arguments
|
||||
);
|
||||
}
|
||||
|
||||
function unstable_shouldYield() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_shouldYield.apply(
|
||||
return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_shouldYield.apply(
|
||||
this,
|
||||
arguments
|
||||
);
|
||||
}
|
||||
|
||||
function unstable_requestPaint() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_requestPaint.apply(
|
||||
return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_requestPaint.apply(
|
||||
this,
|
||||
arguments
|
||||
);
|
||||
}
|
||||
|
||||
function unstable_runWithPriority() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_runWithPriority.apply(
|
||||
return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_runWithPriority.apply(
|
||||
this,
|
||||
arguments
|
||||
);
|
||||
}
|
||||
|
||||
function unstable_next() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_next.apply(
|
||||
return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_next.apply(
|
||||
this,
|
||||
arguments
|
||||
);
|
||||
}
|
||||
|
||||
function unstable_wrapCallback() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_wrapCallback.apply(
|
||||
return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_wrapCallback.apply(
|
||||
this,
|
||||
arguments
|
||||
);
|
||||
}
|
||||
|
||||
function unstable_getCurrentPriorityLevel() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_getCurrentPriorityLevel.apply(
|
||||
return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_getCurrentPriorityLevel.apply(
|
||||
this,
|
||||
arguments
|
||||
);
|
||||
}
|
||||
|
||||
function unstable_getFirstCallbackNode() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_getFirstCallbackNode.apply(
|
||||
return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_getFirstCallbackNode.apply(
|
||||
this,
|
||||
arguments
|
||||
);
|
||||
@@ -98,7 +98,7 @@
|
||||
}
|
||||
|
||||
function unstable_forceFrameRate() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_forceFrameRate.apply(
|
||||
return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_forceFrameRate.apply(
|
||||
this,
|
||||
arguments
|
||||
);
|
||||
@@ -119,27 +119,33 @@
|
||||
unstable_getFirstCallbackNode: unstable_getFirstCallbackNode,
|
||||
unstable_forceFrameRate: unstable_forceFrameRate,
|
||||
get unstable_IdlePriority() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
|
||||
return global.React
|
||||
.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
|
||||
.Scheduler.unstable_IdlePriority;
|
||||
},
|
||||
get unstable_ImmediatePriority() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
|
||||
return global.React
|
||||
.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
|
||||
.Scheduler.unstable_ImmediatePriority;
|
||||
},
|
||||
get unstable_LowPriority() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
|
||||
return global.React
|
||||
.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
|
||||
.Scheduler.unstable_LowPriority;
|
||||
},
|
||||
get unstable_NormalPriority() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
|
||||
return global.React
|
||||
.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
|
||||
.Scheduler.unstable_NormalPriority;
|
||||
},
|
||||
get unstable_UserBlockingPriority() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
|
||||
return global.React
|
||||
.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
|
||||
.Scheduler.unstable_UserBlockingPriority;
|
||||
},
|
||||
get unstable_Profiling() {
|
||||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
|
||||
return global.React
|
||||
.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
|
||||
.Scheduler.unstable_Profiling;
|
||||
},
|
||||
});
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -10,6 +10,6 @@
|
||||
import * as React from 'react';
|
||||
|
||||
const ReactSharedInternals =
|
||||
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
||||
|
||||
export default ReactSharedInternals;
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
|
||||
import * as React from 'react';
|
||||
|
||||
const ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||
const ReactInternals =
|
||||
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
||||
|
||||
const {
|
||||
unstable_cancelCallback,
|
||||
|
||||
@@ -35,7 +35,7 @@ function printWarning(level, format, args) {
|
||||
if (__DEV__) {
|
||||
const React = require('react');
|
||||
const ReactSharedInternals =
|
||||
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
||||
// Defensive in case this is fired before React is initialized.
|
||||
if (ReactSharedInternals != null) {
|
||||
const stack = ReactSharedInternals.getStackAddendum();
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user