Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync Local #2

Merged
merged 112 commits into from
Oct 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
16f06bc
SwipeableRow: Remove PropTypes, convert to ES6 class (#21386)
empyrical Sep 28, 2018
9104b04
SwipeableFlatList, SwipeableQuickActions: Remove PropTypes (#21384)
empyrical Sep 28, 2018
d16ec74
RN: Replace `ImageResizeMode` w/ Flow Type
yungsters Sep 28, 2018
e873809
RN: Remove Prop Types from `LayoutAnimation`
yungsters Sep 28, 2018
199c918
RN: Fix `ReactNativeViewAttributes` Type Bugs
yungsters Sep 28, 2018
ae4be91
fix broken animation tests
sahrens Sep 28, 2018
02ad56f
Expose a getter for overflow setting in ReactViewGroup (#21398)
kmagiera Sep 28, 2018
e3b61f5
Fabric: Debug Pretty-printing is now debug only feature
shergin Sep 28, 2018
6715268
Revert D10100555: [react-native][PR] SwipeableRow: Remove PropTypes, …
fred2028 Sep 28, 2018
97f0e43
allow zero offset when shadow radius is nonzero
kukulski Sep 28, 2018
9edf635
Fabric: Using YGNodeLayoutGet* family functions to access Yoga layout
shergin Sep 28, 2018
5ce2c01
Fabric: Fixed a bug in LayoutMetrics::operator==
shergin Sep 28, 2018
e082a61
Revert D9930713: Avoid view manager class loads
ayc1 Sep 28, 2018
af181fb
Check if child view != null before dropping (#20465)
Sep 28, 2018
ea53727
Android: fix cookies lost on Android 5.0 and above (#19770)
Sep 28, 2018
53b487d
Use ShellCheck (#19681)
hramos Sep 29, 2018
e2210ab
Fix flow in InitializeCore
Sep 29, 2018
e28d8f6
Fix copyright headers
hramos Sep 29, 2018
84f1834
Move ImageSourcePropType.js, ImageStylePropTypes.js, TextPropTypes.js…
nissy-dev Sep 29, 2018
e7ddc59
Renames of ImageSource, ImageStyle, and TextProps propTypes
RSNara Sep 29, 2018
ee03459
FBJS: Upgrade to ^1.0.0
yungsters Sep 29, 2018
d00bdb9
Resolve protocol http, https when not in lowercase (#21396)
hyunjongL Sep 29, 2018
c70abb3
Fabric: Enabling view hierarchy flattening (for <View> component only…
shergin Oct 1, 2018
d6f3d37
Rename and move ViewStylePropTypes (#21415)
Thomas0c Oct 1, 2018
b6b0fc1
Move and Rename custom propType definitions in LayoutPropTypes (#21370)
nissy-dev Oct 1, 2018
9e65223
Fix artifacting on RN-drawn borders with asymmetric radii (#21208)
jamesreggio Oct 1, 2018
ee74135
Add tracing to when SO libraries are loaded
axe-fb Oct 1, 2018
80066db
Replace DeprecatedViewPropTypes.style for ViewStyleProp on Integratio…
ronal2do Oct 1, 2018
c870533
InspectorPanel -> Delete PropTypes (#21392)
dkaushik95 Oct 1, 2018
07ac31e
Make Flow types more strict
RSNara Oct 1, 2018
4768bea
Fix CameraRoll.getPhotos() crash on Android if device has a problemat…
naxel Oct 1, 2018
b030fcb
Update path to code analysis script (#21443)
hramos Oct 1, 2018
4ac500a
Don't access ReadableNativeArray on UI thread
ayc1 Oct 1, 2018
637d74f
Expose EventEmitter.dispatchEvent as public
mdvacca Oct 2, 2018
d3f2f96
Fix default accessibility delegate
ayc1 Oct 2, 2018
c1561ab
iOS: fix the baseline issue when displaying a mixture of different-la…
BingBingL Oct 2, 2018
8a49750
Upgrade xplat/js to Flow v0.82
samwgoldman Oct 2, 2018
ff084a4
Add workaround for Android Gradle Plugin 3.2 change to asset dir (#21…
edilaic Oct 2, 2018
1fc8a46
Bump up the buffer size and show a warning if the trace might be trun…
alexeylang Oct 2, 2018
408207b
Split ImageProps into DeprecatedPropTypes (#21411)
JenLindsay Oct 2, 2018
e7e63fd
Dealloc first time RCTNetInfo reachability callback
Oct 2, 2018
5be0dff
Avoid view manager class loads (take 2)
ayc1 Oct 2, 2018
9e7d918
Introduce EventBeatManager and enable events
mdvacca Oct 2, 2018
001b04f
Cleanup FabricBinding class
mdvacca Oct 2, 2018
cf66923
Refactor UIManager -> FabricUIManager
mdvacca Oct 2, 2018
98a6f19
Move 'top' prefix from UIManager to EventEmitter
mdvacca Oct 2, 2018
8b487d4
Create Handler lazily in DevServerHelper
axe-fb Oct 3, 2018
a5f3571
Refactor the usages of ChoreographerCompat
axe-fb Oct 3, 2018
7f6254b
Cache the instance of `ChoreographerCompat`
axe-fb Oct 3, 2018
fdfe422
Update flow Props declaration in TouchableWithoutFeedBack for onFocus…
gregaou Oct 3, 2018
8a2187b
Remove TimerMixin from TimerExample
elicwhite Oct 3, 2018
fa6035b
Fix accessibility role/label
ayc1 Oct 4, 2018
c5186ae
Simplify OSS enums
Oct 4, 2018
12ab08a
Bump [email protected]
rafeca Oct 4, 2018
997f382
Fix deprecation warning message in Switch
radko93 Oct 4, 2018
7536c9b
Fix Incremental children flow type
elicwhite Oct 4, 2018
925f63d
Run publish_npm_package job on tagged commits without any pre-reqs (#…
hramos Oct 5, 2018
0de99bc
Split ViewAccessibility into DeprecatedViewAccessibility and rename r…
danibonilha Oct 5, 2018
3aa8f09
Deprecate legacyImplementation
elicwhite Oct 5, 2018
3d31beb
Remove TimerMixin on ProgressBarAndroidExample.android.js (#21501)
nissy-dev Oct 5, 2018
3ad5c9e
Fabric: Enabling clang-format for half of Fabric modules
shergin Oct 5, 2018
f1d6e22
Removing TimerMixin on ProgressViewIOSExample (#21500)
gvarandas Oct 5, 2018
6967a4f
Flag code analysis issues once per converter used (#21503)
hramos Oct 5, 2018
89a358f
Expose enableBabelRuntime config param externally
rafeca Oct 5, 2018
bd8b942
Bump [email protected]
rafeca Oct 5, 2018
8ceb158
Remove TimerMixin from ListView (#21488)
exced Oct 5, 2018
6c20017
Remove TimerMixin from TouchableWithoutFeedback (#21493)
Thomas0c Oct 5, 2018
4d69431
Remove TimerMixin on ReactContentSizeUpdateTest (#21502)
peaonunes Oct 5, 2018
5bfa39e
Skip flaky Animated test
elicwhite Oct 5, 2018
bb9b9a8
When converting arguments JS->Java, handle integers correctly
mhorowitz Oct 5, 2018
9282c9d
Remove TimerMixin from TouchableOpacity (#21520)
danibonilha Oct 6, 2018
7142e9b
React sync for revisions ade5e69...d836010
yungsters Oct 6, 2018
d279b7c
Add point at beginning of InitializeCore
Oct 6, 2018
b8cb8d5
Update copyright for yoga files
Oct 6, 2018
b3f4872
Adding new Buck targets
rratmansky Oct 8, 2018
de416e7
Removing TimerMixin on SwipeableRow (#21499)
gvarandas Oct 8, 2018
31d6a69
Removing TimerMixin on TextInput (#21522)
richardcann Oct 8, 2018
b7526b2
Add test for InterpolatorType
Oct 8, 2018
9955aaf
flow-github/metro.js: Add missing module declaration (#21555)
empyrical Oct 8, 2018
fa3525d
Fabric: Introducting EventBeat::setFailCallback
shergin Oct 8, 2018
02d2e85
Fabric: `failCallback` implementation for MessageQueueEventBeat
shergin Oct 8, 2018
5f4aa6a
Fabric: Proper failCallback handling in EventBeatBasedExecutor
shergin Oct 8, 2018
0f683bb
Fabric: Calling `UIManager`'s `uninstall` function asynchonously
shergin Oct 8, 2018
a48fce8
Remove SubscribableMixin from ReactContentSizeUpdateTest
elicwhite Oct 8, 2018
1031872
check isAvailable key on simulator object (#21557)
antonychan Oct 9, 2018
f187a30
editorconfig: Set indent_size for BUCK files to 4 (#21554)
empyrical Oct 9, 2018
bbb6a07
� Improve Button component stylesheet; removed duplicate styles (#21535)
cHaLkdusT Oct 9, 2018
751be26
Allow UIManager to load native view managers lazily
Oct 9, 2018
5512c47
remove createReactClass from the RNTester/js/TextExample.ios.js (#21603)
nissy-dev Oct 9, 2018
e90f5fa
Add Deprecation Warning to ListView
elicwhite Oct 9, 2018
4876928
Fabric: Improved thread-safety in ShadowTree
shergin Oct 9, 2018
d38dffc
Fabric: Proper defaults for ScrollView's alwaysBounce*
shergin Oct 9, 2018
b985084
Fabric: `constraintLayout` is now return boolean
shergin Oct 9, 2018
b8947c4
Fabric: `ShadowTree::synchronize` and reliable `constraintLayout`
shergin Oct 9, 2018
4ce57cb
Fabric: Passing size constraints as part of starting Surface
shergin Oct 9, 2018
01af828
Fabric: Fixed possible race condition in `ShadowTree::complete`
shergin Oct 9, 2018
8f51243
Fabric: Enabling clang-format for the rest of Fabric
shergin Oct 9, 2018
04fbdd3
Fabric: Proper parsing of Accessibility Props
shergin Oct 9, 2018
95afdd8
Introducing "collapsable" prop as part of ViewProps
mdvacca Oct 9, 2018
74a00be
Enabled View falttening for Android builds
mdvacca Oct 9, 2018
397573f
Fix onPress for TextView containing just RawText
mdvacca Oct 9, 2018
28d80e4
Avoid serializing UndefinedColor when rendering texts
mdvacca Oct 9, 2018
80fd4bb
Removing createReactClass from ListView*Example.js (#21582)
exced Oct 9, 2018
b32029f
remove createReactClass from RNTester/js/SwipeableFlatListExample.js …
himanshusoni Oct 10, 2018
636d01b
Remove legacyImplementation from FlatList and SectionList
elicwhite Oct 10, 2018
4a52218
Remove MetroListView from SectionList
elicwhite Oct 10, 2018
780ced4
Fix C# unit tests (#818)
Oct 10, 2018
9965ea5
remove mixin on Libraries/Components/ScrollResponder.js (#21589)
nissy-dev Oct 10, 2018
4b6f02e
Normalize scheme for URL on Android (#21561)
radeno Oct 10, 2018
4b8c657
Remove SubscribableMixin from SizeFlexibilityUpdateTest (#21580)
exced Oct 10, 2018
15c0598
Update to Detox 9 (#21570)
kelset Oct 10, 2018
3184cab
react-native: fix path module use in writePlist test
Oct 10, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
55 changes: 32 additions & 23 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -585,31 +585,44 @@ jobs:
- checkout
- run: *setup-artifacts

- restore-cache: *restore-yarn-cache
- restore-cache: *restore-cache-analysis
- run: *yarn

- run:
name: Analyze Shell Scripts
command: |
echo -e "\\x1B[36mInstalling additional dependencies\\x1B[0m"
sudo apt-get install -y shellcheck
yarn add @octokit/[email protected]
echo -e "\\x1B[36mAnalyzing shell scripts\\x1B[0m"; \
GITHUB_TOKEN="$PUBLIC_ANALYSISBOT_GITHUB_TOKEN_A""$PUBLIC_ANALYSISBOT_GITHUB_TOKEN_B" \
GITHUB_OWNER="$CIRCLE_PROJECT_USERNAME" \
GITHUB_REPO="$CIRCLE_PROJECT_REPONAME" \
GITHUB_PR_NUMBER="$CIRCLE_PR_NUMBER" \
./scripts/circleci/analyze_scripts.sh
when: always

- run:
name: Analyze Code
command: |
if [ -n "$CIRCLE_PR_NUMBER" ]; then
echo -e "\\x1B[36mInstalling additional dependencies\\x1B[0m"; yarn add @octokit/[email protected]
echo -e "\\x1B[36mAnalyzing code\\x1B[0m"; GITHUB_TOKEN="$PUBLIC_ANALYSISBOT_GITHUB_TOKEN_A""$PUBLIC_ANALYSISBOT_GITHUB_TOKEN_B" ./scripts/circleci/analyze_code.sh
else
echo "Skipping code analysis."
fi
echo -e "\\x1B[36mInstalling additional dependencies\\x1B[0m"; yarn add @octokit/[email protected]
echo -e "\\x1B[36mAnalyzing code\\x1B[0m"; \
GITHUB_TOKEN="$PUBLIC_ANALYSISBOT_GITHUB_TOKEN_A""$PUBLIC_ANALYSISBOT_GITHUB_TOKEN_B" \
GITHUB_OWNER="$CIRCLE_PROJECT_USERNAME" \
GITHUB_REPO="$CIRCLE_PROJECT_REPONAME" \
GITHUB_PR_NUMBER="$CIRCLE_PR_NUMBER" \
./scripts/circleci/analyze_code.sh
when: always

- restore-cache: *restore-cache-analysis
- run:
name: Analyze Pull Request
command: |
if [ -n "$CIRCLE_PR_NUMBER" ]; then
cd bots
yarn install --non-interactive --cache-folder ~/.cache/yarn
DANGER_GITHUB_API_TOKEN="$PUBLIC_PULLBOT_GITHUB_TOKEN_A""$PUBLIC_PULLBOT_GITHUB_TOKEN_B" yarn danger
else
echo "Skipping pull request analysis."
fi
echo -e "\\x1B[36mInstalling additional dependencies\\x1B[0m"
cd bots
yarn install --non-interactive --cache-folder ~/.cache/yarn
echo -e "\\x1B[36mAnalyzing pull request\\x1B[0m"; \
DANGER_GITHUB_API_TOKEN="$PUBLIC_PULLBOT_GITHUB_TOKEN_A""$PUBLIC_PULLBOT_GITHUB_TOKEN_B" \
yarn danger
when: always
- save-cache: *save-cache-analysis

Expand Down Expand Up @@ -716,13 +729,9 @@ workflows:
# only act on version tags
tags:
only: /v[0-9]+(\.[0-9]+)*(\-rc(\.[0-9]+)?)?/
requires:
- analyze
- test_detox_end_to_end
- test_javascript
- test_objc
- test_android

# Run code checks
# Run code checks on PRs from forks
- analyze_pr:
filters: *filter-ignore-master-stable
filters:
branches:
only: /^pull\/.*$/
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ indent_size = 2

[*.gradle]
indent_size = 4

[BUCK]
indent_size = 4
2 changes: 1 addition & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,4 @@ untyped-import
untyped-type-import

[version]
^0.81.0
^0.82.0
2 changes: 1 addition & 1 deletion .flowconfig.android
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,4 @@ untyped-import
untyped-type-import

[version]
^0.81.0
^0.82.0
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ mount -o remount,exec /dev/shm
AVD_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 8 | head -n 1)

# create virtual device
echo no | android create avd -n $AVD_UUID -f -t android-19 --abi default/armeabi-v7a
echo no | android create avd -n "$AVD_UUID" -f -t android-19 --abi default/armeabi-v7a

# emulator setup
emulator64-arm -avd $AVD_UUID -no-skin -no-audio -no-window -no-boot-anim &
Expand All @@ -28,8 +28,9 @@ watchman shutdown-server
node local-cli/cli.js bundle --platform android --dev true --entry-file ReactAndroid/src/androidTest/js/TestBundle.js --bundle-output ReactAndroid/src/androidTest/assets/AndroidTestBundle.js

# build test APK
# shellcheck disable=SC1091
source ./scripts/android-setup.sh && NO_BUCKD=1 retry3 buck install ReactAndroid/src/androidTest/buck-runner:instrumentation-tests --config build.threads=1

# run installed apk with tests
node ./ContainerShip/scripts/run-android-ci-instrumentation-tests.js $*
node ./ContainerShip/scripts/run-android-ci-instrumentation-tests.js "$*"
exit $?
2 changes: 1 addition & 1 deletion ContainerShip/scripts/run-android-docker-unit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ mount -o remount,exec /dev/shm
set -x

# run unit tests
buck test ReactAndroid/src/test/... --config build.threads=$UNIT_TESTS_BUILD_THREADS
buck test ReactAndroid/src/test/... --config build.threads="$UNIT_TESTS_BUILD_THREADS"
9 changes: 5 additions & 4 deletions ContainerShip/scripts/run-ci-e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ function e2e_suite() {
emulator64-arm -avd "$AVD_UUID" -no-skin -no-audio -no-window -no-boot-anim &

bootanim=""
# shellcheck disable=SC2076
until [[ "$bootanim" =~ "stopped" ]]; do
sleep 5
bootanim=$(adb -e shell getprop init.svc.bootanim 2>&1)
Expand Down Expand Up @@ -210,15 +211,15 @@ function e2e_suite() {
fi

# kill packager process
if kill -0 $SERVER_PID; then
if kill -0 "$SERVER_PID"; then
echo "Killing packager $SERVER_PID"
kill -9 $SERVER_PID
kill -9 "$SERVER_PID"
fi

# kill appium process
if kill -0 $APPIUM_PID; then
if kill -0 "$APPIUM_PID"; then
echo "Killing appium $APPIUM_PID"
kill -9 $APPIUM_PID
kill -9 "$APPIUM_PID"
fi

fi
Expand Down
10 changes: 5 additions & 5 deletions ContainerShip/scripts/run-instrumentation-tests-via-adb-shell.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

# shellcheck disable=SC1117
# Python script to run instrumentation tests, copied from https://github.com/circleci/circle-dummy-android
# Example: ./scripts/run-android-instrumentation-tests.sh com.facebook.react.tests com.facebook.react.tests.ReactPickerTestCase
#
Expand All @@ -9,7 +9,7 @@ export PATH="$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools:$PATH"
adb logcat -c

# run tests and check output
python - $1 $2 << END
python - "$1" "$2" << END

import re
import subprocess as sp
Expand All @@ -24,7 +24,7 @@ test_class = None

if len(sys.argv) > 2:
test_class = sys.argv[2]

def update():
# prevent CircleCI from killing the process for inactivity
while not done:
Expand All @@ -38,10 +38,10 @@ t.start()
def run():
sp.Popen(['adb', 'wait-for-device']).communicate()
if (test_class != None):
p = sp.Popen('adb shell am instrument -w -e class %s %s/android.support.test.runner.AndroidJUnitRunner'
p = sp.Popen('adb shell am instrument -w -e class %s %s/android.support.test.runner.AndroidJUnitRunner'
% (test_class, test_app), shell=True, stdout=sp.PIPE, stderr=sp.PIPE, stdin=sp.PIPE)
else :
p = sp.Popen('adb shell am instrument -w %s/android.support.test.runner.AndroidJUnitRunner'
p = sp.Popen('adb shell am instrument -w %s/android.support.test.runner.AndroidJUnitRunner'
% (test_app), shell=True, stdout=sp.PIPE, stderr=sp.PIPE, stdin=sp.PIPE)
return p.communicate()

Expand Down
24 changes: 9 additions & 15 deletions IntegrationTests/IntegrationTestHarnessTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,22 @@

'use strict';

/* $FlowFixMe(>=0.54.0 site=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. */
const requestAnimationFrame = require('fbjs/lib/requestAnimationFrame');
const React = require('react');
const PropTypes = require('prop-types');
const ReactNative = require('react-native');
const {Text, View} = ReactNative;
const {TestModule} = ReactNative.NativeModules;

class IntegrationTestHarnessTest extends React.Component<
{
shouldThrow?: boolean,
waitOneFrame?: boolean,
},
$FlowFixMeState,
> {
static propTypes = {
shouldThrow: PropTypes.bool,
waitOneFrame: PropTypes.bool,
};
type Props = $ReadOnly<{|
shouldThrow?: boolean,
waitOneFrame?: boolean,
|}>;

type State = {|
done: boolean,
|};

class IntegrationTestHarnessTest extends React.Component<Props, State> {
state = {
done: false,
};
Expand Down
22 changes: 16 additions & 6 deletions IntegrationTests/ReactContentSizeUpdateTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
*/

'use strict';
Expand All @@ -13,12 +14,11 @@ const React = require('react');
const createReactClass = require('create-react-class');
const ReactNative = require('react-native');
const RCTNativeAppEventEmitter = require('RCTNativeAppEventEmitter');
const Subscribable = require('Subscribable');
const TimerMixin = require('react-timer-mixin');

const {View} = ReactNative;

const {TestModule} = ReactNative.NativeModules;
import type EmitterSubscription from 'EmitterSubscription';

const reactViewWidth = 101;
const reactViewHeight = 102;
Expand All @@ -27,11 +27,11 @@ const newReactViewHeight = 202;

const ReactContentSizeUpdateTest = createReactClass({
displayName: 'ReactContentSizeUpdateTest',
mixins: [Subscribable.Mixin, TimerMixin],
_timeoutID: (null: ?TimeoutID),
_subscription: (null: ?EmitterSubscription),

UNSAFE_componentWillMount: function() {
this.addListenerOn(
RCTNativeAppEventEmitter,
this._subscription = RCTNativeAppEventEmitter.addListener(
'rootViewDidChangeIntrinsicSize',
this.rootViewDidChangeIntrinsicSize,
);
Expand All @@ -52,11 +52,21 @@ const ReactContentSizeUpdateTest = createReactClass({
},

componentDidMount: function() {
this.setTimeout(() => {
this._timeoutID = setTimeout(() => {
this.updateViewSize();
}, 1000);
},

componentWillUnmount: function() {
if (this._timeoutID != null) {
clearTimeout(this._timeoutID);
}

if (this._subscription != null) {
this._subscription.remove();
}
},

rootViewDidChangeIntrinsicSize: function(intrinsicSize) {
if (
intrinsicSize.height === newReactViewHeight &&
Expand Down
14 changes: 10 additions & 4 deletions IntegrationTests/SizeFlexibilityUpdateTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
*/

'use strict';
Expand All @@ -13,10 +14,10 @@ const React = require('react');
const createReactClass = require('create-react-class');
const ReactNative = require('react-native');
const RCTNativeAppEventEmitter = require('RCTNativeAppEventEmitter');
const Subscribable = require('Subscribable');
const {View} = ReactNative;

const {TestModule} = ReactNative.NativeModules;
import type EmitterSubscription from 'EmitterSubscription';

const reactViewWidth = 111;
const reactViewHeight = 222;
Expand All @@ -25,16 +26,21 @@ let finalState = false;

const SizeFlexibilityUpdateTest = createReactClass({
displayName: 'SizeFlexibilityUpdateTest',
mixins: [Subscribable.Mixin],
_subscription: (null: ?EmitterSubscription),

UNSAFE_componentWillMount: function() {
this.addListenerOn(
RCTNativeAppEventEmitter,
this._subscription = RCTNativeAppEventEmitter.addListener(
'rootViewDidChangeIntrinsicSize',
this.rootViewDidChangeIntrinsicSize,
);
},

componentWillUnmount: function() {
if (this._subscription != null) {
this._subscription.remove();
}
},

markPassed: function() {
TestModule.markTestPassed(true);
finalState = true;
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Animated/release/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"license": "MIT",
"main": "Animated.js",
"dependencies": {
"fbjs": "0.8.17"
"fbjs": "^1.0.0"
},
"scripts": {
"build": "gulp"
Expand Down
4 changes: 3 additions & 1 deletion Libraries/Animated/src/__tests__/Animated-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ describe('Animated tests', () => {
expect(callback).toBeCalled();
});

it('send toValue when an underdamped spring stops', () => {
// This test is flaky and we are asking open source to fix it
// https://github.com/facebook/react-native/issues/21517
it.skip('send toValue when an underdamped spring stops', () => {
const anim = new Animated.Value(0);
const listener = jest.fn();
anim.addListener(listener);
Expand Down
4 changes: 2 additions & 2 deletions Libraries/Animated/src/createAnimatedComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
const {AnimatedEvent} = require('./AnimatedEvent');
const AnimatedProps = require('./nodes/AnimatedProps');
const React = require('React');
const ViewStylePropTypes = require('ViewStylePropTypes');
const DeprecatedViewStylePropTypes = require('DeprecatedViewStylePropTypes');

const invariant = require('fbjs/lib/invariant');

Expand Down Expand Up @@ -184,7 +184,7 @@ function createAnimatedComponent(Component: any): any {
return;
}

for (const key in ViewStylePropTypes) {
for (const key in DeprecatedViewStylePropTypes) {
if (!propTypes[key] && props[key] !== undefined) {
console.warn(
'You are setting the style `{ ' +
Expand Down
Loading