Skip to content

Commit 46919e9

Browse files
committed
Merge branch 'master' into muhammad/arch-64-fb-submit-master
* master: Fix NullPointerException when emiting event using UIManagerModule Fixed concurrency issue in remote debugger Fix ReactImagePropertyTest SoLoader failures (facebook#19607) Remove unused include. (facebook#19548) Update Danger token (facebook#19606) Modified deepFreezeAndThrowOnMutationInDev to use Object.prototype.ha… (facebook#19598) Change error message on interpolation (facebook#19571) Bump Prettier to 1.13.4 on xplat Fix/security issues (facebook#19373) Add open source Flow declaration for Metro module Use correct library reference for libfishhook.a in RCTWebSocket (facebook#19579) Enable proguard for Fabric in release builds Fix events not working after closing and navigating back to Fabric screen in FB4A
2 parents b0851f7 + 291c01f commit 46919e9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+184
-95
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -567,9 +567,9 @@ jobs:
567567
- run:
568568
name: Analyze Pull Request
569569
command: |
570-
# DANGER_GITHUB_API_TOKEN=Facebook-Open-Source-Bot public_repo access token
570+
# DANGER_GITHUB_API_TOKEN=React-Linter public_repo access token
571571
if [ -n "$CIRCLE_PR_NUMBER" ]; then
572-
cd bots && DANGER_GITHUB_API_TOKEN="b186c9a82bab3b08ec80""c0818117619eec6f281a" yarn danger
572+
cd bots && DANGER_GITHUB_API_TOKEN="80aa64c50f38a267e9ba""575d41d528f9c234edb8" yarn danger
573573
else
574574
echo "Skipping pull request analysis."
575575
fi

Libraries/ART/ReactNativeART.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ function insertOffsetsIntoArray(stops, targetArray, atIndex, multi, reverse) {
297297
let i = 0;
298298
if ('length' in stops) {
299299
while (i < stops.length) {
300-
offsetNumber = i / (stops.length - 1) * multi;
300+
offsetNumber = (i / (stops.length - 1)) * multi;
301301
targetArray[atIndex + i] = reverse ? 1 - offsetNumber : offsetNumber;
302302
i++;
303303
}
@@ -530,7 +530,7 @@ function LinearGradient(stops, x1, y1, x2, y2) {
530530
const type = LINEAR_GRADIENT;
531531

532532
if (arguments.length < 5) {
533-
const angle = (x1 == null ? 270 : x1) * Math.PI / 180;
533+
const angle = ((x1 == null ? 270 : x1) * Math.PI) / 180;
534534

535535
let x = Math.cos(angle);
536536
let y = -Math.sin(angle);

Libraries/Animated/src/Easing.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ class Easing {
131131
* http://easings.net/#easeInSine
132132
*/
133133
static sin(t: number) {
134-
return 1 - Math.cos(t * Math.PI / 2);
134+
return 1 - Math.cos((t * Math.PI) / 2);
135135
}
136136

137137
/**
@@ -164,7 +164,7 @@ class Easing {
164164
*/
165165
static elastic(bounciness: number = 1): (t: number) => number {
166166
const p = bounciness * Math.PI;
167-
return t => 1 - Math.pow(Math.cos(t * Math.PI / 2), 3) * Math.cos(t * p);
167+
return t => 1 - Math.pow(Math.cos((t * Math.PI) / 2), 3) * Math.cos(t * p);
168168
}
169169

170170
/**

Libraries/Animated/src/__tests__/Easing-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ describe('Easing', () => {
8181

8282
function sampleEasingFunction(easing) {
8383
const DURATION = 300;
84-
const tickCount = Math.round(DURATION * 60 / 1000);
84+
const tickCount = Math.round((DURATION * 60) / 1000);
8585
const samples = [];
8686
for (let i = 0; i <= tickCount; i++) {
8787
samples.push(easing(i / tickCount));

Libraries/Animated/src/animations/DecayAnimation.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,7 @@ class DecayAnimation extends Animation {
8181

8282
const value =
8383
this._fromValue +
84-
this._velocity /
85-
(1 - this._deceleration) *
84+
(this._velocity / (1 - this._deceleration)) *
8685
(1 - Math.exp(-(1 - this._deceleration) * (now - this._startTime)));
8786

8887
this._onUpdate(value);

Libraries/Animated/src/animations/SpringAnimation.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,15 +266,15 @@ class SpringAnimation extends Animation {
266266
position =
267267
this._toValue -
268268
envelope *
269-
((v0 + zeta * omega0 * x0) / omega1 * Math.sin(omega1 * t) +
269+
(((v0 + zeta * omega0 * x0) / omega1) * Math.sin(omega1 * t) +
270270
x0 * Math.cos(omega1 * t));
271271
// This looks crazy -- it's actually just the derivative of the
272272
// oscillation function
273273
velocity =
274274
zeta *
275275
omega0 *
276276
envelope *
277-
(Math.sin(omega1 * t) * (v0 + zeta * omega0 * x0) / omega1 +
277+
((Math.sin(omega1 * t) * (v0 + zeta * omega0 * x0)) / omega1 +
278278
x0 * Math.cos(omega1 * t)) -
279279
envelope *
280280
(Math.cos(omega1 * t) * (v0 + zeta * omega0 * x0) -

Libraries/Animated/src/nodes/AnimatedInterpolation.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ function checkValidInputRange(arr: Array<number>) {
285285
* mean this implicit string conversion, you can do something like
286286
* String(myThing)
287287
*/
288-
'inputRange must be monotonically increasing ' + arr,
288+
'inputRange must be monotonically non-decreasing ' + arr,
289289
);
290290
}
291291
}
@@ -358,7 +358,7 @@ class AnimatedInterpolation extends AnimatedWithChildren {
358358
}
359359
if (/deg$/.test(value)) {
360360
const degrees = parseFloat(value) || 0;
361-
const radians = degrees * Math.PI / 180.0;
361+
const radians = (degrees * Math.PI) / 180.0;
362362
return radians;
363363
} else {
364364
// Assume radians

Libraries/Animated/src/nodes/AnimatedModulo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class AnimatedModulo extends AnimatedWithChildren {
3232

3333
__getValue(): number {
3434
return (
35-
(this._a.__getValue() % this._modulus + this._modulus) % this._modulus
35+
((this._a.__getValue() % this._modulus) + this._modulus) % this._modulus
3636
);
3737
}
3838

Libraries/Color/normalizeColor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ function parse255(str: string): number {
188188

189189
function parse360(str: string): number {
190190
const int = parseFloat(str);
191-
return ((int % 360 + 360) % 360) / 360;
191+
return (((int % 360) + 360) % 360) / 360;
192192
}
193193

194194
function parse1(str: string): number {

Libraries/Components/Keyboard/KeyboardAvoidingView.js

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,10 @@ class KeyboardAvoidingView extends React.Component<Props, State> {
171171
return (
172172
<View
173173
ref={viewRef}
174-
style={StyleSheet.compose(style, heightStyle)}
174+
style={StyleSheet.compose(
175+
style,
176+
heightStyle,
177+
)}
175178
onLayout={this._onLayout}
176179
{...props}>
177180
{children}
@@ -186,9 +189,12 @@ class KeyboardAvoidingView extends React.Component<Props, State> {
186189
onLayout={this._onLayout}
187190
{...props}>
188191
<View
189-
style={StyleSheet.compose(contentContainerStyle, {
190-
bottom: bottomHeight,
191-
})}>
192+
style={StyleSheet.compose(
193+
contentContainerStyle,
194+
{
195+
bottom: bottomHeight,
196+
},
197+
)}>
192198
{children}
193199
</View>
194200
</View>
@@ -198,7 +204,10 @@ class KeyboardAvoidingView extends React.Component<Props, State> {
198204
return (
199205
<View
200206
ref={viewRef}
201-
style={StyleSheet.compose(style, {paddingBottom: bottomHeight})}
207+
style={StyleSheet.compose(
208+
style,
209+
{paddingBottom: bottomHeight},
210+
)}
202211
onLayout={this._onLayout}
203212
{...props}>
204213
{children}

0 commit comments

Comments
 (0)