Skip to content

Commit 2f13717

Browse files
committed
Remove Reconciler fork infra
1 parent 030dae2 commit 2f13717

40 files changed

+69
-928
lines changed

.eslintrc.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,6 @@ module.exports = {
112112
'react-internal/no-to-warn-dev-within-to-throw': ERROR,
113113
'react-internal/warning-args': ERROR,
114114
'react-internal/no-production-logging': ERROR,
115-
'react-internal/no-cross-fork-imports': ERROR,
116-
'react-internal/no-cross-fork-types': [
117-
ERROR,
118-
{
119-
old: [],
120-
new: [],
121-
},
122-
],
123115
},
124116

125117
overrides: [

packages/react-dom/index.classic.fb.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ export {
3030
unstable_batchedUpdates,
3131
unstable_createEventHandle,
3232
unstable_flushControlled,
33-
unstable_isNewReconciler,
3433
unstable_renderSubtreeIntoContainer,
3534
unstable_runWithPriority, // DO NOT USE: Temporarily exposed to migrate off of Scheduler.runWithPriority.
3635
preinit,

packages/react-dom/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ export {
2222
unstable_batchedUpdates,
2323
unstable_createEventHandle,
2424
unstable_flushControlled,
25-
unstable_isNewReconciler,
2625
unstable_renderSubtreeIntoContainer,
2726
unstable_runWithPriority, // DO NOT USE: Temporarily exposed to migrate off of Scheduler.runWithPriority.
2827
preinit,

packages/react-dom/index.modern.fb.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ export {
1616
unstable_batchedUpdates,
1717
unstable_createEventHandle,
1818
unstable_flushControlled,
19-
unstable_isNewReconciler,
2019
unstable_runWithPriority, // DO NOT USE: Temporarily exposed to migrate off of Scheduler.runWithPriority.
2120
preinit,
2221
preload,

packages/react-dom/src/__tests__/react-dom-server-rendering-stub-test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ describe('react-dom-server-rendering-stub', () => {
3636
expect(ReactDOM.unstable_batchedUpdates).toBe(undefined);
3737
expect(ReactDOM.unstable_createEventHandle).toBe(undefined);
3838
expect(ReactDOM.unstable_flushControlled).toBe(undefined);
39-
expect(ReactDOM.unstable_isNewReconciler).toBe(undefined);
4039
expect(ReactDOM.unstable_renderSubtreeIntoContainer).toBe(undefined);
4140
expect(ReactDOM.unstable_runWithPriority).toBe(undefined);
4241
});

packages/react-dom/src/client/ReactDOM.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ import {
5151
import {createPortal as createPortalImpl} from 'react-reconciler/src/ReactPortal';
5252
import {canUseDOM} from 'shared/ExecutionEnvironment';
5353
import ReactVersion from 'shared/ReactVersion';
54-
import {enableNewReconciler} from 'shared/ReactFeatureFlags';
5554

5655
import {
5756
getClosestInstanceFromNode,
@@ -256,5 +255,3 @@ if (__DEV__) {
256255
}
257256
}
258257
}
259-
260-
export const unstable_isNewReconciler = enableNewReconciler;

packages/react-noop-renderer/src/createReactNoop.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import type {
1818
Fiber,
1919
TransitionTracingCallbacks,
2020
} from 'react-reconciler/src/ReactInternalTypes';
21-
import type {UpdateQueue} from 'react-reconciler/src/ReactFiberClassUpdateQueue.new';
21+
import type {UpdateQueue} from 'react-reconciler/src/ReactFiberClassUpdateQueue';
2222
import type {ReactNodeList} from 'shared/ReactTypes';
2323
import type {RootTag} from 'react-reconciler/src/ReactRootTags';
2424

packages/react-reconciler/src/ReactEventPriorities.js

Lines changed: 10 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -7,68 +7,15 @@
77
* @flow
88
*/
99

10-
import {enableNewReconciler} from 'shared/ReactFeatureFlags';
11-
12-
import {
13-
DiscreteEventPriority as DiscreteEventPriority_old,
14-
ContinuousEventPriority as ContinuousEventPriority_old,
15-
DefaultEventPriority as DefaultEventPriority_old,
16-
IdleEventPriority as IdleEventPriority_old,
17-
getCurrentUpdatePriority as getCurrentUpdatePriority_old,
18-
setCurrentUpdatePriority as setCurrentUpdatePriority_old,
19-
runWithPriority as runWithPriority_old,
20-
isHigherEventPriority as isHigherEventPriority_old,
10+
export {
11+
DiscreteEventPriority,
12+
ContinuousEventPriority,
13+
DefaultEventPriority,
14+
IdleEventPriority,
15+
getCurrentUpdatePriority,
16+
setCurrentUpdatePriority,
17+
runWithPriority,
18+
isHigherEventPriority,
2119
} from './ReactEventPriorities.old';
2220

23-
import {
24-
DiscreteEventPriority as DiscreteEventPriority_new,
25-
ContinuousEventPriority as ContinuousEventPriority_new,
26-
DefaultEventPriority as DefaultEventPriority_new,
27-
IdleEventPriority as IdleEventPriority_new,
28-
getCurrentUpdatePriority as getCurrentUpdatePriority_new,
29-
setCurrentUpdatePriority as setCurrentUpdatePriority_new,
30-
runWithPriority as runWithPriority_new,
31-
isHigherEventPriority as isHigherEventPriority_new,
32-
} from './ReactEventPriorities.new';
33-
34-
export opaque type EventPriority = number;
35-
36-
export const DiscreteEventPriority: EventPriority = enableNewReconciler
37-
? (DiscreteEventPriority_new: any)
38-
: (DiscreteEventPriority_old: any);
39-
export const ContinuousEventPriority: EventPriority = enableNewReconciler
40-
? (ContinuousEventPriority_new: any)
41-
: (ContinuousEventPriority_old: any);
42-
export const DefaultEventPriority: EventPriority = enableNewReconciler
43-
? (DefaultEventPriority_new: any)
44-
: (DefaultEventPriority_old: any);
45-
export const IdleEventPriority: EventPriority = enableNewReconciler
46-
? (IdleEventPriority_new: any)
47-
: (IdleEventPriority_old: any);
48-
49-
export function runWithPriority<T>(priority: EventPriority, fn: () => T): T {
50-
return enableNewReconciler
51-
? runWithPriority_new((priority: any), fn)
52-
: runWithPriority_old((priority: any), fn);
53-
}
54-
55-
export function getCurrentUpdatePriority(): EventPriority {
56-
return enableNewReconciler
57-
? (getCurrentUpdatePriority_new(): any)
58-
: (getCurrentUpdatePriority_old(): any);
59-
}
60-
61-
export function setCurrentUpdatePriority(priority: EventPriority): void {
62-
return enableNewReconciler
63-
? setCurrentUpdatePriority_new((priority: any))
64-
: setCurrentUpdatePriority_old((priority: any));
65-
}
66-
67-
export function isHigherEventPriority(
68-
a: EventPriority,
69-
b: EventPriority,
70-
): boolean {
71-
return enableNewReconciler
72-
? isHigherEventPriority_new((a: any), (b: any))
73-
: isHigherEventPriority_old((a: any), (b: any));
74-
}
21+
export type {EventPriority} from './ReactEventPriorities.old';

packages/react-reconciler/src/ReactFiberHooks.new.js

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import ReactSharedInternals from 'shared/ReactSharedInternals';
3131
import {
3232
enableDebugTracing,
3333
enableSchedulingProfiler,
34-
enableNewReconciler,
3534
enableCache,
3635
enableUseRefAccessWarning,
3736
enableLazyContextPropagation,
@@ -2758,8 +2757,6 @@ export const ContextOnlyDispatcher: Dispatcher = {
27582757
useMutableSource: throwInvalidHookError,
27592758
useSyncExternalStore: throwInvalidHookError,
27602759
useId: throwInvalidHookError,
2761-
2762-
unstable_isNewReconciler: enableNewReconciler,
27632760
};
27642761
if (enableCache) {
27652762
(ContextOnlyDispatcher: Dispatcher).useCacheRefresh = throwInvalidHookError;
@@ -2793,8 +2790,6 @@ const HooksDispatcherOnMount: Dispatcher = {
27932790
useMutableSource: mountMutableSource,
27942791
useSyncExternalStore: mountSyncExternalStore,
27952792
useId: mountId,
2796-
2797-
unstable_isNewReconciler: enableNewReconciler,
27982793
};
27992794
if (enableCache) {
28002795
// $FlowFixMe[escaped-generic] discovered when updating Flow
@@ -2828,8 +2823,6 @@ const HooksDispatcherOnUpdate: Dispatcher = {
28282823
useMutableSource: updateMutableSource,
28292824
useSyncExternalStore: updateSyncExternalStore,
28302825
useId: updateId,
2831-
2832-
unstable_isNewReconciler: enableNewReconciler,
28332826
};
28342827
if (enableCache) {
28352828
(HooksDispatcherOnUpdate: Dispatcher).useCacheRefresh = updateRefresh;
@@ -2863,8 +2856,6 @@ const HooksDispatcherOnRerender: Dispatcher = {
28632856
useMutableSource: updateMutableSource,
28642857
useSyncExternalStore: updateSyncExternalStore,
28652858
useId: updateId,
2866-
2867-
unstable_isNewReconciler: enableNewReconciler,
28682859
};
28692860
if (enableCache) {
28702861
(HooksDispatcherOnRerender: Dispatcher).useCacheRefresh = updateRefresh;
@@ -3041,8 +3032,6 @@ if (__DEV__) {
30413032
mountHookTypesDev();
30423033
return mountId();
30433034
},
3044-
3045-
unstable_isNewReconciler: enableNewReconciler,
30463035
};
30473036
if (enableCache) {
30483037
(HooksDispatcherOnMountInDEV: Dispatcher).useCacheRefresh = function useCacheRefresh() {
@@ -3198,8 +3187,6 @@ if (__DEV__) {
31983187
updateHookTypesDev();
31993188
return mountId();
32003189
},
3201-
3202-
unstable_isNewReconciler: enableNewReconciler,
32033190
};
32043191
if (enableCache) {
32053192
(HooksDispatcherOnMountWithHookTypesInDEV: Dispatcher).useCacheRefresh = function useCacheRefresh() {
@@ -3355,8 +3342,6 @@ if (__DEV__) {
33553342
updateHookTypesDev();
33563343
return updateId();
33573344
},
3358-
3359-
unstable_isNewReconciler: enableNewReconciler,
33603345
};
33613346
if (enableCache) {
33623347
(HooksDispatcherOnUpdateInDEV: Dispatcher).useCacheRefresh = function useCacheRefresh() {
@@ -3513,8 +3498,6 @@ if (__DEV__) {
35133498
updateHookTypesDev();
35143499
return updateId();
35153500
},
3516-
3517-
unstable_isNewReconciler: enableNewReconciler,
35183501
};
35193502
if (enableCache) {
35203503
(HooksDispatcherOnRerenderInDEV: Dispatcher).useCacheRefresh = function useCacheRefresh() {
@@ -3687,8 +3670,6 @@ if (__DEV__) {
36873670
mountHookTypesDev();
36883671
return mountId();
36893672
},
3690-
3691-
unstable_isNewReconciler: enableNewReconciler,
36923673
};
36933674
if (enableCache) {
36943675
(InvalidNestedHooksDispatcherOnMountInDEV: Dispatcher).useCacheRefresh = function useCacheRefresh() {
@@ -3872,8 +3853,6 @@ if (__DEV__) {
38723853
updateHookTypesDev();
38733854
return updateId();
38743855
},
3875-
3876-
unstable_isNewReconciler: enableNewReconciler,
38773856
};
38783857
if (enableCache) {
38793858
(InvalidNestedHooksDispatcherOnUpdateInDEV: Dispatcher).useCacheRefresh = function useCacheRefresh() {
@@ -4058,8 +4037,6 @@ if (__DEV__) {
40584037
updateHookTypesDev();
40594038
return updateId();
40604039
},
4061-
4062-
unstable_isNewReconciler: enableNewReconciler,
40634040
};
40644041
if (enableCache) {
40654042
(InvalidNestedHooksDispatcherOnRerenderInDEV: Dispatcher).useCacheRefresh = function useCacheRefresh() {

packages/react-reconciler/src/ReactFiberHooks.old.js

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import ReactSharedInternals from 'shared/ReactSharedInternals';
3131
import {
3232
enableDebugTracing,
3333
enableSchedulingProfiler,
34-
enableNewReconciler,
3534
enableCache,
3635
enableUseRefAccessWarning,
3736
enableLazyContextPropagation,
@@ -2758,8 +2757,6 @@ export const ContextOnlyDispatcher: Dispatcher = {
27582757
useMutableSource: throwInvalidHookError,
27592758
useSyncExternalStore: throwInvalidHookError,
27602759
useId: throwInvalidHookError,
2761-
2762-
unstable_isNewReconciler: enableNewReconciler,
27632760
};
27642761
if (enableCache) {
27652762
(ContextOnlyDispatcher: Dispatcher).useCacheRefresh = throwInvalidHookError;
@@ -2793,8 +2790,6 @@ const HooksDispatcherOnMount: Dispatcher = {
27932790
useMutableSource: mountMutableSource,
27942791
useSyncExternalStore: mountSyncExternalStore,
27952792
useId: mountId,
2796-
2797-
unstable_isNewReconciler: enableNewReconciler,
27982793
};
27992794
if (enableCache) {
28002795
// $FlowFixMe[escaped-generic] discovered when updating Flow
@@ -2828,8 +2823,6 @@ const HooksDispatcherOnUpdate: Dispatcher = {
28282823
useMutableSource: updateMutableSource,
28292824
useSyncExternalStore: updateSyncExternalStore,
28302825
useId: updateId,
2831-
2832-
unstable_isNewReconciler: enableNewReconciler,
28332826
};
28342827
if (enableCache) {
28352828
(HooksDispatcherOnUpdate: Dispatcher).useCacheRefresh = updateRefresh;
@@ -2863,8 +2856,6 @@ const HooksDispatcherOnRerender: Dispatcher = {
28632856
useMutableSource: updateMutableSource,
28642857
useSyncExternalStore: updateSyncExternalStore,
28652858
useId: updateId,
2866-
2867-
unstable_isNewReconciler: enableNewReconciler,
28682859
};
28692860
if (enableCache) {
28702861
(HooksDispatcherOnRerender: Dispatcher).useCacheRefresh = updateRefresh;
@@ -3041,8 +3032,6 @@ if (__DEV__) {
30413032
mountHookTypesDev();
30423033
return mountId();
30433034
},
3044-
3045-
unstable_isNewReconciler: enableNewReconciler,
30463035
};
30473036
if (enableCache) {
30483037
(HooksDispatcherOnMountInDEV: Dispatcher).useCacheRefresh = function useCacheRefresh() {
@@ -3198,8 +3187,6 @@ if (__DEV__) {
31983187
updateHookTypesDev();
31993188
return mountId();
32003189
},
3201-
3202-
unstable_isNewReconciler: enableNewReconciler,
32033190
};
32043191
if (enableCache) {
32053192
(HooksDispatcherOnMountWithHookTypesInDEV: Dispatcher).useCacheRefresh = function useCacheRefresh() {
@@ -3355,8 +3342,6 @@ if (__DEV__) {
33553342
updateHookTypesDev();
33563343
return updateId();
33573344
},
3358-
3359-
unstable_isNewReconciler: enableNewReconciler,
33603345
};
33613346
if (enableCache) {
33623347
(HooksDispatcherOnUpdateInDEV: Dispatcher).useCacheRefresh = function useCacheRefresh() {
@@ -3513,8 +3498,6 @@ if (__DEV__) {
35133498
updateHookTypesDev();
35143499
return updateId();
35153500
},
3516-
3517-
unstable_isNewReconciler: enableNewReconciler,
35183501
};
35193502
if (enableCache) {
35203503
(HooksDispatcherOnRerenderInDEV: Dispatcher).useCacheRefresh = function useCacheRefresh() {
@@ -3687,8 +3670,6 @@ if (__DEV__) {
36873670
mountHookTypesDev();
36883671
return mountId();
36893672
},
3690-
3691-
unstable_isNewReconciler: enableNewReconciler,
36923673
};
36933674
if (enableCache) {
36943675
(InvalidNestedHooksDispatcherOnMountInDEV: Dispatcher).useCacheRefresh = function useCacheRefresh() {
@@ -3872,8 +3853,6 @@ if (__DEV__) {
38723853
updateHookTypesDev();
38733854
return updateId();
38743855
},
3875-
3876-
unstable_isNewReconciler: enableNewReconciler,
38773856
};
38783857
if (enableCache) {
38793858
(InvalidNestedHooksDispatcherOnUpdateInDEV: Dispatcher).useCacheRefresh = function useCacheRefresh() {
@@ -4058,8 +4037,6 @@ if (__DEV__) {
40584037
updateHookTypesDev();
40594038
return updateId();
40604039
},
4061-
4062-
unstable_isNewReconciler: enableNewReconciler,
40634040
};
40644041
if (enableCache) {
40654042
(InvalidNestedHooksDispatcherOnRerenderInDEV: Dispatcher).useCacheRefresh = function useCacheRefresh() {

0 commit comments

Comments
 (0)