From 468fda5c533d58d4aebc093218cfdc24076aed59 Mon Sep 17 00:00:00 2001 From: Igor Klemenski Date: Fri, 9 Apr 2021 15:00:47 -0700 Subject: [PATCH 1/5] Integrate 4/1 nightly RN build. --- .../react-native-win32-tester/overrides.json | 2 +- .../react-native-win32-tester/package.json | 4 +- .../react-native-win32/.flowconfig | 5 +- .../react-native-win32/overrides.json | 18 +- .../react-native-win32/package.json | 6 +- .../BatchedBridge/MessageQueue.win32.js | 8 +- .../AccessibilityInfo.win32.js | 9 +- .../legacySendAccessibilityEvent.win32.js | 6 + .../src/Libraries/Image/Image.win32.js | 41 +- .../react-native-win32/src/index.win32.js | 60 ++- .../tester/overrides.json | 2 +- .../@react-native-windows/tester/package.json | 4 +- .../@react-native/repo-config/overrides.json | 4 +- .../@react-native/repo-config/package.json | 2 +- .../js/components/RNTesterSettingSwitchRow.js | 6 +- .../js/examples/Alert/AlertIOSExample.js | 3 +- .../js/examples/Animated/AnimatedExample.js | 454 +----------------- .../Animated/AnimatedGratuitousApp/AnExApp.js | 18 +- .../ComposeAnimationsWithEasingExample.js | 123 +++++ .../Animated/ContinuousInteractionsExample.js | 21 + .../js/examples/Animated/FadeInViewExample.js | 82 ++++ .../js/examples/Animated/MovingBoxExample.js | 133 +++++ .../Animated/RotatingImagesExample.js | 86 ++++ .../Animated/TransformBounceExample.js | 94 ++++ .../js/examples/FlatList/FlatListExample.js | 6 +- .../tester/js/examples/Image/ImageExample.js | 30 +- .../js/examples/Layout/LayoutEventsExample.js | 7 +- .../NativeAnimationsExample.js | 24 +- .../PanResponder/PanResponderExample.js | 1 - .../PointerEvents/PointerEventsExample.js | 7 +- .../ScrollView/ScrollViewAnimatedExample.js | 10 +- .../examples/ScrollView/ScrollViewExample.js | 3 - .../examples/Snapshot/SnapshotViewIOS.ios.js | 2 +- .../js/examples/Switch/SwitchExample.js | 13 +- .../js/examples/Transform/TransformExample.js | 18 +- .../TurboModule/SampleTurboModuleExample.js | 12 +- packages/@react-native/tester/overrides.json | 4 +- packages/e2e-test-app/package.json | 2 +- packages/integration-test-app/package.json | 2 +- packages/node-rnw-rpc/package.json | 2 +- packages/playground/package.json | 2 +- packages/sample-apps/package.json | 2 +- vnext/.flowconfig | 5 +- vnext/ReactCommon/Yoga.cpp | 28 +- .../IntegrationTests/AsyncStorageTest.js | 7 +- .../IntegrationTestHarnessTest.js | 7 +- .../IntegrationTests/IntegrationTestsApp.js | 20 +- .../NativePushNotificationManagerIOSSpec.g.h | 12 +- vnext/overrides.json | 32 +- vnext/package.json | 6 +- .../AccessibilityInfo.windows.js | 9 +- .../legacySendAccessibilityEvent.windows.js | 6 + .../Components/Picker/Picker.windows.js | 12 +- .../Components/TextInput/TextInput.windows.js | 21 +- .../Touchable/TouchableHighlight.windows.js | 21 +- .../Touchable/TouchableOpacity.windows.js | 6 +- .../TouchableWithoutFeedback.windows.js | 2 + vnext/src/Libraries/Image/Image.windows.js | 41 +- .../Pressability/Pressability.windows.js | 18 +- vnext/src/index.windows.js | 60 ++- yarn.lock | 16 +- 61 files changed, 960 insertions(+), 707 deletions(-) create mode 100644 packages/@react-native/tester/js/examples/Animated/ComposeAnimationsWithEasingExample.js create mode 100644 packages/@react-native/tester/js/examples/Animated/ContinuousInteractionsExample.js create mode 100644 packages/@react-native/tester/js/examples/Animated/FadeInViewExample.js create mode 100644 packages/@react-native/tester/js/examples/Animated/MovingBoxExample.js create mode 100644 packages/@react-native/tester/js/examples/Animated/RotatingImagesExample.js create mode 100644 packages/@react-native/tester/js/examples/Animated/TransformBounceExample.js diff --git a/packages/@office-iss/react-native-win32-tester/overrides.json b/packages/@office-iss/react-native-win32-tester/overrides.json index 2bcda44146c..6325c0c11f1 100644 --- a/packages/@office-iss/react-native-win32-tester/overrides.json +++ b/packages/@office-iss/react-native-win32-tester/overrides.json @@ -5,7 +5,7 @@ "excludePatterns": [ "src/js/examples-win32/**" ], - "baseVersion": "0.0.0-cfb5b5e20", + "baseVersion": "0.0.0-d04ec4dc6", "overrides": [ { "type": "patch", diff --git a/packages/@office-iss/react-native-win32-tester/package.json b/packages/@office-iss/react-native-win32-tester/package.json index 973eeef50bd..f7a1b5c0c84 100644 --- a/packages/@office-iss/react-native-win32-tester/package.json +++ b/packages/@office-iss/react-native-win32-tester/package.json @@ -15,7 +15,7 @@ }, "peerDependencies": { "@office-iss/react-native-win32": "^0.0.0-canary.86", - "react-native": "0.0.0-cfb5b5e20" + "react-native": "0.0.0-d04ec4dc6" }, "devDependencies": { "@office-iss/react-native-win32": "^0.0.0-canary.86", @@ -24,7 +24,7 @@ "@types/node": "^14.14.22", "eslint": "7.12.0", "just-scripts": "^1.3.3", - "react-native": "0.0.0-cfb5b5e20", + "react-native": "0.0.0-d04ec4dc6", "react-native-platform-override": "^1.4.13", "typescript": "^3.8.3" } diff --git a/packages/@office-iss/react-native-win32/.flowconfig b/packages/@office-iss/react-native-win32/.flowconfig index 942bd21e94e..8b4d8e4b1ce 100644 --- a/packages/@office-iss/react-native-win32/.flowconfig +++ b/packages/@office-iss/react-native-win32/.flowconfig @@ -88,9 +88,6 @@ suppress_type=$FlowFixMeProps suppress_type=$FlowFixMeState suppress_type=$FlowFixMeEmpty -experimental.abstract_locations=true -experimental.new_signatures=true - [lints] sketchy-null-number=warn sketchy-null-mixed=warn @@ -112,4 +109,4 @@ untyped-import untyped-type-import [version] -^0.146.0 +^0.148.0 diff --git a/packages/@office-iss/react-native-win32/overrides.json b/packages/@office-iss/react-native-win32/overrides.json index 4cac06b5f20..820a046dc04 100644 --- a/packages/@office-iss/react-native-win32/overrides.json +++ b/packages/@office-iss/react-native-win32/overrides.json @@ -3,45 +3,45 @@ ".flowconfig", "src/**" ], - "baseVersion": "0.0.0-cfb5b5e20", + "baseVersion": "0.0.0-d04ec4dc6", "overrides": [ { "type": "derived", "file": ".flowconfig", "baseFile": ".flowconfig", - "baseHash": "718336b53dd84d09a5331cc4c6a3726114510030" + "baseHash": "7c2f3e8ecf80e5229d4e1fdad2b6ef324acae0c4" }, { "type": "derived", "file": "src/index.win32.js", "baseFile": "index.js", - "baseHash": "ca978f1d83fd841a2aa9f30f3bfabb620de21273" + "baseHash": "84a9a90c70deaf3e42a67c82beafb1240c41bc95" }, { "type": "patch", "file": "src/Libraries/Alert/Alert.win32.js", "baseFile": "Libraries/Alert/Alert.js", - "baseHash": "6ea428202edeea40370df390a6b8f7ab794270ac" + "baseHash": "99f0bc2c38daf35d5f08a0e0abeb5f21e583ce4e" }, { "type": "patch", "file": "src/Libraries/BatchedBridge/MessageQueue.win32.js", "baseFile": "Libraries/BatchedBridge/MessageQueue.js", - "baseHash": "85eea8e9510b516c12e19fcfedc4553b990feb11", + "baseHash": "c47cdef67892acc92ca1df8aceef6909db24a029", "issue": 5807 }, { "type": "copy", "file": "src/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js", "baseFile": "Libraries/Components/AccessibilityInfo/AccessibilityInfo.android.js", - "baseHash": "a1534c3bec8ef3537345310684e129e7819b769f", + "baseHash": "54cf7e87dff60489f95adef777d73427eab0c866", "issue": 4578 }, { "type": "copy", "file": "src/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.win32.js", "baseFile": "Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.android.js", - "baseHash": "1255817acafffa2461805c76a10daafc233de377", + "baseHash": "154f615eba014a1df9ff2d54591219dbbc53f381", "issue": 4578 }, { @@ -152,7 +152,7 @@ "type": "derived", "file": "src/Libraries/Components/TextInput/TextInput.win32.tsx", "baseFile": "Libraries/Components/TextInput/TextInput.js", - "baseHash": "4f5fe56bdded55bbeee1b54356f82361bb1f8b02" + "baseHash": "506d84a349fef1ad532b7c02a1836fce7befa616" }, { "type": "patch", @@ -233,7 +233,7 @@ "type": "derived", "file": "src/Libraries/Image/Image.win32.js", "baseFile": "Libraries/Image/Image.ios.js", - "baseHash": "9fb656bbb836310325789d897879f769124eb31c", + "baseHash": "bb70db26cb8d42b51037d43a6ab9eace183a0f71", "issue": 4320 }, { diff --git a/packages/@office-iss/react-native-win32/package.json b/packages/@office-iss/react-native-win32/package.json index 53493d899d2..41bad27ce97 100644 --- a/packages/@office-iss/react-native-win32/package.json +++ b/packages/@office-iss/react-native-win32/package.json @@ -61,19 +61,19 @@ "@types/react-native": "^0.63.46", "babel-eslint": "^10.1.0", "eslint": "7.12.0", - "flow-bin": "^0.146.0", + "flow-bin": "^0.148.0", "jscodeshift": "^0.11.0", "just-scripts": "^1.3.3", "prettier": "1.19.1", "react": "17.0.1", - "react-native": "0.0.0-cfb5b5e20", + "react-native": "0.0.0-d04ec4dc6", "react-native-platform-override": "^1.4.13", "react-shallow-renderer": "16.14.1", "typescript": "^3.8.3" }, "peerDependencies": { "react": "17.0.1", - "react-native": "0.0.0-cfb5b5e20" + "react-native": "0.0.0-d04ec4dc6" }, "beachball": { "defaultNpmTag": "canary", diff --git a/packages/@office-iss/react-native-win32/src/Libraries/BatchedBridge/MessageQueue.win32.js b/packages/@office-iss/react-native-win32/src/Libraries/BatchedBridge/MessageQueue.win32.js index 0730030ff93..3589bc12fbc 100644 --- a/packages/@office-iss/react-native-win32/src/Libraries/BatchedBridge/MessageQueue.win32.js +++ b/packages/@office-iss/react-native-win32/src/Libraries/BatchedBridge/MessageQueue.win32.js @@ -159,9 +159,9 @@ class MessageQueue { this._lazyCallableModules[name] = () => module; } - registerLazyCallableModule(name: string, factory: void => {...}) { - let module: {...}; - let getValue: ?(void) => {...} = factory; + registerLazyCallableModule(name: string, factory: void => interface {}) { + let module: interface {}; + let getValue: ?(void) => interface {} = factory; this._lazyCallableModules[name] = () => { if (getValue) { module = getValue(); @@ -390,7 +390,7 @@ class MessageQueue { // can be configured by the VM or any Inspector __shouldPauseOnThrow(): boolean { return ( - // $FlowFixMe + // $FlowFixMe[cannot-resolve-name] typeof DebuggerInternal !== 'undefined' && DebuggerInternal.shouldPauseOnThrow === true // eslint-disable-line no-undef ); diff --git a/packages/@office-iss/react-native-win32/src/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js b/packages/@office-iss/react-native-win32/src/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js index d619b897254..28e794d19a3 100644 --- a/packages/@office-iss/react-native-win32/src/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +++ b/packages/@office-iss/react-native-win32/src/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js @@ -26,7 +26,7 @@ type AccessibilityEventDefinitions = { change: [boolean], }; -type AccessibilityEventTypes = 'focus'; +type AccessibilityEventTypes = 'focus' | 'click'; const _subscriptions = new Map(); @@ -162,7 +162,12 @@ const AccessibilityInfo = { eventType: AccessibilityEventTypes, ) { // route through React renderer to distinguish between Fabric and non-Fabric handles - sendAccessibilityEvent(handle, eventType); + // iOS only supports 'focus' event types + if (eventType === 'focus') { + sendAccessibilityEvent(handle, eventType); + } else if (eventType === 'click') { + // Do nothing! + } }, /** diff --git a/packages/@office-iss/react-native-win32/src/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.win32.js b/packages/@office-iss/react-native-win32/src/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.win32.js index edc950427d6..3bb1c554950 100644 --- a/packages/@office-iss/react-native-win32/src/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.win32.js +++ b/packages/@office-iss/react-native-win32/src/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.win32.js @@ -24,6 +24,12 @@ function legacySendAccessibilityEvent( UIManager.getConstants().AccessibilityEventTypes.typeViewFocused, ); } + if (eventType === 'click') { + UIManager.sendAccessibilityEvent( + reactTag, + UIManager.getConstants().AccessibilityEventTypes.typeViewClicked, + ); + } } module.exports = legacySendAccessibilityEvent; diff --git a/packages/@office-iss/react-native-win32/src/Libraries/Image/Image.win32.js b/packages/@office-iss/react-native-win32/src/Libraries/Image/Image.win32.js index d5da4dc4270..8578766ba58 100644 --- a/packages/@office-iss/react-native-win32/src/Libraries/Image/Image.win32.js +++ b/packages/@office-iss/react-native-win32/src/Libraries/Image/Image.win32.js @@ -132,12 +132,10 @@ let Image = (props: ImagePropsType, forwardedRef) => { let sources; let style: ImageStyleProp; if (Array.isArray(source)) { - // $FlowFixMe flattenStyle is not strong enough style = flattenStyle([styles.base, props.style]) || {}; sources = source; } else { const {width, height, uri} = source; - // $FlowFixMe flattenStyle is not strong enough style = flattenStyle([{width, height}, styles.base, props.style]) || {}; sources = [source]; @@ -209,9 +207,9 @@ Image.displayName = 'Image'; * * See https://reactnative.dev/docs/image.html#getsize */ -/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete this - * comment and run Flow. */ +/* $FlowFixMe[prop-missing] (>=0.89.0 site=react_native_ios_fb) This comment + * suppresses an error found when Flow v0.89 was deployed. To see the error, + * delete this comment and run Flow. */ Image.getSize = getSize; /** @@ -220,9 +218,9 @@ Image.getSize = getSize; * * See https://reactnative.dev/docs/image.html#getsizewithheaders */ -/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete this - * comment and run Flow. */ +/* $FlowFixMe[prop-missing] (>=0.89.0 site=react_native_ios_fb) This comment + * suppresses an error found when Flow v0.89 was deployed. To see the error, + * delete this comment and run Flow. */ Image.getSizeWithHeaders = getSizeWithHeaders; /** @@ -231,9 +229,9 @@ Image.getSizeWithHeaders = getSizeWithHeaders; * * See https://reactnative.dev/docs/image.html#prefetch */ -/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete this - * comment and run Flow. */ +/* $FlowFixMe[prop-missing] (>=0.89.0 site=react_native_ios_fb) This comment + * suppresses an error found when Flow v0.89 was deployed. To see the error, + * delete this comment and run Flow. */ Image.prefetch = prefetch; /** @@ -242,9 +240,9 @@ Image.prefetch = prefetch; * * See https://reactnative.dev/docs/image.html#prefetch */ -/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete this - * comment and run Flow. */ +/* $FlowFixMe[prop-missing] (>=0.89.0 site=react_native_ios_fb) This comment + * suppresses an error found when Flow v0.89 was deployed. To see the error, + * delete this comment and run Flow. */ Image.prefetchWithMetadata = prefetchWithMetadata; /** @@ -252,9 +250,9 @@ Image.prefetchWithMetadata = prefetchWithMetadata; * * See https://reactnative.dev/docs/image.html#querycache */ -/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete this - * comment and run Flow. */ +/* $FlowFixMe[prop-missing] (>=0.89.0 site=react_native_ios_fb) This comment + * suppresses an error found when Flow v0.89 was deployed. To see the error, + * delete this comment and run Flow. */ Image.queryCache = queryCache; /** @@ -262,14 +260,11 @@ Image.queryCache = queryCache; * * See https://reactnative.dev/docs/image.html#resolveassetsource */ -/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete this - * comment and run Flow. */ +/* $FlowFixMe[prop-missing] (>=0.89.0 site=react_native_ios_fb) This comment + * suppresses an error found when Flow v0.89 was deployed. To see the error, + * delete this comment and run Flow. */ Image.resolveAssetSource = resolveAssetSource; -/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete this - * comment and run Flow. */ Image.propTypes = DeprecatedImagePropType; const styles = StyleSheet.create({ diff --git a/packages/@office-iss/react-native-win32/src/index.win32.js b/packages/@office-iss/react-native-win32/src/index.win32.js index 7cf6ac13e69..91809e30191 100644 --- a/packages/@office-iss/react-native-win32/src/index.win32.js +++ b/packages/@office-iss/react-native-win32/src/index.win32.js @@ -546,7 +546,10 @@ module.exports = { }; if (__DEV__) { - // $FlowFixMe This is intentional: Flow will error when attempting to access ART. + /* $FlowFixMe[prop-missing] This is intentional: Flow will error when + * attempting to access ART. */ + /* $FlowFixMe[invalid-export] This is intentional: Flow will error when + * attempting to access ART. */ Object.defineProperty(module.exports, 'ART', { configurable: true, get() { @@ -559,7 +562,10 @@ if (__DEV__) { }, }); - // $FlowFixMe This is intentional: Flow will error when attempting to access ListView. + /* $FlowFixMe[prop-missing] This is intentional: Flow will error when + * attempting to access ListView. */ + /* $FlowFixMe[invalid-export] This is intentional: Flow will error when + * attempting to access ListView. */ Object.defineProperty(module.exports, 'ListView', { configurable: true, get() { @@ -572,7 +578,10 @@ if (__DEV__) { }, }); - // $FlowFixMe This is intentional: Flow will error when attempting to access SwipeableListView. + /* $FlowFixMe[prop-missing] This is intentional: Flow will error when + * attempting to access SwipeableListView. */ + /* $FlowFixMe[invalid-export] This is intentional: Flow will error when + * attempting to access SwipeableListView. */ Object.defineProperty(module.exports, 'SwipeableListView', { configurable: true, get() { @@ -585,7 +594,10 @@ if (__DEV__) { }, }); - // $FlowFixMe This is intentional: Flow will error when attempting to access WebView. + /* $FlowFixMe[prop-missing] This is intentional: Flow will error when + * attempting to access WebView. */ + /* $FlowFixMe[invalid-export] This is intentional: Flow will error when + * attempting to access WebView. */ Object.defineProperty(module.exports, 'WebView', { configurable: true, get() { @@ -598,7 +610,10 @@ if (__DEV__) { }, }); - // $FlowFixMe This is intentional: Flow will error when attempting to access NetInfo. + /* $FlowFixMe[prop-missing] This is intentional: Flow will error when + * attempting to access NetInfo. */ + /* $FlowFixMe[invalid-export] This is intentional: Flow will error when + * attempting to access NetInfo. */ Object.defineProperty(module.exports, 'NetInfo', { configurable: true, get() { @@ -611,7 +626,10 @@ if (__DEV__) { }, }); - // $FlowFixMe This is intentional: Flow will error when attempting to access CameraRoll. + /* $FlowFixMe[prop-missing] This is intentional: Flow will error when + * attempting to access CameraRoll. */ + /* $FlowFixMe[invalid-export] This is intentional: Flow will error when + * attempting to access CameraRoll. */ Object.defineProperty(module.exports, 'CameraRoll', { configurable: true, get() { @@ -624,7 +642,10 @@ if (__DEV__) { }, }); - // $FlowFixMe This is intentional: Flow will error when attempting to access ImageStore. + /* $FlowFixMe[prop-missing] This is intentional: Flow will error when + * attempting to access ImageStore. */ + /* $FlowFixMe[invalid-export] This is intentional: Flow will error when + * attempting to access ImageStore. */ Object.defineProperty(module.exports, 'ImageStore', { configurable: true, get() { @@ -638,7 +659,10 @@ if (__DEV__) { }, }); - // $FlowFixMe This is intentional: Flow will error when attempting to access ImageEditor. + /* $FlowFixMe[prop-missing] This is intentional: Flow will error when + * attempting to access ImageEditor. */ + /* $FlowFixMe[invalid-export] This is intentional: Flow will error when + * attempting to access ImageEditor. */ Object.defineProperty(module.exports, 'ImageEditor', { configurable: true, get() { @@ -651,7 +675,10 @@ if (__DEV__) { }, }); - // $FlowFixMe This is intentional: Flow will error when attempting to access TimePickerAndroid. + /* $FlowFixMe[prop-missing] This is intentional: Flow will error when + * attempting to access TimePickerAndroid. */ + /* $FlowFixMe[invalid-export] This is intentional: Flow will error when + * attempting to access TimePickerAndroid. */ Object.defineProperty(module.exports, 'TimePickerAndroid', { configurable: true, get() { @@ -664,7 +691,10 @@ if (__DEV__) { }, }); - // $FlowFixMe This is intentional: Flow will error when attempting to access ToolbarAndroid. + /* $FlowFixMe[prop-missing] This is intentional: Flow will error when + * attempting to access ToolbarAndroid. */ + /* $FlowFixMe[invalid-export] This is intentional: Flow will error when + * attempting to access ToolbarAndroid. */ Object.defineProperty(module.exports, 'ToolbarAndroid', { configurable: true, get() { @@ -677,7 +707,10 @@ if (__DEV__) { }, }); - // $FlowFixMe This is intentional: Flow will error when attempting to access ViewPagerAndroid. + /* $FlowFixMe[prop-missing] This is intentional: Flow will error when + * attempting to access ViewPagerAndroid. */ + /* $FlowFixMe[invalid-export] This is intentional: Flow will error when + * attempting to access ViewPagerAndroid. */ Object.defineProperty(module.exports, 'ViewPagerAndroid', { configurable: true, get() { @@ -690,7 +723,10 @@ if (__DEV__) { }, }); - // $FlowFixMe This is intentional: Flow will error when attempting to access CheckBox. + /* $FlowFixMe[prop-missing] This is intentional: Flow will error when + * attempting to access CheckBox. */ + /* $FlowFixMe[invalid-export] This is intentional: Flow will error when + * attempting to access CheckBox. */ Object.defineProperty(module.exports, 'CheckBox', { configurable: true, get() { diff --git a/packages/@react-native-windows/tester/overrides.json b/packages/@react-native-windows/tester/overrides.json index 34ab72d5f8b..14bb1d543d7 100644 --- a/packages/@react-native-windows/tester/overrides.json +++ b/packages/@react-native-windows/tester/overrides.json @@ -5,7 +5,7 @@ "excludePatterns": [ "src/js/examples-win/**" ], - "baseVersion": "0.0.0-cfb5b5e20", + "baseVersion": "0.0.0-d04ec4dc6", "overrides": [ { "type": "patch", diff --git a/packages/@react-native-windows/tester/package.json b/packages/@react-native-windows/tester/package.json index 12196c4caf2..27d9df2eb5b 100644 --- a/packages/@react-native-windows/tester/package.json +++ b/packages/@react-native-windows/tester/package.json @@ -14,7 +14,7 @@ "@react-native/tester": "0.0.1" }, "peerDependencies": { - "react-native": "0.0.0-cfb5b5e20", + "react-native": "0.0.0-d04ec4dc6", "react-native-windows": "^0.0.0-canary.291" }, "devDependencies": { @@ -23,7 +23,7 @@ "@types/node": "^14.14.22", "eslint": "7.12.0", "just-scripts": "^1.3.3", - "react-native": "0.0.0-cfb5b5e20", + "react-native": "0.0.0-d04ec4dc6", "react-native-platform-override": "^1.4.13", "react-native-windows": "^0.0.0-canary.291", "typescript": "^3.8.3" diff --git a/packages/@react-native/repo-config/overrides.json b/packages/@react-native/repo-config/overrides.json index 2df7258dfeb..0c5a736bfae 100644 --- a/packages/@react-native/repo-config/overrides.json +++ b/packages/@react-native/repo-config/overrides.json @@ -1,11 +1,11 @@ { - "baseVersion": "0.0.0-cfb5b5e20", + "baseVersion": "0.0.0-d04ec4dc6", "overrides": [ { "type": "copy", "file": "package.json", "baseFile": "repo-config/package.json", - "baseHash": "c5732dbb013a0106180a1912dd26a92ed4ea7a35" + "baseHash": "67c2105df600cecba7fa10558e85ab64cf498e1e" } ] } \ No newline at end of file diff --git a/packages/@react-native/repo-config/package.json b/packages/@react-native/repo-config/package.json index 7f4e9cc809e..ae3ba53e141 100644 --- a/packages/@react-native/repo-config/package.json +++ b/packages/@react-native/repo-config/package.json @@ -33,7 +33,7 @@ "eslint-plugin-react-hooks": "^4.2.0", "eslint-plugin-react-native": "3.10.0", "eslint-plugin-relay": "1.8.1", - "flow-bin": "^0.146.0", + "flow-bin": "^0.148.0", "jest": "^26.5.2", "jest-junit": "^10.0.0", "jscodeshift": "^0.11.0", diff --git a/packages/@react-native/tester/js/components/RNTesterSettingSwitchRow.js b/packages/@react-native/tester/js/components/RNTesterSettingSwitchRow.js index fafcf7a5ffb..3d38793e9ea 100644 --- a/packages/@react-native/tester/js/components/RNTesterSettingSwitchRow.js +++ b/packages/@react-native/tester/js/components/RNTesterSettingSwitchRow.js @@ -47,9 +47,9 @@ const styles = StyleSheet.create({ justifyContent: 'space-between', }, }); -/* $FlowFixMe(>=0.85.0 site=react_native_fb) This comment suppresses an error - * found when Flow v0.85 was deployed. To see the error, delete this comment - * and run Flow. */ +/* $FlowFixMe[cannot-reassign-export] (>=0.85.0 site=react_native_fb) This + * comment suppresses an error found when Flow v0.85 was deployed. To see the + * error, delete this comment and run Flow. */ RNTesterSettingSwitchRow = RNTesterStatePersister.createContainer( RNTesterSettingSwitchRow, { diff --git a/packages/@react-native/tester/js/examples/Alert/AlertIOSExample.js b/packages/@react-native/tester/js/examples/Alert/AlertIOSExample.js index 62d857d543b..72c2c5302a2 100644 --- a/packages/@react-native/tester/js/examples/Alert/AlertIOSExample.js +++ b/packages/@react-native/tester/js/examples/Alert/AlertIOSExample.js @@ -32,7 +32,8 @@ class PromptOptions extends React.Component { constructor(props) { super(props); - // $FlowFixMe this seems to be a Flow bug, `saveResponse` is defined below + /* $FlowFixMe[cannot-write] this seems to be a Flow bug, `saveResponse` is + * defined below */ this.saveResponse = this.saveResponse.bind(this); this.customButtons = [ diff --git a/packages/@react-native/tester/js/examples/Animated/AnimatedExample.js b/packages/@react-native/tester/js/examples/Animated/AnimatedExample.js index e8e64ac518f..1ba665cfc84 100644 --- a/packages/@react-native/tester/js/examples/Animated/AnimatedExample.js +++ b/packages/@react-native/tester/js/examples/Animated/AnimatedExample.js @@ -10,27 +10,13 @@ 'use strict'; -const RNTesterButton = require('../../components/RNTesterButton'); -const React = require('react'); -const {Animated, Easing, StyleSheet, Text, View} = require('react-native'); - import type {RNTesterExampleModuleItem} from '../../types/RNTesterTypes'; - -const styles = StyleSheet.create({ - content: { - backgroundColor: 'deepskyblue', - borderWidth: 1, - borderColor: 'dodgerblue', - padding: 20, - margin: 20, - borderRadius: 10, - alignItems: 'center', - }, - rotatingImage: { - width: 70, - height: 70, - }, -}); +import RotatingImagesExample from './RotatingImagesExample'; +import ContinuousInteractionsExample from './ContinuousInteractionsExample'; +import MovingBoxExample from './MovingBoxExample'; +import FadeInViewExample from './FadeInViewExample'; +import ComposeAnimationsWithEasingExample from './ComposeAnimationsWithEasingExample'; +import TransformBounceExample from './TransformBounceExample'; exports.framework = 'React'; exports.title = 'Animated - Examples'; @@ -41,426 +27,10 @@ exports.description = ('Animated provides a powerful ' + 'interactive user experiences.': string); exports.examples = ([ - { - title: 'FadeInView', - name: 'fadeInView', - description: ('Uses a simple timing animation to ' + - 'bring opacity from 0 to 1 when the component ' + - 'mounts.': string), - render: function(): React.Node { - class FadeInView extends React.Component<$FlowFixMeProps, any> { - constructor(props) { - super(props); - this.state = { - fadeAnim: new Animated.Value(0), // opacity 0 - }; - } - componentDidMount() { - Animated.timing( - // Uses easing functions - this.state.fadeAnim, // The value to drive - { - // Target - toValue: 1, - - // Configuration - duration: 2000, - - useNativeDriver: false, - }, - ).start(); // Don't forget start! - } - render() { - return ( - - {this.props.children} - - ); - } - } - - type Props = $ReadOnly<{||}>; - type State = {|show: boolean|}; - class FadeInExample extends React.Component { - constructor(props: Props) { - super(props); - this.state = { - show: true, - }; - } - render() { - return ( - - { - this.setState(state => ({show: !state.show})); - }}> - Press to {this.state.show ? 'Hide' : 'Show'} - - {this.state.show && ( - - - FadeInView - - - )} - - ); - } - } - return ; - }, - }, - { - title: 'Transform Bounce', - description: ('One `Animated.Value` is driven by a ' + - 'spring with custom constants and mapped to an ' + - 'ordered set of transforms. Each transform has ' + - 'an interpolation to convert the value into the ' + - 'right range and units.': string), - render: function(): React.Node { - this.anim = this.anim || new Animated.Value(0); - return ( - - { - Animated.spring(this.anim, { - // Returns to the start - toValue: 0, - - // Velocity makes it move - velocity: 3, - - // Slow - tension: -10, - - // Oscillate a lot - friction: 1, - - useNativeDriver: false, - }).start(); - }}> - Press to Fling it! - - - Transforms! - - - ); - }, - }, - { - title: 'Composite Animations with Easing', - description: ('Sequence, parallel, delay, and ' + - 'stagger with different easing functions.': string), - render: function(): React.Node { - this.anims = this.anims || [1, 2, 3].map(() => new Animated.Value(0)); - return ( - - { - const timing = Animated.timing; - Animated.sequence([ - // One after the other - timing(this.anims[0], { - toValue: 200, - easing: Easing.linear, - useNativeDriver: false, - }), - Animated.delay(400), // Use with sequence - timing(this.anims[0], { - toValue: 0, - - // Springy - easing: Easing.elastic(2), - - useNativeDriver: false, - }), - Animated.delay(400), - Animated.stagger( - 200, - this.anims - .map(anim => - timing(anim, { - toValue: 200, - useNativeDriver: false, - }), - ) - .concat( - this.anims.map(anim => - timing(anim, { - toValue: 0, - useNativeDriver: false, - }), - ), - ), - ), - Animated.delay(400), - Animated.parallel( - [ - Easing.inOut(Easing.quad), // Symmetric - Easing.back(1.5), // Goes backwards first - Easing.ease, // Default bezier - ].map((easing, ii) => - timing(this.anims[ii], { - toValue: 320, - easing, - duration: 3000, - useNativeDriver: false, - }), - ), - ), - Animated.delay(400), - Animated.stagger( - 200, - this.anims.map(anim => - timing(anim, { - toValue: 0, - - // Like a ball - easing: Easing.bounce, - - duration: 2000, - useNativeDriver: false, - }), - ), - ), - ]).start(); - }}> - Press to Animate - - {['Composite', 'Easing', 'Animations!'].map((text, ii) => ( - - {text} - - ))} - - ); - }, - }, - { - title: 'Rotating Images', - description: 'Simple Animated.Image rotation.', - render: function(): React.Node { - this.anim = this.anim || new Animated.Value(0); - return ( - - { - Animated.spring(this.anim, { - // Returns to the start - toValue: 0, - - // Velocity makes it move - velocity: 3, - - // Slow - tension: -10, - - // Oscillate a lot - friction: 1, - - useNativeDriver: false, - }).start(); - }}> - Press to Spin it! - - - - ); - }, - }, - { - title: 'Moving box example', - name: 'movingView', - description: ('Click arrow buttons to move the box.' + - 'Then hide the box and reveal it again.' + - 'After that the box position will reset to initial position.': string), - render: (): React.Node => { - const containerWidth = 200; - const boxSize = 50; - - const movingBoxStyles = StyleSheet.create({ - container: { - display: 'flex', - alignItems: 'center', - flexDirection: 'column', - backgroundColor: '#fff', - padding: 30, - }, - boxContainer: { - backgroundColor: '#d3d3d3', - height: boxSize, - width: containerWidth, - }, - box: { - width: boxSize, - height: boxSize, - margin: 0, - }, - buttonsContainer: { - marginTop: 20, - display: 'flex', - flexDirection: 'row', - justifyContent: 'space-between', - width: containerWidth, - }, - }); - type Props = $ReadOnly<{||}>; - type State = {|boxVisible: boolean|}; - - class MovingBoxExample extends React.Component { - x: Animated.Value; - constructor(props) { - super(props); - this.x = new Animated.Value(0); - this.state = { - boxVisible: true, - }; - } - - render() { - const {boxVisible} = this.state; - const toggleText = boxVisible ? 'Hide' : 'Show'; - return ( - - {this.renderBox()} - - this.moveTo(0)}> - {'<-'} - - - {toggleText} - - this.moveTo(containerWidth - boxSize)}> - {'->'} - - - - ); - } - - renderBox = () => { - if (this.state.boxVisible) { - const horizontalLocation = {transform: [{translateX: this.x}]}; - return ( - - - - ); - } else { - return ( - - The box view is not being rendered - - ); - } - }; - - moveTo = x => { - Animated.timing(this.x, { - toValue: x, - duration: 1000, - useNativeDriver: true, - }).start(); - }; - - toggleVisibility = () => { - const {boxVisible} = this.state; - this.setState({boxVisible: !boxVisible}); - }; - } - return ; - }, - }, - { - title: 'Continuous Interactions', - description: ('Gesture events, chaining, 2D ' + - 'values, interrupting and transitioning ' + - 'animations, etc.': string), - render: (): React.Node => ( - Checkout the Gratuitous Animation App! - ), - }, + FadeInViewExample, + ComposeAnimationsWithEasingExample, + RotatingImagesExample, + MovingBoxExample, + TransformBounceExample, + ContinuousInteractionsExample, ]: Array); diff --git a/packages/@react-native/tester/js/examples/Animated/AnimatedGratuitousApp/AnExApp.js b/packages/@react-native/tester/js/examples/Animated/AnimatedGratuitousApp/AnExApp.js index 849efab08ea..9542eaa951b 100644 --- a/packages/@react-native/tester/js/examples/Animated/AnimatedGratuitousApp/AnExApp.js +++ b/packages/@react-native/tester/js/examples/Animated/AnimatedGratuitousApp/AnExApp.js @@ -15,9 +15,7 @@ const { Animated, LayoutAnimation, PanResponder, - Platform, StyleSheet, - UIManager, View, } = require('react-native'); @@ -41,10 +39,6 @@ class Circle extends React.Component { pan: new Animated.ValueXY(), // Vectors reduce boilerplate. (step1: uncomment) pop: new Animated.Value(0), // Initial value. (step2a: uncomment) }; - - if (Platform.OS === 'android') { - UIManager.setLayoutAnimationEnabledExperimental(true); - } } _onLongPress(): void { @@ -114,16 +108,16 @@ class Circle extends React.Component { onResponderGrant: () => { this.state.pan.setValue({x: 0, y: 0}); // reset (step1: uncomment) this.state.pan.setOffset(this.props.restLayout); // offset from onLayout (step1: uncomment) - /* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses - * an error found when Flow v0.63 was deployed. To see the error - * delete this comment and run Flow. */ + /* $FlowFixMe[incompatible-type] (>=0.63.0 site=react_native_fb) This + * comment suppresses an error found when Flow v0.63 was deployed. To + * see the error delete this comment and run Flow. */ this.longTimer = setTimeout(this._onLongPress, 300); }, onResponderRelease: () => { if (!this.state.panResponder) { - /* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment - * suppresses an error found when Flow v0.63 was deployed. To see - * the error delete this comment and run Flow. */ + /* $FlowFixMe[incompatible-call] (>=0.63.0 site=react_native_fb) + * This comment suppresses an error found when Flow v0.63 was + * deployed. To see the error delete this comment and run Flow. */ clearTimeout(this.longTimer); this._toggleIsActive(); } diff --git a/packages/@react-native/tester/js/examples/Animated/ComposeAnimationsWithEasingExample.js b/packages/@react-native/tester/js/examples/Animated/ComposeAnimationsWithEasingExample.js new file mode 100644 index 00000000000..4009d1d17f1 --- /dev/null +++ b/packages/@react-native/tester/js/examples/Animated/ComposeAnimationsWithEasingExample.js @@ -0,0 +1,123 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @flow strict-local + * @format + */ + +import type {RNTesterExampleModuleItem} from '../../types/RNTesterTypes'; +import * as React from 'react'; +import RNTesterButton from '../../components/RNTesterButton'; +import {Text, Easing, StyleSheet, View, Animated} from 'react-native'; + +const styles = StyleSheet.create({ + content: { + backgroundColor: 'deepskyblue', + borderWidth: 1, + borderColor: 'dodgerblue', + padding: 20, + margin: 20, + borderRadius: 10, + alignItems: 'center', + }, +}); + +export default ({ + title: 'Composite Animations with Easing', + description: ('Sequence, parallel, delay, and ' + + 'stagger with different easing functions.': string), + render: function(): React.Node { + this.anims = this.anims || [1, 2, 3].map(() => new Animated.Value(0)); + return ( + + { + const timing = Animated.timing; + Animated.sequence([ + // One after the other + timing(this.anims[0], { + toValue: 200, + easing: Easing.linear, + useNativeDriver: false, + }), + Animated.delay(400), // Use with sequence + timing(this.anims[0], { + toValue: 0, + + // Springy + easing: Easing.elastic(2), + + useNativeDriver: false, + }), + Animated.delay(400), + Animated.stagger( + 200, + this.anims + .map(anim => + timing(anim, { + toValue: 200, + useNativeDriver: false, + }), + ) + .concat( + this.anims.map(anim => + timing(anim, { + toValue: 0, + useNativeDriver: false, + }), + ), + ), + ), + Animated.delay(400), + Animated.parallel( + [ + Easing.inOut(Easing.quad), // Symmetric + Easing.back(1.5), // Goes backwards first + Easing.ease, // Default bezier + ].map((easing, ii) => + timing(this.anims[ii], { + toValue: 320, + easing, + duration: 3000, + useNativeDriver: false, + }), + ), + ), + Animated.delay(400), + Animated.stagger( + 200, + this.anims.map(anim => + timing(anim, { + toValue: 0, + + // Like a ball + easing: Easing.bounce, + + duration: 2000, + useNativeDriver: false, + }), + ), + ), + ]).start(); + }}> + Press to Animate + + {['Composite', 'Easing', 'Animations!'].map((text, ii) => ( + + {text} + + ))} + + ); + }, +}: RNTesterExampleModuleItem); diff --git a/packages/@react-native/tester/js/examples/Animated/ContinuousInteractionsExample.js b/packages/@react-native/tester/js/examples/Animated/ContinuousInteractionsExample.js new file mode 100644 index 00000000000..6b744ccaa79 --- /dev/null +++ b/packages/@react-native/tester/js/examples/Animated/ContinuousInteractionsExample.js @@ -0,0 +1,21 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @flow strict-local + * @format + */ + +import type {RNTesterExampleModuleItem} from '../../types/RNTesterTypes'; +import * as React from 'react'; +import {Text} from 'react-native'; + +export default ({ + title: 'Continuous Interactions', + description: ('Gesture events, chaining, 2D ' + + 'values, interrupting and transitioning ' + + 'animations, etc.': string), + render: (): React.Node => Checkout the Gratuitous Animation App!, +}: RNTesterExampleModuleItem); diff --git a/packages/@react-native/tester/js/examples/Animated/FadeInViewExample.js b/packages/@react-native/tester/js/examples/Animated/FadeInViewExample.js new file mode 100644 index 00000000000..38df5c33700 --- /dev/null +++ b/packages/@react-native/tester/js/examples/Animated/FadeInViewExample.js @@ -0,0 +1,82 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @flow strict-local + * @format + */ + +import type {RNTesterExampleModuleItem} from '../../types/RNTesterTypes'; +import * as React from 'react'; +import RNTesterButton from '../../components/RNTesterButton'; +import {Text, StyleSheet, View, Animated} from 'react-native'; + +const styles = StyleSheet.create({ + content: { + backgroundColor: 'deepskyblue', + borderWidth: 1, + borderColor: 'dodgerblue', + padding: 20, + margin: 20, + borderRadius: 10, + alignItems: 'center', + }, +}); + +function FadeInView({children}: {children: React.Node}) { + //opacity 0 + const [fadeAnim, setFadeAnim] = React.useState(() => new Animated.Value(0)); + React.useEffect(() => { + Animated.timing( + // Uses easing functions + fadeAnim, // The value to drive + { + // Target + toValue: 1, + + // Configuration + duration: 2000, + + useNativeDriver: false, + }, + ).start(); // Don't forget start! + }, [fadeAnim]); + + return ( + + {children} + + ); +} + +function FadeInExample(): React.Node { + const [show, setShow] = React.useState(true); + return ( + + setShow(!show)}> + Press to {show ? 'Hide' : 'Show'} + + {show && ( + + + FadeInView + + + )} + + ); +} + +export default ({ + title: 'FadeInView', + name: 'fadeInView', + description: ('Uses a simple timing animation to ' + + 'bring opacity from 0 to 1 when the component ' + + 'mounts.': string), + render: (): React.Node => , +}: RNTesterExampleModuleItem); diff --git a/packages/@react-native/tester/js/examples/Animated/MovingBoxExample.js b/packages/@react-native/tester/js/examples/Animated/MovingBoxExample.js new file mode 100644 index 00000000000..d70984f6d89 --- /dev/null +++ b/packages/@react-native/tester/js/examples/Animated/MovingBoxExample.js @@ -0,0 +1,133 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @flow strict-local + * @format + */ + +import type {RNTesterExampleModuleItem} from '../../types/RNTesterTypes'; +import * as React from 'react'; +import RNTesterButton from '../../components/RNTesterButton'; +import {Text, StyleSheet, View, Animated} from 'react-native'; +const containerWidth = 200; +const boxSize = 50; + +const styles = StyleSheet.create({ + content: { + backgroundColor: 'deepskyblue', + borderWidth: 1, + borderColor: 'dodgerblue', + padding: 20, + margin: 20, + borderRadius: 10, + alignItems: 'center', + }, + container: { + display: 'flex', + alignItems: 'center', + flexDirection: 'column', + backgroundColor: '#fff', + padding: 30, + }, + boxContainer: { + backgroundColor: '#d3d3d3', + height: boxSize, + width: containerWidth, + }, + box: { + width: boxSize, + height: boxSize, + margin: 0, + }, + buttonsContainer: { + marginTop: 20, + display: 'flex', + flexDirection: 'row', + justifyContent: 'space-between', + width: containerWidth, + }, +}); + +type Props = $ReadOnly<{||}>; +type State = {|boxVisible: boolean|}; + +class MovingBoxExample extends React.Component { + x: Animated.Value; + constructor(props) { + super(props); + this.x = new Animated.Value(0); + this.state = { + boxVisible: true, + }; + } + + render() { + const {boxVisible} = this.state; + const toggleText = boxVisible ? 'Hide' : 'Show'; + return ( + + {this.renderBox()} + + this.moveTo(0)}> + {'<-'} + + + {toggleText} + + this.moveTo(containerWidth - boxSize)}> + {'->'} + + + + ); + } + + renderBox = () => { + if (this.state.boxVisible) { + const horizontalLocation = {transform: [{translateX: this.x}]}; + return ( + + + + ); + } else { + return ( + + The box view is not being rendered + + ); + } + }; + + moveTo = x => { + Animated.timing(this.x, { + toValue: x, + duration: 1000, + useNativeDriver: true, + }).start(); + }; + + toggleVisibility = () => { + const {boxVisible} = this.state; + this.setState({boxVisible: !boxVisible}); + }; +} + +export default ({ + title: 'Moving box example', + name: 'movingView', + description: ('Click arrow buttons to move the box.' + + 'Then hide the box and reveal it again.' + + 'After that the box position will reset to initial position.': string), + render: (): React.Node => , +}: RNTesterExampleModuleItem); diff --git a/packages/@react-native/tester/js/examples/Animated/RotatingImagesExample.js b/packages/@react-native/tester/js/examples/Animated/RotatingImagesExample.js new file mode 100644 index 00000000000..58ae608c873 --- /dev/null +++ b/packages/@react-native/tester/js/examples/Animated/RotatingImagesExample.js @@ -0,0 +1,86 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + * @flow strict-local + */ + +import * as React from 'react'; +import RNTesterButton from '../../components/RNTesterButton'; +import {Animated, View, StyleSheet} from 'react-native'; +import type {RNTesterExampleModuleItem} from '../../types/RNTesterTypes'; + +const styles = StyleSheet.create({ + rotatingImage: { + width: 70, + height: 70, + }, +}); + +function RotatingImagesExample(): React.Node { + this.anim = this.anim || new Animated.Value(0); + return ( + + { + Animated.spring(this.anim, { + // Returns to the start + toValue: 0, + + // Velocity makes it move + velocity: 3, + + // Slow + tension: -10, + + // Oscillate a lot + friction: 1, + + useNativeDriver: false, + }).start(); + }}> + Press to Spin it! + + + + ); +} + +export default ({ + title: 'Rotating Images', + description: 'Simple Animated.Image rotation.', + render: RotatingImagesExample, +}: RNTesterExampleModuleItem); diff --git a/packages/@react-native/tester/js/examples/Animated/TransformBounceExample.js b/packages/@react-native/tester/js/examples/Animated/TransformBounceExample.js new file mode 100644 index 00000000000..40527eae5a7 --- /dev/null +++ b/packages/@react-native/tester/js/examples/Animated/TransformBounceExample.js @@ -0,0 +1,94 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @flow strict-local + * @format + */ + +import * as React from 'react'; +import RNTesterButton from '../../components/RNTesterButton'; +import {Text, StyleSheet, View, Animated} from 'react-native'; +import type {RNTesterExampleModuleItem} from '../../types/RNTesterTypes'; + +const styles = StyleSheet.create({ + content: { + backgroundColor: 'deepskyblue', + borderWidth: 1, + borderColor: 'dodgerblue', + padding: 20, + margin: 20, + borderRadius: 10, + alignItems: 'center', + }, +}); + +export default ({ + title: 'Transform Bounce', + description: ('One `Animated.Value` is driven by a ' + + 'spring with custom constants and mapped to an ' + + 'ordered set of transforms. Each transform has ' + + 'an interpolation to convert the value into the ' + + 'right range and units.': string), + render: function(): React.Node { + this.anim = this.anim || new Animated.Value(0); + return ( + + { + Animated.spring(this.anim, { + // Returns to the start + toValue: 0, + + // Velocity makes it move + velocity: 3, + + // Slow + tension: -10, + + // Oscillate a lot + friction: 1, + + useNativeDriver: false, + }).start(); + }}> + Press to Fling it! + + + Transforms! + + + ); + }, +}: RNTesterExampleModuleItem); diff --git a/packages/@react-native/tester/js/examples/FlatList/FlatListExample.js b/packages/@react-native/tester/js/examples/FlatList/FlatListExample.js index 6e6df4913af..abe670b608a 100644 --- a/packages/@react-native/tester/js/examples/FlatList/FlatListExample.js +++ b/packages/@react-native/tester/js/examples/FlatList/FlatListExample.js @@ -243,9 +243,9 @@ class FlatListExample extends React.PureComponent { return { renderItem: undefined, - /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.111 was deployed. To see the error, delete - * this comment and run Flow. */ + /* $FlowFixMe[invalid-computed-prop] (>=0.111.0 site=react_native_fb) + * This comment suppresses an error found when Flow v0.111 was deployed. + * To see the error, delete this comment and run Flow. */ [flatListPropKey]: ({item, separators}) => { return ( - {/* $FlowFixMe(>=0.115.0 site=react_native_fb) This comment - * suppresses an error found when Flow v0.115 was deployed. - * To see the error, delete this comment and run Flow. */} + {/* $FlowFixMe[incompatible-type] (>=0.115.0 site=react_ + * native_fb) This comment suppresses an error found when + * Flow v0.115 was deployed. To see the error, delete this + * comment and run Flow. */} Cover - {/* $FlowFixMe(>=0.115.0 site=react_native_fb) This comment - * suppresses an error found when Flow v0.115 was deployed. - * To see the error, delete this comment and run Flow. */} + {/* $FlowFixMe[incompatible-type] (>=0.115.0 site=react_ + * native_fb) This comment suppresses an error found when + * Flow v0.115 was deployed. To see the error, delete this + * comment and run Flow. */} Repeat - {/* $FlowFixMe(>=0.115.0 site=react_native_fb) This comment - * suppresses an error found when Flow v0.115 was deployed. - * To see the error, delete this comment and run Flow. */} + {/* $FlowFixMe[incompatible-type] (>=0.115.0 site=react_ + * native_fb) This comment suppresses an error found when + * Flow v0.115 was deployed. To see the error, delete this + * comment and run Flow. */} Center =0.115.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.115 was deployed. To see the error, delete - * this comment and run Flow. */ + /* $FlowFixMe[prop-missing] (>=0.115.0 site=react_native_fb) This comment + * suppresses an error found when Flow v0.115 was deployed. To see the + * error, delete this comment and run Flow. */ + /* $FlowFixMe[incompatible-type] (>=0.115.0 site=react_native_fb) This + * comment suppresses an error found when Flow v0.115 was deployed. To + * see the error, delete this comment and run Flow. */ return ; }, }, diff --git a/packages/@react-native/tester/js/examples/Layout/LayoutEventsExample.js b/packages/@react-native/tester/js/examples/Layout/LayoutEventsExample.js index 55e9e275e48..784669522dd 100644 --- a/packages/@react-native/tester/js/examples/Layout/LayoutEventsExample.js +++ b/packages/@react-native/tester/js/examples/Layout/LayoutEventsExample.js @@ -107,9 +107,10 @@ class LayoutEventExample extends React.Component { /> ViewLayout:{' '} - {/* $FlowFixMe(>=0.95.0 site=react_native_fb) This comment - * suppresses an error found when Flow v0.95 was deployed. To see - * the error, delete this comment and run Flow. */ + {/* $FlowFixMe[incompatible-type] (>=0.95.0 site=react_native_fb) + * This comment suppresses an error found when Flow v0.95 was + * deployed. To see the error, delete this comment and run Flow. + */ JSON.stringify(this.state.viewLayout, null, ' ') + '\n\n'} diff --git a/packages/@react-native/tester/js/examples/NativeAnimation/NativeAnimationsExample.js b/packages/@react-native/tester/js/examples/NativeAnimation/NativeAnimationsExample.js index 81851e1e2f7..a12171494a2 100644 --- a/packages/@react-native/tester/js/examples/NativeAnimation/NativeAnimationsExample.js +++ b/packages/@react-native/tester/js/examples/NativeAnimation/NativeAnimationsExample.js @@ -145,9 +145,9 @@ class LoopExample extends React.Component<{...}, $FlowFixMeState> { { opacity: this.state.value.interpolate({ inputRange: [0, 0.5, 1], - /* $FlowFixMe(>=0.38.0) - Flow error detected during the - * deployment of v0.38.0. To see the error, remove this comment - * and run flow */ + /* $FlowFixMe[speculation-ambiguous] (>=0.38.0) - Flow error + * detected during the deployment of v0.38.0. To see the error, + * remove this comment and run flow */ outputRange: [0, 1, 0], }), }, @@ -175,9 +175,9 @@ class InternalSettings extends React.Component< initialValue={false} label="Force JS Stalls" onEnable={() => { - /* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment - * suppresses an error found when Flow v0.63 was deployed. To see - * the error delete this comment and run Flow. */ + /* $FlowFixMe[incompatible-type] (>=0.63.0 site=react_native_fb) + * This comment suppresses an error found when Flow v0.63 was + * deployed. To see the error delete this comment and run Flow. */ this._stallInterval = setInterval(() => { const start = Date.now(); console.warn('burn CPU'); @@ -185,9 +185,9 @@ class InternalSettings extends React.Component< }, 300); }} onDisable={() => { - /* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment - * suppresses an error found when Flow v0.63 was deployed. To see - * the error delete this comment and run Flow. */ + /* $FlowFixMe[incompatible-call] (>=0.63.0 site=react_native_fb) + * This comment suppresses an error found when Flow v0.63 was + * deployed. To see the error delete this comment and run Flow. */ clearInterval(this._stallInterval || 0); }} /> @@ -243,9 +243,9 @@ class EventExample extends React.Component<{...}, $FlowFixMeState> { { rotate: this.state.anim.interpolate({ inputRange: [0, 1], - /* $FlowFixMe(>=0.38.0) - Flow error detected during the - * deployment of v0.38.0. To see the error, remove this - * comment and run flow */ + /* $FlowFixMe[speculation-ambiguous] (>=0.38.0) - Flow + * error detected during the deployment of v0.38.0. To see + * the error, remove this comment and run flow */ outputRange: ['0deg', '1deg'], }), }, diff --git a/packages/@react-native/tester/js/examples/PanResponder/PanResponderExample.js b/packages/@react-native/tester/js/examples/PanResponder/PanResponderExample.js index f45ec746a84..2e2de8635b3 100644 --- a/packages/@react-native/tester/js/examples/PanResponder/PanResponderExample.js +++ b/packages/@react-native/tester/js/examples/PanResponder/PanResponderExample.js @@ -150,7 +150,6 @@ exports.simpleExampleContainer = true; exports.examples = [ { title: 'Basic gesture handling', - // $FlowFixMe[value-as-type] render: function(): React.Element { return ; }, diff --git a/packages/@react-native/tester/js/examples/PointerEvents/PointerEventsExample.js b/packages/@react-native/tester/js/examples/PointerEvents/PointerEventsExample.js index 569ae494ddd..800e7395f6b 100644 --- a/packages/@react-native/tester/js/examples/PointerEvents/PointerEventsExample.js +++ b/packages/@react-native/tester/js/examples/PointerEvents/PointerEventsExample.js @@ -41,9 +41,10 @@ class ExampleBox extends React.Component<$FlowFixMeProps, $FlowFixMeState> { - {/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This - * comment suppresses an error when upgrading Flow's support for - * React. To see the error delete this comment and run Flow. */} + {/* $FlowFixMe[type-as-value] (>=0.53.0 site=react_native_fb,react_ + * native_oss) This comment suppresses an error when upgrading + * Flow's support for React. To see the error delete this comment + * and run Flow. */} diff --git a/packages/@react-native/tester/js/examples/ScrollView/ScrollViewAnimatedExample.js b/packages/@react-native/tester/js/examples/ScrollView/ScrollViewAnimatedExample.js index 656c51276f6..3ed2fd8dfde 100644 --- a/packages/@react-native/tester/js/examples/ScrollView/ScrollViewAnimatedExample.js +++ b/packages/@react-native/tester/js/examples/ScrollView/ScrollViewAnimatedExample.js @@ -39,14 +39,16 @@ class ScrollViewAnimatedExample extends Component<{...}> { render(): React.Node { const interpolated = this._scrollViewPos.interpolate({ inputRange: [0, 1], - /* $FlowFixMe(>=0.38.0) - Flow error detected during the deployment of - * v0.38.0. To see the error, remove this comment and run flow */ + /* $FlowFixMe[speculation-ambiguous] (>=0.38.0) - Flow error detected + * during the deployment of v0.38.0. To see the error, remove this + * comment and run flow */ outputRange: [0, 0.1], }); const interpolated2 = this._scrollViewPos.interpolate({ inputRange: [0, 1], - /* $FlowFixMe(>=0.38.0) - Flow error detected during the deployment of - * v0.38.0. To see the error, remove this comment and run flow */ + /* $FlowFixMe[speculation-ambiguous] (>=0.38.0) - Flow error detected + * during the deployment of v0.38.0. To see the error, remove this + * comment and run flow */ outputRange: ['0deg', '1deg'], }); return ( diff --git a/packages/@react-native/tester/js/examples/ScrollView/ScrollViewExample.js b/packages/@react-native/tester/js/examples/ScrollView/ScrollViewExample.js index c9da53d0b7f..348ae82ea01 100644 --- a/packages/@react-native/tester/js/examples/ScrollView/ScrollViewExample.js +++ b/packages/@react-native/tester/js/examples/ScrollView/ScrollViewExample.js @@ -262,9 +262,6 @@ if (Platform.OS === 'ios') { let itemCount = 6; class AppendingList extends React.Component<{...}, *> { state = { - /* $FlowFixMe(>=0.85.0 site=react_native_fb) This comment suppresses - * an error found when Flow v0.85 was deployed. To see the error, - * delete this comment and run Flow. */ items: [...Array(itemCount)].map((_, ii) => ( )), diff --git a/packages/@react-native/tester/js/examples/Snapshot/SnapshotViewIOS.ios.js b/packages/@react-native/tester/js/examples/Snapshot/SnapshotViewIOS.ios.js index 89296d7d3d7..3ad7eb33b25 100644 --- a/packages/@react-native/tester/js/examples/Snapshot/SnapshotViewIOS.ios.js +++ b/packages/@react-native/tester/js/examples/Snapshot/SnapshotViewIOS.ios.js @@ -47,7 +47,7 @@ class SnapshotViewIOS extends React.Component { const testIdentifier = this.props.testIdentifier || 'test'; const onSnapshotReady = this.props.onSnapshotReady || this.onDefaultAction; return ( - // $FlowFixMe - Typing ReactNativeComponent revealed errors + // $FlowFixMe[prop-missing] - Typing ReactNativeComponent revealed errors { return ( this.setState({colorFalseSwitchIsOn: value})} style={{marginBottom: 10}} thumbColor="#0000ff" @@ -145,6 +146,7 @@ class ColorSwitchExample extends React.Component<{...}, $FlowFixMeState> { value={this.state.colorFalseSwitchIsOn} /> this.setState({colorTrueSwitchIsOn: value})} thumbColor="#0000ff" trackColor={{ @@ -169,11 +171,13 @@ class EventSwitchExample extends React.Component<{...}, $FlowFixMeState> { this.setState({eventSwitchIsOn: value})} style={{marginBottom: 10}} value={this.state.eventSwitchIsOn} /> this.setState({eventSwitchIsOn: value})} style={{marginBottom: 10}} value={this.state.eventSwitchIsOn} @@ -182,6 +186,7 @@ class EventSwitchExample extends React.Component<{...}, $FlowFixMeState> { this.setState({eventSwitchRegressionIsOn: value}) } @@ -189,6 +194,7 @@ class EventSwitchExample extends React.Component<{...}, $FlowFixMeState> { value={this.state.eventSwitchRegressionIsOn} /> this.setState({eventSwitchRegressionIsOn: value}) } @@ -210,30 +216,35 @@ exports.description = 'Native boolean input'; exports.examples = [ { title: 'Switches can be set to true or false', + name: 'basic', render(): React.Element { return ; }, }, { title: 'Switches can be disabled', + name: 'disabled', render(): React.Element { return ; }, }, { title: 'Change events can be detected', + name: 'events', render(): React.Element { return ; }, }, { title: 'Switches are controlled components', + name: 'controlled', render(): React.Element { - return ; + return ; }, }, { title: 'Custom colors can be provided', + name: 'custom-colors', render(): React.Element { return ; }, diff --git a/packages/@react-native/tester/js/examples/Transform/TransformExample.js b/packages/@react-native/tester/js/examples/Transform/TransformExample.js index cc25fe4636d..32f2760db21 100644 --- a/packages/@react-native/tester/js/examples/Transform/TransformExample.js +++ b/packages/@react-native/tester/js/examples/Transform/TransformExample.js @@ -38,9 +38,9 @@ function AnimateTansformSingleProp() { { rotate: theta.interpolate({ inputRange: [0, 100], - /* $FlowFixMe(>=0.38.0) - Flow error detected during the - * deployment of v0.38.0. To see the error, remove this - * comment and run flow */ + /* $FlowFixMe[speculation-ambiguous] (>=0.38.0) - Flow error + * detected during the deployment of v0.38.0. To see the + * error, remove this comment and run flow */ outputRange: ['0deg', '360deg'], }), }, @@ -79,9 +79,9 @@ function Flip() { { rotateX: theta.interpolate({ inputRange: [0, 180], - /* $FlowFixMe(>=0.38.0) - Flow error detected during the - * deployment of v0.38.0. To see the error, remove this - * comment and run flow */ + /* $FlowFixMe[speculation-ambiguous] (>=0.38.0) - Flow error + * detected during the deployment of v0.38.0. To see the + * error, remove this comment and run flow */ outputRange: ['0deg', '180deg'], }), }, @@ -100,9 +100,9 @@ function Flip() { { rotateX: theta.interpolate({ inputRange: [0, 180], - /* $FlowFixMe(>=0.38.0) - Flow error detected during the - * deployment of v0.38.0. To see the error, remove this - * comment and run flow */ + /* $FlowFixMe[speculation-ambiguous] (>=0.38.0) - Flow error + * detected during the deployment of v0.38.0. To see the + * error, remove this comment and run flow */ outputRange: ['180deg', '360deg'], }), }, diff --git a/packages/@react-native/tester/js/examples/TurboModule/SampleTurboModuleExample.js b/packages/@react-native/tester/js/examples/TurboModule/SampleTurboModuleExample.js index 4e46ecbbef4..08f4701edfc 100644 --- a/packages/@react-native/tester/js/examples/TurboModule/SampleTurboModuleExample.js +++ b/packages/@react-native/tester/js/examples/TurboModule/SampleTurboModuleExample.js @@ -75,14 +75,14 @@ class SampleTurboModuleExample extends React.Component<{||}, State> { _setResult(name, result) { this.setState(({testResults}) => ({ - /* $FlowFixMe(>=0.122.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.122.0 was deployed. To see the error, delete - * this comment and run Flow. */ + /* $FlowFixMe[cannot-spread-indexer] (>=0.122.0 site=react_native_fb) + * This comment suppresses an error found when Flow v0.122.0 was + * deployed. To see the error, delete this comment and run Flow. */ testResults: { ...testResults, - /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses - * an error found when Flow v0.111 was deployed. To see the error, - * delete this comment and run Flow. */ + /* $FlowFixMe[invalid-computed-prop] (>=0.111.0 site=react_native_fb) + * This comment suppresses an error found when Flow v0.111 was + * deployed. To see the error, delete this comment and run Flow. */ [name]: {value: result, type: typeof result}, }, })); diff --git a/packages/@react-native/tester/overrides.json b/packages/@react-native/tester/overrides.json index 707cc517f9d..68fdd9a3472 100644 --- a/packages/@react-native/tester/overrides.json +++ b/packages/@react-native/tester/overrides.json @@ -1,11 +1,11 @@ { - "baseVersion": "0.0.0-cfb5b5e20", + "baseVersion": "0.0.0-d04ec4dc6", "overrides": [ { "type": "copy", "directory": "js", "baseDirectory": "packages/rn-tester/js", - "baseHash": "358e553380f2d42025a67ea9741d86d8553f3a01", + "baseHash": "4713eef8954d61aeb893d20c415b0f0fd69a5e1b", "issue": 4054 }, { diff --git a/packages/e2e-test-app/package.json b/packages/e2e-test-app/package.json index c8ba857e984..eea07767e2f 100644 --- a/packages/e2e-test-app/package.json +++ b/packages/e2e-test-app/package.json @@ -14,7 +14,7 @@ "@react-native-windows/tester": "0.0.1", "node-rnw-rpc": "^1.0.5-21", "react": "17.0.1", - "react-native": "0.0.0-cfb5b5e20", + "react-native": "0.0.0-d04ec4dc6", "react-native-windows": "^0.0.0-canary.291" }, "devDependencies": { diff --git a/packages/integration-test-app/package.json b/packages/integration-test-app/package.json index 5d1bc14ca24..a72fbad3103 100644 --- a/packages/integration-test-app/package.json +++ b/packages/integration-test-app/package.json @@ -13,7 +13,7 @@ "chai": "^4.2.0", "node-rnw-rpc": "^1.0.5-21", "react": "17.0.1", - "react-native": "0.0.0-cfb5b5e20", + "react-native": "0.0.0-d04ec4dc6", "react-native-windows": "^0.0.0-canary.291" }, "devDependencies": { diff --git a/packages/node-rnw-rpc/package.json b/packages/node-rnw-rpc/package.json index 0d95934fdb3..75e158fa182 100644 --- a/packages/node-rnw-rpc/package.json +++ b/packages/node-rnw-rpc/package.json @@ -27,7 +27,7 @@ "just-scripts": "^1.3.2", "prettier": "1.19.1", "react": "17.0.1", - "react-native": "0.0.0-cfb5b5e20", + "react-native": "0.0.0-d04ec4dc6", "react-native-windows": "^0.0.0-canary.291", "typescript": "^3.8.3" }, diff --git a/packages/playground/package.json b/packages/playground/package.json index 55397915ca6..b02c0f93f38 100644 --- a/packages/playground/package.json +++ b/packages/playground/package.json @@ -12,7 +12,7 @@ "dependencies": { "@react-native-windows/tester": "0.0.1", "react": "17.0.1", - "react-native": "0.0.0-cfb5b5e20", + "react-native": "0.0.0-d04ec4dc6", "react-native-windows": "0.0.0-canary.291" }, "devDependencies": { diff --git a/packages/sample-apps/package.json b/packages/sample-apps/package.json index 5eaf3bf61f0..18f93ed8561 100644 --- a/packages/sample-apps/package.json +++ b/packages/sample-apps/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "react": "17.0.1", - "react-native": "0.0.0-cfb5b5e20", + "react-native": "0.0.0-d04ec4dc6", "react-native-windows": "0.0.0-canary.291" }, "devDependencies": { diff --git a/vnext/.flowconfig b/vnext/.flowconfig index 22507554308..b6691ad8b8c 100644 --- a/vnext/.flowconfig +++ b/vnext/.flowconfig @@ -96,9 +96,6 @@ suppress_type=$FlowFixMeProps suppress_type=$FlowFixMeState suppress_type=$FlowFixMeEmpty -experimental.abstract_locations=true -experimental.new_signatures=true - [lints] sketchy-null-number=warn sketchy-null-mixed=warn @@ -120,4 +117,4 @@ untyped-import untyped-type-import [version] -^0.146.0 +^0.148.0 diff --git a/vnext/ReactCommon/Yoga.cpp b/vnext/ReactCommon/Yoga.cpp index 3dab26732d6..211deeda703 100644 --- a/vnext/ReactCommon/Yoga.cpp +++ b/vnext/ReactCommon/Yoga.cpp @@ -106,6 +106,10 @@ static int YGDefaultLog( #undef YG_UNUSED #endif +static inline bool YGDoubleIsUndefined(const double value) { + return facebook::yoga::isUndefined(value); +} + YOGA_EXPORT bool YGFloatIsUndefined(const float value) { return facebook::yoga::isUndefined(value); } @@ -3620,10 +3624,10 @@ YOGA_EXPORT float YGRoundValueToPixelGrid( const double pointScaleFactor, const bool forceCeil, const bool forceFloor) { - double scaledValue = ((double) value) * pointScaleFactor; + double scaledValue = value * pointScaleFactor; // We want to calculate `fractial` such that `floor(scaledValue) = scaledValue // - fractial`. - double fractial = fmod(scaledValue, 1.0f); + double fractial = fmod(scaledValue, 1.0); if (fractial < 0) { // This branch is for handling negative numbers for `value`. // @@ -3645,25 +3649,25 @@ YOGA_EXPORT float YGRoundValueToPixelGrid( if (YGDoubleEqual(fractial, 0)) { // First we check if the value is already rounded scaledValue = scaledValue - fractial; - } else if (YGDoubleEqual(fractial, 1.0f)) { - scaledValue = scaledValue - fractial + 1.0f; + } else if (YGDoubleEqual(fractial, 1.0)) { + scaledValue = scaledValue - fractial + 1.0; } else if (forceCeil) { // Next we check if we need to use forced rounding - scaledValue = scaledValue - fractial + 1.0f; + scaledValue = scaledValue - fractial + 1.0; } else if (forceFloor) { scaledValue = scaledValue - fractial; } else { // Finally we just round the value scaledValue = scaledValue - fractial + - (!YGFloatIsUndefined(fractial) && - (fractial > 0.5f || YGDoubleEqual(fractial, 0.5f)) - ? 1.0f - : 0.0f); + (!YGDoubleIsUndefined(fractial) && + (fractial > 0.5 || YGDoubleEqual(fractial, 0.5)) + ? 1.0 + : 0.0); } - return (YGFloatIsUndefined(scaledValue) || - YGFloatIsUndefined(pointScaleFactor)) + return (YGDoubleIsUndefined(scaledValue) || + YGDoubleIsUndefined(pointScaleFactor)) ? YGUndefined - : scaledValue / pointScaleFactor; + : (float) (scaledValue / pointScaleFactor); } YOGA_EXPORT bool YGNodeCanUseCachedMeasurement( diff --git a/vnext/ReactCopies/IntegrationTests/AsyncStorageTest.js b/vnext/ReactCopies/IntegrationTests/AsyncStorageTest.js index a6039d4b6d5..51ce374556e 100644 --- a/vnext/ReactCopies/IntegrationTests/AsyncStorageTest.js +++ b/vnext/ReactCopies/IntegrationTests/AsyncStorageTest.js @@ -218,9 +218,10 @@ class AsyncStorageTest extends React.Component<{...}, $FlowFixMeState> { return ( - {/* $FlowFixMe(>=0.54.0 site=react_native_fb,react_native_oss) This - * comment suppresses an error found when Flow v0.54 was deployed. - * To see the error delete this comment and run Flow. */ + {/* $FlowFixMe[incompatible-type] (>=0.54.0 site=react_native_fb,react_ + * native_oss) This comment suppresses an error found when Flow v0.54 + * was deployed. To see the error delete this comment and run Flow. + */ this.constructor.displayName + ': '} {this.state.done ? 'Done' : 'Testing...'} {'\n\n' + this.state.messages} diff --git a/vnext/ReactCopies/IntegrationTests/IntegrationTestHarnessTest.js b/vnext/ReactCopies/IntegrationTests/IntegrationTestHarnessTest.js index fbc1ef8d472..256bcd210e7 100644 --- a/vnext/ReactCopies/IntegrationTests/IntegrationTestHarnessTest.js +++ b/vnext/ReactCopies/IntegrationTests/IntegrationTestHarnessTest.js @@ -56,9 +56,10 @@ class IntegrationTestHarnessTest extends React.Component { return ( - {/* $FlowFixMe(>=0.54.0 site=react_native_fb,react_native_oss) This - * comment suppresses an error found when Flow v0.54 was deployed. - * To see the error delete this comment and run Flow. */ + {/* $FlowFixMe[incompatible-type] (>=0.54.0 site=react_native_fb,react_ + * native_oss) This comment suppresses an error found when Flow v0.54 + * was deployed. To see the error delete this comment and run Flow. + */ this.constructor.displayName + ': '} {this.state.done ? 'Done' : 'Testing...'} diff --git a/vnext/ReactCopies/IntegrationTests/IntegrationTestsApp.js b/vnext/ReactCopies/IntegrationTests/IntegrationTestsApp.js index 1e52877b7b9..af41da151c4 100644 --- a/vnext/ReactCopies/IntegrationTests/IntegrationTestsApp.js +++ b/vnext/ReactCopies/IntegrationTests/IntegrationTestsApp.js @@ -40,9 +40,9 @@ const TESTS = [ ]; TESTS.forEach( - /* $FlowFixMe(>=0.54.0 site=react_native_fb,react_native_oss) This comment - * suppresses an error found when Flow v0.54 was deployed. To see the error - * delete this comment and run Flow. */ + /* $FlowFixMe[incompatible-call] (>=0.54.0 site=react_native_fb,react_native_ + * oss) This comment suppresses an error found when Flow v0.54 was deployed. + * To see the error delete this comment and run Flow. */ test => AppRegistry.registerComponent(test.displayName, () => test), ); @@ -60,9 +60,10 @@ class IntegrationTestsApp extends React.Component<{...}, $FlowFixMeState> { if (this.state.test) { return ( - {/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This - * comment suppresses an error when upgrading Flow's support for - * React. To see the error delete this comment and run Flow. */} + {/* $FlowFixMe[type-as-value] (>=0.53.0 site=react_native_fb,react_ + * native_oss) This comment suppresses an error when upgrading + * Flow's support for React. To see the error delete this comment + * and run Flow. */} ); @@ -79,9 +80,10 @@ class IntegrationTestsApp extends React.Component<{...}, $FlowFixMeState> { {TESTS.map(test => [ this.setState({test})} - /* $FlowFixMe(>=0.115.0 site=react_native_fb) This comment - * suppresses an error found when Flow v0.115 was deployed. To - * see the error, delete this comment and run Flow. */ + /* $FlowFixMe[incompatible-type] (>=0.115.0 site=react_native_fb) + * This comment suppresses an error found when Flow v0.115 was + * deployed. To see the error, delete this comment and run Flow. + */ style={styles.row}> {test.displayName} , diff --git a/vnext/codegen/NativePushNotificationManagerIOSSpec.g.h b/vnext/codegen/NativePushNotificationManagerIOSSpec.g.h index 19d7bd30d3d..509abc4bf0e 100644 --- a/vnext/codegen/NativePushNotificationManagerIOSSpec.g.h +++ b/vnext/codegen/NativePushNotificationManagerIOSSpec.g.h @@ -30,8 +30,9 @@ struct PushNotificationManagerIOSSpec : winrt::Microsoft::ReactNative::TurboModu Method{12, L"removeAllDeliveredNotifications"}, Method{13, L"removeDeliveredNotifications"}, Method) noexcept>{14, L"getDeliveredNotifications"}, - Method{15, L"addListener"}, - Method{16, L"removeListeners"}, + Method) noexcept>{15, L"getAuthorizationStatus"}, + Method{16, L"addListener"}, + Method{17, L"removeListeners"}, }; template @@ -115,11 +116,16 @@ struct PushNotificationManagerIOSSpec : winrt::Microsoft::ReactNative::TurboModu " REACT_METHOD(getDeliveredNotifications) static void getDeliveredNotifications(std::function const & callback) noexcept { /* implementation */ }}\n"); REACT_SHOW_METHOD_SPEC_ERRORS( 15, + "getAuthorizationStatus", + " REACT_METHOD(getAuthorizationStatus) void getAuthorizationStatus(std::function const & callback) noexcept { /* implementation */ }}\n" + " REACT_METHOD(getAuthorizationStatus) static void getAuthorizationStatus(std::function const & callback) noexcept { /* implementation */ }}\n"); + REACT_SHOW_METHOD_SPEC_ERRORS( + 16, "addListener", " REACT_METHOD(addListener) void addListener(std::string eventType) noexcept { /* implementation */ }}\n" " REACT_METHOD(addListener) static void addListener(std::string eventType) noexcept { /* implementation */ }}\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 16, + 17, "removeListeners", " REACT_METHOD(removeListeners) void removeListeners(double count) noexcept { /* implementation */ }}\n" " REACT_METHOD(removeListeners) static void removeListeners(double count) noexcept { /* implementation */ }}\n"); diff --git a/vnext/overrides.json b/vnext/overrides.json index 444101920a3..af0937d4cf0 100644 --- a/vnext/overrides.json +++ b/vnext/overrides.json @@ -5,26 +5,26 @@ "src/**" ], "excludePatterns": [], - "baseVersion": "0.0.0-cfb5b5e20", + "baseVersion": "0.0.0-d04ec4dc6", "overrides": [ { "type": "derived", "file": ".flowconfig", "baseFile": ".flowconfig", - "baseHash": "718336b53dd84d09a5331cc4c6a3726114510030" + "baseHash": "7c2f3e8ecf80e5229d4e1fdad2b6ef324acae0c4" }, { "type": "patch", "file": "ReactCommon/Yoga.cpp", "baseFile": "ReactCommon/yoga/yoga/Yoga.cpp", - "baseHash": "12842ce403b4851e233d2c2cc4dd7309c0428c64", + "baseHash": "3f51ae8019101312e47fb4dcbbb57fa609c6dd3a", "issue": 3994 }, { "type": "copy", "directory": "ReactCopies/IntegrationTests", "baseDirectory": "IntegrationTests", - "baseHash": "bccaaa4429976117899ed61a39fda9971c7fee29", + "baseHash": "3b5f8abaaab638b2fcfad8544a40bf40b19f54bf", "issue": 4054 }, { @@ -52,7 +52,7 @@ "type": "derived", "file": "src/index.windows.js", "baseFile": "index.js", - "baseHash": "ca978f1d83fd841a2aa9f30f3bfabb620de21273" + "baseHash": "84a9a90c70deaf3e42a67c82beafb1240c41bc95" }, { "type": "platform", @@ -78,7 +78,7 @@ "type": "patch", "file": "src/Libraries/Alert/Alert.windows.js", "baseFile": "Libraries/Alert/Alert.js", - "baseHash": "6ea428202edeea40370df390a6b8f7ab794270ac" + "baseHash": "99f0bc2c38daf35d5f08a0e0abeb5f21e583ce4e" }, { "type": "platform", @@ -92,14 +92,14 @@ "type": "copy", "file": "src/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js", "baseFile": "Libraries/Components/AccessibilityInfo/AccessibilityInfo.android.js", - "baseHash": "a1534c3bec8ef3537345310684e129e7819b769f", + "baseHash": "54cf7e87dff60489f95adef777d73427eab0c866", "issue": 4578 }, { "type": "copy", "file": "src/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.windows.js", "baseFile": "Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.android.js", - "baseHash": "1255817acafffa2461805c76a10daafc233de377", + "baseHash": "154f615eba014a1df9ff2d54591219dbbc53f381", "issue": 4578 }, { @@ -168,7 +168,7 @@ "type": "patch", "file": "src/Libraries/Components/Picker/Picker.windows.js", "baseFile": "Libraries/Components/Picker/Picker.js", - "baseHash": "7de0b5df9c95cef31f2b484f264557c7a8049f74", + "baseHash": "35fc72402bbad87945f1553d8834e88603c84b22", "issue": 4611 }, { @@ -242,7 +242,7 @@ "type": "patch", "file": "src/Libraries/Components/TextInput/TextInput.windows.js", "baseFile": "Libraries/Components/TextInput/TextInput.js", - "baseHash": "4f5fe56bdded55bbeee1b54356f82361bb1f8b02" + "baseHash": "506d84a349fef1ad532b7c02a1836fce7befa616" }, { "type": "patch", @@ -264,19 +264,19 @@ "type": "patch", "file": "src/Libraries/Components/Touchable/TouchableHighlight.windows.js", "baseFile": "Libraries/Components/Touchable/TouchableHighlight.js", - "baseHash": "ed75dadd09fb87a6421b2448d8858b3149ab3316" + "baseHash": "1fd89ec7c24c78161f4b462a4a9f6a1c5cb13a71" }, { "type": "patch", "file": "src/Libraries/Components/Touchable/TouchableOpacity.windows.js", "baseFile": "Libraries/Components/Touchable/TouchableOpacity.js", - "baseHash": "961640ecc2a5b15813d4986ade036ce4e3e43c41" + "baseHash": "cbbc20281bbf0ff9ed0a6a6286a9df5bfc7c7558" }, { "type": "patch", "file": "src/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js", "baseFile": "Libraries/Components/Touchable/TouchableWithoutFeedback.js", - "baseHash": "27f66e316ea1c7b466e11703b1f2a75a5d8d409a" + "baseHash": "7b74ecfc6ddef9b4d17ae95527b777c8886d40b4" }, { "type": "patch", @@ -321,7 +321,7 @@ "type": "patch", "file": "src/Libraries/Image/Image.windows.js", "baseFile": "Libraries/Image/Image.ios.js", - "baseHash": "9fb656bbb836310325789d897879f769124eb31c", + "baseHash": "bb70db26cb8d42b51037d43a6ab9eace183a0f71", "issue": 4590 }, { @@ -350,14 +350,14 @@ "type": "patch", "file": "src/Libraries/Pressability/Pressability.windows.js", "baseFile": "Libraries/Pressability/Pressability.js", - "baseHash": "ed5e7153ca1750dea21f40ed5d0ecd76c00cbddf", + "baseHash": "f0ff8ce99b09be692f6beb9231c7dec3140da02d", "issue": 4379 }, { "type": "patch", "file": "src/Libraries/ReactNative/PaperUIManager.windows.js", "baseFile": "Libraries/ReactNative/PaperUIManager.js", - "baseHash": "8377428d85da1428842099549076fdacd549bd07" + "baseHash": "0c91dcfdf2dde817965dac55416009800a906a56" }, { "type": "derived", diff --git a/vnext/package.json b/vnext/package.json index 28ecea8c7bc..7a746033391 100644 --- a/vnext/package.json +++ b/vnext/package.json @@ -62,12 +62,12 @@ "@types/react-native": "^0.63.46", "eslint": "7.12.0", "eslint-plugin-prettier": "2.6.2", - "flow-bin": "^0.146.0", + "flow-bin": "^0.148.0", "jscodeshift": "^0.11.0", "just-scripts": "^1.3.3", "prettier": "1.19.1", "react": "17.0.1", - "react-native": "0.0.0-cfb5b5e20", + "react-native": "0.0.0-d04ec4dc6", "react-native-platform-override": "^1.4.13", "react-refresh": "^0.4.0", "react-shallow-renderer": "16.14.1", @@ -75,7 +75,7 @@ }, "peerDependencies": { "react": "17.0.1", - "react-native": "0.0.0-cfb5b5e20" + "react-native": "0.0.0-d04ec4dc6" }, "beachball": { "defaultNpmTag": "canary", diff --git a/vnext/src/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js b/vnext/src/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js index d619b897254..28e794d19a3 100644 --- a/vnext/src/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js +++ b/vnext/src/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js @@ -26,7 +26,7 @@ type AccessibilityEventDefinitions = { change: [boolean], }; -type AccessibilityEventTypes = 'focus'; +type AccessibilityEventTypes = 'focus' | 'click'; const _subscriptions = new Map(); @@ -162,7 +162,12 @@ const AccessibilityInfo = { eventType: AccessibilityEventTypes, ) { // route through React renderer to distinguish between Fabric and non-Fabric handles - sendAccessibilityEvent(handle, eventType); + // iOS only supports 'focus' event types + if (eventType === 'focus') { + sendAccessibilityEvent(handle, eventType); + } else if (eventType === 'click') { + // Do nothing! + } }, /** diff --git a/vnext/src/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.windows.js b/vnext/src/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.windows.js index edc950427d6..3bb1c554950 100644 --- a/vnext/src/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.windows.js +++ b/vnext/src/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.windows.js @@ -24,6 +24,12 @@ function legacySendAccessibilityEvent( UIManager.getConstants().AccessibilityEventTypes.typeViewFocused, ); } + if (eventType === 'click') { + UIManager.sendAccessibilityEvent( + reactTag, + UIManager.getConstants().AccessibilityEventTypes.typeViewClicked, + ); + } } module.exports = legacySendAccessibilityEvent; diff --git a/vnext/src/Libraries/Components/Picker/Picker.windows.js b/vnext/src/Libraries/Components/Picker/Picker.windows.js index 38cac898967..6b3933120c6 100644 --- a/vnext/src/Libraries/Components/Picker/Picker.windows.js +++ b/vnext/src/Libraries/Components/Picker/Picker.windows.js @@ -148,13 +148,17 @@ class Picker extends React.Component { render(): React.Node { if (Platform.OS === 'ios') { - /* $FlowFixMe(>=0.81.0 site=react_native_ios_fb) This suppression was - * added when renaming suppression sites. */ + /* $FlowFixMe[prop-missing] (>=0.81.0 site=react_native_ios_fb) This + * suppression was added when renaming suppression sites. */ + /* $FlowFixMe[incompatible-type] (>=0.81.0 site=react_native_ios_fb) This + * suppression was added when renaming suppression sites. */ return {this.props.children}; } else if (Platform.OS === 'android') { return ( - /* $FlowFixMe(>=0.81.0 site=react_native_android_fb) This suppression - * was added when renaming suppression sites. */ + /* $FlowFixMe[incompatible-type] (>=0.81.0 site=react_native_android_fb) This + * suppression was added when renaming suppression sites. */ + /* $FlowFixMe[prop-missing] (>=0.81.0 site=react_native_android_fb) This + * suppression was added when renaming suppression sites. */ {this.props.children} ); } else if (Platform.OS === 'windows') { diff --git a/vnext/src/Libraries/Components/TextInput/TextInput.windows.js b/vnext/src/Libraries/Components/TextInput/TextInput.windows.js index 0f6dec3d4a5..f2a80397828 100644 --- a/vnext/src/Libraries/Components/TextInput/TextInput.windows.js +++ b/vnext/src/Libraries/Components/TextInput/TextInput.windows.js @@ -1158,8 +1158,14 @@ function InternalTextInput(props: Props): React.Node { } textInput = ( - /* $FlowFixMe the types for AndroidTextInput don't match up exactly with - the props for TextInput. This will need to get fixed */ + /* $FlowFixMe[prop-missing] the types for AndroidTextInput don't match up + * exactly with the props for TextInput. This will need to get fixed */ + /* $FlowFixMe[incompatible-type] the types for AndroidTextInput don't + * match up exactly with the props for TextInput. This will need to get + * fixed */ + /* $FlowFixMe[incompatible-type-arg] the types for AndroidTextInput don't + * match up exactly with the props for TextInput. This will need to get + * fixed */ { _createPressabilityConfig(): PressabilityConfig { return { cancelable: !this.props.rejectResponderTermination, - disabled: this.props.disabled, + disabled: + this.props.disabled != null + ? this.props.disabled + : this.props.accessibilityState?.disabled, hitSlop: this.props.hitSlop, delayLongPress: this.props.delayLongPress, delayPressIn: this.props.delayPressIn, @@ -287,13 +290,21 @@ class TouchableHighlight extends React.Component { ...eventHandlersWithoutBlurAndFocus } = this.state.pressability.getEventHandlers(); + const accessibilityState = + this.props.disabled != null + ? { + ...this.props.accessibilityState, + disabled: this.props.disabled, + } + : this.props.accessibilityState; + return ( { } } -module.exports = (React.forwardRef((props, hostRef) => ( +const Touchable = (React.forwardRef((props, hostRef) => ( )): React.AbstractComponent< $ReadOnly<$Diff|}>>, React.ElementRef, >); + +Touchable.displayName = 'TouchableHighlight'; + +module.exports = Touchable; diff --git a/vnext/src/Libraries/Components/Touchable/TouchableOpacity.windows.js b/vnext/src/Libraries/Components/Touchable/TouchableOpacity.windows.js index 247ae858bd3..67d4072c0a0 100644 --- a/vnext/src/Libraries/Components/Touchable/TouchableOpacity.windows.js +++ b/vnext/src/Libraries/Components/Touchable/TouchableOpacity.windows.js @@ -276,6 +276,10 @@ class TouchableOpacity extends React.Component { } } -module.exports = (React.forwardRef((props, ref) => ( +const Touchable = (React.forwardRef((props, ref) => ( )): React.AbstractComponent>); + +Touchable.displayName = 'TouchableOpacity'; + +module.exports = Touchable; diff --git a/vnext/src/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js b/vnext/src/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js index 27957476ad5..daedcae2bc7 100644 --- a/vnext/src/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js +++ b/vnext/src/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js @@ -174,4 +174,6 @@ function createPressabilityConfig(props: Props): PressabilityConfig { }; } +TouchableWithoutFeedback.displayName = 'TouchableWithoutFeedback'; + module.exports = TouchableWithoutFeedback; diff --git a/vnext/src/Libraries/Image/Image.windows.js b/vnext/src/Libraries/Image/Image.windows.js index cb3023526d9..c709d06e42d 100644 --- a/vnext/src/Libraries/Image/Image.windows.js +++ b/vnext/src/Libraries/Image/Image.windows.js @@ -113,12 +113,10 @@ let Image = (props: ImagePropsType, forwardedRef) => { let sources; let style: ImageStyleProp; if (Array.isArray(source)) { - // $FlowFixMe flattenStyle is not strong enough style = flattenStyle([styles.base, props.style]) || {}; sources = source; } else { const {width, height, uri} = source; - // $FlowFixMe flattenStyle is not strong enough style = flattenStyle([{width, height}, styles.base, props.style]) || {}; sources = [source]; @@ -190,9 +188,9 @@ Image.displayName = 'Image'; * * See https://reactnative.dev/docs/image.html#getsize */ -/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete this - * comment and run Flow. */ +/* $FlowFixMe[prop-missing] (>=0.89.0 site=react_native_ios_fb) This comment + * suppresses an error found when Flow v0.89 was deployed. To see the error, + * delete this comment and run Flow. */ Image.getSize = getSize; /** @@ -201,9 +199,9 @@ Image.getSize = getSize; * * See https://reactnative.dev/docs/image.html#getsizewithheaders */ -/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete this - * comment and run Flow. */ +/* $FlowFixMe[prop-missing] (>=0.89.0 site=react_native_ios_fb) This comment + * suppresses an error found when Flow v0.89 was deployed. To see the error, + * delete this comment and run Flow. */ Image.getSizeWithHeaders = getSizeWithHeaders; /** @@ -212,9 +210,9 @@ Image.getSizeWithHeaders = getSizeWithHeaders; * * See https://reactnative.dev/docs/image.html#prefetch */ -/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete this - * comment and run Flow. */ +/* $FlowFixMe[prop-missing] (>=0.89.0 site=react_native_ios_fb) This comment + * suppresses an error found when Flow v0.89 was deployed. To see the error, + * delete this comment and run Flow. */ Image.prefetch = prefetch; /** @@ -223,9 +221,9 @@ Image.prefetch = prefetch; * * See https://reactnative.dev/docs/image.html#prefetch */ -/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete this - * comment and run Flow. */ +/* $FlowFixMe[prop-missing] (>=0.89.0 site=react_native_ios_fb) This comment + * suppresses an error found when Flow v0.89 was deployed. To see the error, + * delete this comment and run Flow. */ Image.prefetchWithMetadata = prefetchWithMetadata; /** @@ -233,9 +231,9 @@ Image.prefetchWithMetadata = prefetchWithMetadata; * * See https://reactnative.dev/docs/image.html#querycache */ -/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete this - * comment and run Flow. */ +/* $FlowFixMe[prop-missing] (>=0.89.0 site=react_native_ios_fb) This comment + * suppresses an error found when Flow v0.89 was deployed. To see the error, + * delete this comment and run Flow. */ Image.queryCache = queryCache; /** @@ -243,14 +241,11 @@ Image.queryCache = queryCache; * * See https://reactnative.dev/docs/image.html#resolveassetsource */ -/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete this - * comment and run Flow. */ +/* $FlowFixMe[prop-missing] (>=0.89.0 site=react_native_ios_fb) This comment + * suppresses an error found when Flow v0.89 was deployed. To see the error, + * delete this comment and run Flow. */ Image.resolveAssetSource = resolveAssetSource; -/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete this - * comment and run Flow. */ Image.propTypes = DeprecatedImagePropType; const styles = StyleSheet.create({ diff --git a/vnext/src/Libraries/Pressability/Pressability.windows.js b/vnext/src/Libraries/Pressability/Pressability.windows.js index 886eb184e15..80cadfe517f 100644 --- a/vnext/src/Libraries/Pressability/Pressability.windows.js +++ b/vnext/src/Libraries/Pressability/Pressability.windows.js @@ -704,12 +704,18 @@ export default class Pressability { : '<>', ); if (prevState !== nextState) { - PressabilityPerformanceEventEmitter.emitEvent(() => { - return { - signal, - touchDelayMs: Date.now() - event.nativeEvent.timestamp, - }; - }); + // Especially on iOS, not all events have timestamps associated. + // For telemetry purposes, this doesn't matter too much, as long as *some* do. + // Since the native timestamp is integral for logging telemetry, just skip + // events if they don't have a timestamp attached. + if (event.nativeEvent.timestamp != null) { + PressabilityPerformanceEventEmitter.emitEvent(() => { + return { + signal, + touchDelayMs: Date.now() - event.nativeEvent.timestamp, + }; + }); + } this._performTransitionSideEffects(prevState, nextState, signal, event); this._touchState = nextState; diff --git a/vnext/src/index.windows.js b/vnext/src/index.windows.js index ffa87daddbc..eca43d6e8f0 100644 --- a/vnext/src/index.windows.js +++ b/vnext/src/index.windows.js @@ -562,7 +562,10 @@ module.exports = { }; if (__DEV__) { - // $FlowFixMe This is intentional: Flow will error when attempting to access ART. + /* $FlowFixMe[prop-missing] This is intentional: Flow will error when + * attempting to access ART. */ + /* $FlowFixMe[invalid-export] This is intentional: Flow will error when + * attempting to access ART. */ Object.defineProperty(module.exports, 'ART', { configurable: true, get() { @@ -575,7 +578,10 @@ if (__DEV__) { }, }); - // $FlowFixMe This is intentional: Flow will error when attempting to access ListView. + /* $FlowFixMe[prop-missing] This is intentional: Flow will error when + * attempting to access ListView. */ + /* $FlowFixMe[invalid-export] This is intentional: Flow will error when + * attempting to access ListView. */ Object.defineProperty(module.exports, 'ListView', { configurable: true, get() { @@ -588,7 +594,10 @@ if (__DEV__) { }, }); - // $FlowFixMe This is intentional: Flow will error when attempting to access SwipeableListView. + /* $FlowFixMe[prop-missing] This is intentional: Flow will error when + * attempting to access SwipeableListView. */ + /* $FlowFixMe[invalid-export] This is intentional: Flow will error when + * attempting to access SwipeableListView. */ Object.defineProperty(module.exports, 'SwipeableListView', { configurable: true, get() { @@ -601,7 +610,10 @@ if (__DEV__) { }, }); - // $FlowFixMe This is intentional: Flow will error when attempting to access WebView. + /* $FlowFixMe[prop-missing] This is intentional: Flow will error when + * attempting to access WebView. */ + /* $FlowFixMe[invalid-export] This is intentional: Flow will error when + * attempting to access WebView. */ Object.defineProperty(module.exports, 'WebView', { configurable: true, get() { @@ -614,7 +626,10 @@ if (__DEV__) { }, }); - // $FlowFixMe This is intentional: Flow will error when attempting to access NetInfo. + /* $FlowFixMe[prop-missing] This is intentional: Flow will error when + * attempting to access NetInfo. */ + /* $FlowFixMe[invalid-export] This is intentional: Flow will error when + * attempting to access NetInfo. */ Object.defineProperty(module.exports, 'NetInfo', { configurable: true, get() { @@ -627,7 +642,10 @@ if (__DEV__) { }, }); - // $FlowFixMe This is intentional: Flow will error when attempting to access CameraRoll. + /* $FlowFixMe[prop-missing] This is intentional: Flow will error when + * attempting to access CameraRoll. */ + /* $FlowFixMe[invalid-export] This is intentional: Flow will error when + * attempting to access CameraRoll. */ Object.defineProperty(module.exports, 'CameraRoll', { configurable: true, get() { @@ -640,7 +658,10 @@ if (__DEV__) { }, }); - // $FlowFixMe This is intentional: Flow will error when attempting to access ImageStore. + /* $FlowFixMe[prop-missing] This is intentional: Flow will error when + * attempting to access ImageStore. */ + /* $FlowFixMe[invalid-export] This is intentional: Flow will error when + * attempting to access ImageStore. */ Object.defineProperty(module.exports, 'ImageStore', { configurable: true, get() { @@ -654,7 +675,10 @@ if (__DEV__) { }, }); - // $FlowFixMe This is intentional: Flow will error when attempting to access ImageEditor. + /* $FlowFixMe[prop-missing] This is intentional: Flow will error when + * attempting to access ImageEditor. */ + /* $FlowFixMe[invalid-export] This is intentional: Flow will error when + * attempting to access ImageEditor. */ Object.defineProperty(module.exports, 'ImageEditor', { configurable: true, get() { @@ -667,7 +691,10 @@ if (__DEV__) { }, }); - // $FlowFixMe This is intentional: Flow will error when attempting to access TimePickerAndroid. + /* $FlowFixMe[prop-missing] This is intentional: Flow will error when + * attempting to access TimePickerAndroid. */ + /* $FlowFixMe[invalid-export] This is intentional: Flow will error when + * attempting to access TimePickerAndroid. */ Object.defineProperty(module.exports, 'TimePickerAndroid', { configurable: true, get() { @@ -680,7 +707,10 @@ if (__DEV__) { }, }); - // $FlowFixMe This is intentional: Flow will error when attempting to access ToolbarAndroid. + /* $FlowFixMe[prop-missing] This is intentional: Flow will error when + * attempting to access ToolbarAndroid. */ + /* $FlowFixMe[invalid-export] This is intentional: Flow will error when + * attempting to access ToolbarAndroid. */ Object.defineProperty(module.exports, 'ToolbarAndroid', { configurable: true, get() { @@ -693,7 +723,10 @@ if (__DEV__) { }, }); - // $FlowFixMe This is intentional: Flow will error when attempting to access ViewPagerAndroid. + /* $FlowFixMe[prop-missing] This is intentional: Flow will error when + * attempting to access ViewPagerAndroid. */ + /* $FlowFixMe[invalid-export] This is intentional: Flow will error when + * attempting to access ViewPagerAndroid. */ Object.defineProperty(module.exports, 'ViewPagerAndroid', { configurable: true, get() { @@ -706,7 +739,10 @@ if (__DEV__) { }, }); - // $FlowFixMe This is intentional: Flow will error when attempting to access CheckBox. + /* $FlowFixMe[prop-missing] This is intentional: Flow will error when + * attempting to access CheckBox. */ + /* $FlowFixMe[invalid-export] This is intentional: Flow will error when + * attempting to access CheckBox. */ Object.defineProperty(module.exports, 'CheckBox', { configurable: true, get() { diff --git a/yarn.lock b/yarn.lock index 751887150ed..965c2d086f1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5362,10 +5362,10 @@ flatted@^2.0.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138" integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA== -flow-bin@^0.146.0: - version "0.146.0" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.146.0.tgz#fafa002663a0e13bf3c08c3972dd93d68289ccc6" - integrity sha512-TP8eCwltqc7fo6ad5klgsrZ2veZIK2qM1vHf1A/cnXTStPh8hLAz1cOXmlQIFZR/7fjSMI39TS3CgF6M/HUhAw== +flow-bin@^0.148.0: + version "0.148.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.148.0.tgz#1d264606dbb4d6e6070cc98a775e21dcd64e6890" + integrity sha512-7Cx6BUm8UAlbqtYJNYXdMrh900MQhNV+SjtBxZuWN7UmlVG4tIRNzNLEOjNnj2DN2vcL1wfI5IlSUXnws/QCEw== flow-parser@0.*: version "0.113.0" @@ -9063,10 +9063,10 @@ react-native-tscodegen@0.66.1: nullthrows "1.1.1" typescript "^3.5.3" -react-native@0.0.0-cfb5b5e20: - version "0.0.0-cfb5b5e20" - resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.0.0-cfb5b5e20.tgz#b00cba0dad57692f18a859388a5fb4d4b652e4ce" - integrity sha512-J9giG1ZqRyc5rMdiq+FYcVNPStR9371ACHfWZXSkV/r6SAz9SRS3DEyK0RsHBObNfZdvPcZHuYDm+hr+XzbR4w== +react-native@0.0.0-d04ec4dc6: + version "0.0.0-d04ec4dc6" + resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.0.0-d04ec4dc6.tgz#6b77462e3749f3300c8a3a1d8c4b2c8b6191a406" + integrity sha512-7JaEK4xCjPWIXK2tgQRhn7IwiFYrHdANiL7jKWEPWZlexBM5ZCGwcOAjWslgqJ8PG2YvOZqsS48FIkvYiurOgA== dependencies: "@jest/create-cache-key-function" "^26.5.0" "@react-native-community/cli" "^5.0.1-alpha.0" From 80455f799c953c79c3a7b03512c75b6fd721461b Mon Sep 17 00:00:00 2001 From: Igor Klemenski Date: Tue, 13 Apr 2021 13:49:46 -0700 Subject: [PATCH 2/5] adjust vcxproj imports --- vnext/ReactCommon/ReactCommon.vcxproj | 2 +- vnext/ReactCommon/ReactCommon.vcxproj.filters | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vnext/ReactCommon/ReactCommon.vcxproj b/vnext/ReactCommon/ReactCommon.vcxproj index fd90a063156..cfe5e7fbbfb 100644 --- a/vnext/ReactCommon/ReactCommon.vcxproj +++ b/vnext/ReactCommon/ReactCommon.vcxproj @@ -166,7 +166,7 @@ - + diff --git a/vnext/ReactCommon/ReactCommon.vcxproj.filters b/vnext/ReactCommon/ReactCommon.vcxproj.filters index 86f30420b5e..8d5bfb3e2ac 100644 --- a/vnext/ReactCommon/ReactCommon.vcxproj.filters +++ b/vnext/ReactCommon/ReactCommon.vcxproj.filters @@ -163,8 +163,8 @@ react\renderer\debug - - react\renderer\mounting + + react\renderer\telemetry From 22d8a2d8f3e2eda5b93ff32b2f9c4ca87a91fc95 Mon Sep 17 00:00:00 2001 From: Igor Klemenski Date: Tue, 13 Apr 2021 13:50:31 -0700 Subject: [PATCH 3/5] Change files --- ...-native-win32-ab315788-6234-4c98-896a-9eb50dc87178.json | 7 +++++++ .../node-rnw-rpc-c92c0604-9bde-41ca-950d-5ee18a05721f.json | 7 +++++++ ...ative-windows-b9a09a0f-311a-4f37-bf86-5d23900401d5.json | 7 +++++++ 3 files changed, 21 insertions(+) create mode 100644 change/@office-iss-react-native-win32-ab315788-6234-4c98-896a-9eb50dc87178.json create mode 100644 change/node-rnw-rpc-c92c0604-9bde-41ca-950d-5ee18a05721f.json create mode 100644 change/react-native-windows-b9a09a0f-311a-4f37-bf86-5d23900401d5.json diff --git a/change/@office-iss-react-native-win32-ab315788-6234-4c98-896a-9eb50dc87178.json b/change/@office-iss-react-native-win32-ab315788-6234-4c98-896a-9eb50dc87178.json new file mode 100644 index 00000000000..3cc1dcf60fa --- /dev/null +++ b/change/@office-iss-react-native-win32-ab315788-6234-4c98-896a-9eb50dc87178.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Integrate 4/1 nightly RN build.", + "packageName": "@office-iss/react-native-win32", + "email": "igklemen@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/node-rnw-rpc-c92c0604-9bde-41ca-950d-5ee18a05721f.json b/change/node-rnw-rpc-c92c0604-9bde-41ca-950d-5ee18a05721f.json new file mode 100644 index 00000000000..bb860760901 --- /dev/null +++ b/change/node-rnw-rpc-c92c0604-9bde-41ca-950d-5ee18a05721f.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Integrate 4/1 nightly RN build.", + "packageName": "node-rnw-rpc", + "email": "igklemen@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/react-native-windows-b9a09a0f-311a-4f37-bf86-5d23900401d5.json b/change/react-native-windows-b9a09a0f-311a-4f37-bf86-5d23900401d5.json new file mode 100644 index 00000000000..cb4973dbee1 --- /dev/null +++ b/change/react-native-windows-b9a09a0f-311a-4f37-bf86-5d23900401d5.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Integrate 4/1 nightly RN build.", + "packageName": "react-native-windows", + "email": "igklemen@microsoft.com", + "dependentChangeType": "patch" +} From 6fef10a5d448b63b865900b691f3b68e6739a9ff Mon Sep 17 00:00:00 2001 From: Igor Klemenski Date: Tue, 13 Apr 2021 16:45:43 -0700 Subject: [PATCH 4/5] fix up test build path --- vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj | 2 +- .../ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj.filters | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj b/vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj index 589cb5c0bf5..80dffe58a08 100644 --- a/vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj +++ b/vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj @@ -111,7 +111,7 @@ true - + true diff --git a/vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj.filters b/vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj.filters index 25f2c396603..db3eb578d28 100644 --- a/vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj.filters +++ b/vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj.filters @@ -92,7 +92,7 @@ react\renderer\mounting\tests - + react\renderer\mounting\tests From 102dda5082aebe79a67f4278251401c3f4500012 Mon Sep 17 00:00:00 2001 From: Igor Klemenski Date: Wed, 14 Apr 2021 15:08:49 -0700 Subject: [PATCH 5/5] fork MapBufferBuilder.cpp; fix build files --- vnext/ReactCommon/ReactCommon.vcxproj | 3 +- vnext/ReactCommon/ReactCommon.vcxproj.filters | 1 + .../renderer/mapbuffer/MapBufferBuilder.cpp | 214 ++++++++++++++++++ vnext/overrides.json | 10 +- 4 files changed, 226 insertions(+), 2 deletions(-) create mode 100644 vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/mapbuffer/MapBufferBuilder.cpp diff --git a/vnext/ReactCommon/ReactCommon.vcxproj b/vnext/ReactCommon/ReactCommon.vcxproj index cfe5e7fbbfb..6df42b583af 100644 --- a/vnext/ReactCommon/ReactCommon.vcxproj +++ b/vnext/ReactCommon/ReactCommon.vcxproj @@ -166,6 +166,7 @@ + - + diff --git a/vnext/ReactCommon/ReactCommon.vcxproj.filters b/vnext/ReactCommon/ReactCommon.vcxproj.filters index 8d5bfb3e2ac..6387413706a 100644 --- a/vnext/ReactCommon/ReactCommon.vcxproj.filters +++ b/vnext/ReactCommon/ReactCommon.vcxproj.filters @@ -167,6 +167,7 @@ react\renderer\telemetry + diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/mapbuffer/MapBufferBuilder.cpp b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/mapbuffer/MapBufferBuilder.cpp new file mode 100644 index 00000000000..62b6c5c5ffe --- /dev/null +++ b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/mapbuffer/MapBufferBuilder.cpp @@ -0,0 +1,214 @@ +/* + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#include "MapBufferBuilder.h" + +using namespace facebook::react; + +namespace facebook { +namespace react { + +MapBufferBuilder::MapBufferBuilder() + : MapBufferBuilder::MapBufferBuilder(INITIAL_KEY_VALUE_SIZE) {} + +MapBuffer MapBufferBuilder::EMPTY() { + static auto emptyMap = MapBufferBuilder().build(); + return emptyMap; +} + +MapBufferBuilder::MapBufferBuilder(uint16_t initialSize) { + keyValuesSize_ = initialSize; + keyValues_ = new Byte[keyValuesSize_]; + // First Key should be written right after the header. + keyValuesOffset_ = HEADER_SIZE; + + dynamicDataSize_ = 0; + dynamicDataValues_ = nullptr; + dynamicDataOffset_ = 0; +} + +void MapBufferBuilder::ensureKeyValueSpace() { + int oldKeyValuesSize = keyValuesSize_; + if (keyValuesSize_ >= std::numeric_limits::max() / 2) { + LOG(ERROR) + << "Error: trying to assign a value beyond the capacity of uint16_t" + << static_cast(keyValuesSize_) * 2; + abort(); + } + keyValuesSize_ *= 2; + uint8_t *newKeyValues = new Byte[keyValuesSize_]; + uint8_t *oldKeyValues = keyValues_; + memcpy(newKeyValues, keyValues_, oldKeyValuesSize); + keyValues_ = newKeyValues; + delete[] oldKeyValues; +} + +void MapBufferBuilder::storeKeyValue(Key key, uint8_t *value, int valueSize) { + if (key < minKeyToStore_) { + LOG(ERROR) << "Error: key out of order - key: " << key; + abort(); + } + if (valueSize > MAX_VALUE_SIZE) { + LOG(ERROR) << "Error: size of value must be <= MAX_VALUE_SIZE. ValueSize: " + << valueSize; + abort(); + } + // TODO: header.count points to the next index + // TODO: add test to verify storage of sparse keys + int keyOffset = getKeyOffset(_header.count); + int valueOffset = keyOffset + KEY_SIZE; + + int nextKeyValueOffset = keyOffset + BUCKET_SIZE; + if (nextKeyValueOffset >= keyValuesSize_) { + ensureKeyValueSpace(); + } + + memcpy(keyValues_ + keyOffset, &key, KEY_SIZE); + memcpy(keyValues_ + valueOffset, value, valueSize); + + _header.count++; + + minKeyToStore_ = key + 1; + // Move keyValuesOffset_ to the next available [key, value] position + keyValuesOffset_ = std::max(nextKeyValueOffset, keyValuesOffset_); +} + +void MapBufferBuilder::putBool(Key key, bool value) { + putInt(key, (int)value); +} + +void MapBufferBuilder::putDouble(Key key, double value) { + uint8_t *bytePointer = reinterpret_cast(&value); + storeKeyValue(key, bytePointer, DOUBLE_SIZE); +} + +void MapBufferBuilder::putNull(Key key) { + putInt(key, NULL_VALUE); +} + +void MapBufferBuilder::putInt(Key key, int value) { + uint8_t *bytePointer = reinterpret_cast(&(value)); + storeKeyValue(key, bytePointer, INT_SIZE); +} + +void MapBufferBuilder::ensureDynamicDataSpace(int size) { + if (dynamicDataValues_ == nullptr) { + dynamicDataSize_ = static_cast(std::max(INITIAL_DYNAMIC_DATA_SIZE, size)); + dynamicDataValues_ = new Byte[dynamicDataSize_]; + dynamicDataOffset_ = 0; + return; + } + + if (dynamicDataOffset_ + size >= dynamicDataSize_) { + int oldDynamicDataSize = dynamicDataSize_; + if (dynamicDataSize_ >= std::numeric_limits::max() / 2) { + LOG(ERROR) + << "Error: trying to assign a value beyond the capacity of uint16_t" + << static_cast(dynamicDataSize_) * 2; + abort(); + } + dynamicDataSize_ *= 2; + uint8_t *newDynamicDataValues = new Byte[dynamicDataSize_]; + uint8_t *oldDynamicDataValues = dynamicDataValues_; + memcpy(newDynamicDataValues, dynamicDataValues_, oldDynamicDataSize); + dynamicDataValues_ = newDynamicDataValues; + delete[] oldDynamicDataValues; + } +} + +void MapBufferBuilder::putString(Key key, std::string value) { + int strLength = static_cast(value.length()); + const char *cstring = getCstring(&value); + + // format [lenght of string (int)] + [Array of Characters in the string] + int sizeOfLength = INT_SIZE; + // TODO : review if map.getBufferSize() should be an int or long instead of an + // int16 (because strings can be longer than int16); + + int sizeOfDynamicData = sizeOfLength + strLength; + ensureDynamicDataSpace(sizeOfDynamicData); + memcpy(dynamicDataValues_ + dynamicDataOffset_, &strLength, sizeOfLength); + memcpy( + dynamicDataValues_ + dynamicDataOffset_ + sizeOfLength, + cstring, + strLength); + + // Store Key and pointer to the string + putInt(key, dynamicDataOffset_); + + dynamicDataOffset_ += sizeOfDynamicData; +} + +void MapBufferBuilder::putMapBuffer(Key key, MapBuffer &map) { + uint16_t mapBufferSize = map.getBufferSize(); + + // format [lenght of buffer (short)] + [Array of Characters in the string] + int sizeOfDynamicData = mapBufferSize + UINT16_SIZE; + + // format [Array of bytes of the mapBuffer] + ensureDynamicDataSpace(sizeOfDynamicData); + + memcpy(dynamicDataValues_ + dynamicDataOffset_, &mapBufferSize, UINT16_SIZE); + // Copy the content of the map into dynamicDataValues_ + map.copy(dynamicDataValues_ + dynamicDataOffset_ + UINT16_SIZE); + + // Store Key and pointer to the string + putInt(key, dynamicDataOffset_); + + dynamicDataOffset_ += sizeOfDynamicData; +} + +MapBuffer MapBufferBuilder::build() { + // Create buffer: [header] + [key, values] + [dynamic data] + int bufferSize = keyValuesOffset_ + dynamicDataOffset_; + + _header.bufferSize = static_cast(bufferSize); + + // Copy header at the beginning of "keyValues_" + memcpy(keyValues_, &_header, HEADER_SIZE); + + uint8_t *buffer = new Byte[bufferSize]; + + memcpy(buffer, keyValues_, keyValuesOffset_); + + if (dynamicDataValues_ != nullptr) { + memcpy(buffer + keyValuesOffset_, dynamicDataValues_, dynamicDataOffset_); + } + + // TODO: should we use std::move here? + auto map = MapBuffer(buffer, static_cast(bufferSize)); + + // TODO: we should invalidate the class once the build() method is + // called. + + // Reset internal data + delete[] keyValues_; + keyValues_ = nullptr; + keyValuesSize_ = 0; + keyValuesOffset_ = 0; + + if (dynamicDataValues_ != nullptr) { + delete[] dynamicDataValues_; + dynamicDataValues_ = nullptr; + } + dynamicDataSize_ = 0; + dynamicDataOffset_ = 0; + + return map; +} + +MapBufferBuilder::~MapBufferBuilder() { + if (keyValues_ != nullptr) { + delete[] keyValues_; + } + if (dynamicDataValues_ != nullptr) { + delete[] dynamicDataValues_; + } +} + +} // namespace react +} // namespace facebook diff --git a/vnext/overrides.json b/vnext/overrides.json index af0937d4cf0..6f2b8f309a9 100644 --- a/vnext/overrides.json +++ b/vnext/overrides.json @@ -2,7 +2,8 @@ "includePatterns": [ ".flowconfig", "ReactCopies/**", - "src/**" + "src/**", + "ReactCommon/TEMP_UntilReactCommonUpdate/**" ], "excludePatterns": [], "baseVersion": "0.0.0-d04ec4dc6", @@ -13,6 +14,13 @@ "baseFile": ".flowconfig", "baseHash": "7c2f3e8ecf80e5229d4e1fdad2b6ef324acae0c4" }, + { + "type": "patch", + "file": "ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/mapbuffer/MapBufferBuilder.cpp", + "baseFile": "ReactCommon/react/renderer/mapbuffer/MapBufferBuilder.cpp", + "baseHash": "1efe331e2def36ae16146df78afcd12e8a8fd2f6", + "issue": 7591 + }, { "type": "patch", "file": "ReactCommon/Yoga.cpp",