mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Delete ReactNativeStack 🎉 🎉 🎉 (#10511)
* Removed createReactNativeComponentClassStack and renamed createReactNativeComponentClassFiber => createReactNativeComponentClass * Removed findNumericNodeHandleStack and renamed findNumericNodeHandleFiber => findNumericNodeHandle * Renamed ReactNativeFiberEntry => ReactNativeEntry * Removed all references to ReactNativeFeatureFlags and RN stack * Removed severl RN modules that are no longer used * Renamed ReactNativeEntry => ReactNativeFiberEntry for now. We'll probably remove 'fiber' references later * Update build results json * Deleted snapshot * Re-add accidentally deleted test * Remove now-unnecessary hack in test * Fix lint * RN findNodeHandle no longer adds props directly to read-only owner (#10520) * Added ReactNativeMount-test snapshot for 'renders and reorders children' test
This commit is contained in:
@@ -14,12 +14,6 @@ jest.mock('ReactFeatureFlags', () => {
|
||||
disableNewFiberFeatures: true,
|
||||
});
|
||||
});
|
||||
jest.mock('ReactNativeFeatureFlags', () => {
|
||||
const flags = require.requireActual('ReactNativeFeatureFlags');
|
||||
return Object.assign({}, flags, {
|
||||
useFiber: true,
|
||||
});
|
||||
});
|
||||
|
||||
// Error logging varies between Fiber and Stack;
|
||||
// Rather than fork dozens of tests, mock the error-logging file by default.
|
||||
|
||||
@@ -8,12 +8,6 @@ jest.mock('ReactDOMFeatureFlags', () => {
|
||||
useFiber: false,
|
||||
});
|
||||
});
|
||||
jest.mock('ReactNativeFeatureFlags', () => {
|
||||
const flags = require.requireActual('ReactNativeFeatureFlags');
|
||||
return Object.assign({}, flags, {
|
||||
useFiber: false,
|
||||
});
|
||||
});
|
||||
|
||||
// Error logging varies between Fiber and Stack;
|
||||
// Rather than fork dozens of tests, mock the error-logging file by default.
|
||||
|
||||
@@ -251,48 +251,6 @@ const bundles = [
|
||||
},
|
||||
|
||||
/******* React Native *******/
|
||||
{
|
||||
babelOpts: babelOptsReact,
|
||||
bundleTypes: [RN_DEV, RN_PROD],
|
||||
config: {
|
||||
destDir: 'build/',
|
||||
moduleName: 'ReactNativeStack',
|
||||
sourceMap: false,
|
||||
},
|
||||
entry: 'src/renderers/native/ReactNativeStackEntry',
|
||||
externals: [
|
||||
'ExceptionsManager',
|
||||
'InitializeCore',
|
||||
'ReactNativeFeatureFlags',
|
||||
'RCTEventEmitter',
|
||||
'TextInputState',
|
||||
'UIManager',
|
||||
'View',
|
||||
'deepDiffer',
|
||||
'deepFreezeAndThrowOnMutationInDev',
|
||||
'flattenStyle',
|
||||
'prop-types/checkPropTypes',
|
||||
],
|
||||
hasteName: 'ReactNativeStack',
|
||||
isRenderer: true,
|
||||
label: 'native-stack',
|
||||
manglePropertiesOnProd: false,
|
||||
name: 'react-native-renderer',
|
||||
paths: [
|
||||
'src/renderers/native/**/*.js',
|
||||
'src/renderers/shared/**/*.js',
|
||||
|
||||
'src/ReactVersion.js',
|
||||
'src/shared/**/*.js',
|
||||
],
|
||||
useFiber: false,
|
||||
modulesToStub: [
|
||||
'createReactNativeComponentClassFiber',
|
||||
'ReactNativeFiberRenderer',
|
||||
'findNumericNodeHandleFiber',
|
||||
'ReactNativeFiber',
|
||||
],
|
||||
},
|
||||
{
|
||||
babelOpts: babelOptsReact,
|
||||
bundleTypes: [RN_DEV, RN_PROD],
|
||||
@@ -305,7 +263,6 @@ const bundles = [
|
||||
externals: [
|
||||
'ExceptionsManager',
|
||||
'InitializeCore',
|
||||
'ReactNativeFeatureFlags',
|
||||
'RCTEventEmitter',
|
||||
'TextInputState',
|
||||
'UIManager',
|
||||
@@ -328,11 +285,6 @@ const bundles = [
|
||||
'src/shared/**/*.js',
|
||||
],
|
||||
useFiber: true,
|
||||
modulesToStub: [
|
||||
'createReactNativeComponentClassStack',
|
||||
'findNumericNodeHandleStack',
|
||||
'ReactNativeStack',
|
||||
],
|
||||
},
|
||||
|
||||
/******* React Test Renderer *******/
|
||||
|
||||
@@ -129,8 +129,6 @@ function ignoreReactNativeModules() {
|
||||
return [
|
||||
// This imports NativeMethodsMixin, causing a circular dependency.
|
||||
'View',
|
||||
// This file is injected based on a runtime config.
|
||||
'ReactNativeFeatureFlags',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
+10
-18
@@ -57,24 +57,24 @@
|
||||
"gzip": 13357
|
||||
},
|
||||
"react-dom-unstable-native-dependencies.development.js (UMD_DEV)": {
|
||||
"size": 88285,
|
||||
"gzip": 22345
|
||||
"size": 87907,
|
||||
"gzip": 22195
|
||||
},
|
||||
"react-dom-unstable-native-dependencies.production.min.js (UMD_PROD)": {
|
||||
"size": 15149,
|
||||
"gzip": 4910
|
||||
},
|
||||
"react-dom-unstable-native-dependencies.development.js (NODE_DEV)": {
|
||||
"size": 81733,
|
||||
"gzip": 20383
|
||||
"size": 81355,
|
||||
"gzip": 20240
|
||||
},
|
||||
"react-dom-unstable-native-dependencies.production.min.js (NODE_PROD)": {
|
||||
"size": 13926,
|
||||
"gzip": 4403
|
||||
},
|
||||
"ReactDOMUnstableNativeDependencies-dev.js (FB_DEV)": {
|
||||
"size": 81432,
|
||||
"gzip": 20341
|
||||
"size": 81054,
|
||||
"gzip": 20200
|
||||
},
|
||||
"ReactDOMUnstableNativeDependencies-prod.js (FB_PROD)": {
|
||||
"size": 66066,
|
||||
@@ -136,21 +136,13 @@
|
||||
"size": 220269,
|
||||
"gzip": 45845
|
||||
},
|
||||
"ReactNativeStack-dev.js (RN_DEV)": {
|
||||
"size": 201077,
|
||||
"gzip": 37401
|
||||
},
|
||||
"ReactNativeStack-prod.js (RN_PROD)": {
|
||||
"size": 136715,
|
||||
"gzip": 26222
|
||||
},
|
||||
"ReactNativeFiber-dev.js (RN_DEV)": {
|
||||
"size": 306002,
|
||||
"gzip": 52993
|
||||
"size": 303055,
|
||||
"gzip": 52683
|
||||
},
|
||||
"ReactNativeFiber-prod.js (RN_PROD)": {
|
||||
"size": 221418,
|
||||
"gzip": 38321
|
||||
"size": 218403,
|
||||
"gzip": 37966
|
||||
},
|
||||
"react-test-renderer.development.js (NODE_DEV)": {
|
||||
"size": 299567,
|
||||
|
||||
+2
-8
@@ -11,20 +11,14 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
const ReactNativeFeatureFlags = require('ReactNativeFeatureFlags');
|
||||
|
||||
import type {ReactNativeType} from 'ReactNativeTypes';
|
||||
|
||||
let ReactNative;
|
||||
|
||||
if (__DEV__) {
|
||||
ReactNative = ReactNativeFeatureFlags.useFiber
|
||||
? require('ReactNativeFiber-dev')
|
||||
: require('ReactNativeStack-dev');
|
||||
ReactNative = require('ReactNativeFiber-dev');
|
||||
} else {
|
||||
ReactNative = ReactNativeFeatureFlags.useFiber
|
||||
? require('ReactNativeFiber-prod')
|
||||
: require('ReactNativeStack-prod');
|
||||
ReactNative = require('ReactNativeFiber-prod');
|
||||
}
|
||||
|
||||
module.exports = (ReactNative: ReactNativeType);
|
||||
|
||||
Reference in New Issue
Block a user