Skip to content

Commit

Permalink
Merge branch 'master' into text-input-responder
Browse files Browse the repository at this point in the history
  • Loading branch information
cmcewen authored Nov 20, 2017
2 parents 7cbfde4 + f101566 commit d5987d7
Show file tree
Hide file tree
Showing 227 changed files with 23,019 additions and 11,364 deletions.
25 changes: 16 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ aliases:

- &restore-cache-buck
keys:
- v1-buck-{{ arch }}-v2017.09.04.02
- v1-buck-{{ arch }}-v2017.11.16.01
- &save-cache-buck
paths:
- ~/buck
key: v1-buck-{{ arch }}-v2017.09.04.02
key: v1-buck-{{ arch }}-v2017.11.16.01

- &restore-cache-watchman
keys:
Expand Down Expand Up @@ -239,17 +239,22 @@ jobs:
command: |
cd website
npm install --no-package-lock --no-spin --no-progress
# The CIRCLE_PROJECT_USERNAME and CIRCLE_PR_USERNAME checks below
# ensure deploys only happen on projects owned by "facebook",
# never on a forked PR build.
- run:
name: Build and Deploy Static Website
command: |
if [[ $CIRCLE_PROJECT_USERNAME == "facebook" && -z $CI_PULL_REQUEST && -z $CIRCLE_PR_USERNAME ]]; then
if [[ $CIRCLE_PROJECT_USERNAME == "facebook" && -z $CIRCLE_PR_USERNAME ]]; then
git config --global user.email "reactjs-bot@users.noreply.github.com"
git config --global user.name "Website Deployment Script"
echo "machine github.com login reactjs-bot password $GITHUB_TOKEN" > ~/.netrc
echo "Deploying website..."
cd website && GIT_USER=reactjs-bot npm run gh-pages
elif [[ -n $CIRCLE_PR_USERNAME ]]; then
echo "Skipping website deploy, this is a forked PR build."
else
echo "Skipping deploy."
echo "Skipping website deploy."
fi
# Build JavaScript bundle for Android tests
Expand Down Expand Up @@ -329,7 +334,7 @@ jobs:
name: Install Buck
command: |
if [[ ! -e ~/buck ]]; then
git clone https://github.com/facebook/buck.git ~/buck --branch v2017.09.04.02 --depth=1
git clone https://github.com/facebook/buck.git ~/buck --branch v2017.11.16.01 --depth=1
fi
cd ~/buck && ant
buck --version
Expand Down Expand Up @@ -438,10 +443,12 @@ jobs:
- checkout
- restore-cache: *restore-cache-analysis
- run: *install-node-dependencies
# The CIRCLE_PR_NUMBER checks below ensure
# code analysis only runs on forked PR builds.
- run:
name: Install Dependencies
command: |
if [ -n "$CIRCLE_PULL_REQUEST" ]; then
if [ -n "$CIRCLE_PR_NUMBER" ]; then
npm install github@0.2.4
cd danger
npm install --no-package-lock --no-spin --no-progress
Expand All @@ -453,17 +460,17 @@ jobs:
- run:
name: Analyze Pull Request
command: |
if [ -n "$CIRCLE_PULL_REQUEST" ]; then
if [ -n "$CIRCLE_PR_NUMBER" ]; then
cd danger && DANGER_GITHUB_API_TOKEN="e622517d9f1136ea8900""07c6373666312cdfaa69" npm run danger
else
echo "Skipping pull request analysis."
fi
when: always
# Run eslint
# Run eslint
- run:
name: Analyze Code
command: |
if [ -n "$CIRCLE_PULL_REQUEST" ]; then
if [ -n "$CIRCLE_PR_NUMBER" && -n "$CIRCLE_PROJECT_USERNAME" && -n "$CIRCLE_PROJECT_REPONAME" ]; then
cat <(echo eslint; npm run lint --silent -- --format=json; echo flow; npm run flow --silent -- check --json) | GITHUB_TOKEN="af6ef0d15709bc91d""06a6217a5a826a226fb57b7" CI_USER=$CIRCLE_PROJECT_USERNAME CI_REPO=$CIRCLE_PROJECT_REPONAME PULL_REQUEST_NUMBER=$CIRCLE_PR_NUMBER node bots/code-analysis-bot.js
else
echo "Skipping code analysis."
Expand Down
6 changes: 3 additions & 3 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState
suppress_type=$FixMe

suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-8]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*[react_native_oss|react_native_fb][a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-8]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*[react_native_oss|react_native_fb][a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-9]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*[react_native_oss|react_native_fb][a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-9]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*[react_native_oss|react_native_fb][a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError

unsafe.enable_getters_and_setters=true

[version]
^0.58.0
^0.59.0
9 changes: 4 additions & 5 deletions Libraries/Alert/Alert.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const NativeModules = require('NativeModules');
const Platform = require('Platform');

import type { AlertType, AlertButtonStyle } from 'AlertIOS';
import type { Fbt } from 'fbt';

export type Buttons = Array<{
text?: string,
Expand Down Expand Up @@ -80,8 +79,8 @@ type Options = {
class Alert {

static alert(
title: ?string | ?Fbt,
message?: ?string | ?Fbt,
title: ?string,
message?: ?string,
buttons?: Buttons,
options?: Options,
type?: AlertType,
Expand All @@ -105,8 +104,8 @@ class Alert {
class AlertAndroid {

static alert(
title: ?string | ?Fbt,
message?: ?string | ?Fbt,
title: ?string,
message?: ?string,
buttons?: Buttons,
options?: Options,
): void {
Expand Down
12 changes: 5 additions & 7 deletions Libraries/Alert/AlertIOS.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
*/
'use strict';

const RCTAlertManager = require('NativeModules').AlertManager;

import type { Fbt } from 'fbt';
var RCTAlertManager = require('NativeModules').AlertManager;

/**
* An Alert button type
Expand Down Expand Up @@ -135,8 +133,8 @@ class AlertIOS {
* );
*/
static alert(
title: ?string | ?Fbt,
message?: ?string | ?Fbt,
title: ?string,
message?: ?string,
callbackOrButtons?: ?(() => void) | ButtonsArray,
type?: AlertType,
): void {
Expand Down Expand Up @@ -194,8 +192,8 @@ class AlertIOS {
* );
*/
static prompt(
title: ?string | ?Fbt,
message?: ?string | ?Fbt,
title: ?string,
message?: ?string,
callbackOrButtons?: ?((text: string) => void) | ButtonsArray,
type?: ?AlertType = 'plain-text',
defaultValue?: string,
Expand Down
41 changes: 41 additions & 0 deletions Libraries/Animated/src/Easing.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,21 @@ class Easing {
/**
* A stepping function, returns 1 for any positive value of `n`.
*/
/* $FlowFixMe(>=0.59.0 site=react_native_fb) This comment suppresses an error
* caught by Flow 0.59 which was not caught before. Most likely, this error
* is because an exported function parameter is missing an annotation.
* Without an annotation, these parameters are uncovered by Flow. */
static step0(n) {
return n > 0 ? 1 : 0;
}

/**
* A stepping function, returns 1 if `n` is greater than or equal to 1.
*/
/* $FlowFixMe(>=0.59.0 site=react_native_fb) This comment suppresses an error
* caught by Flow 0.59 which was not caught before. Most likely, this error
* is because an exported function parameter is missing an annotation.
* Without an annotation, these parameters are uncovered by Flow. */
static step1(n) {
return n >= 1 ? 1 : 0;
}
Expand All @@ -79,6 +87,10 @@ class Easing {
*
* http://cubic-bezier.com/#0,0,1,1
*/
/* $FlowFixMe(>=0.59.0 site=react_native_fb) This comment suppresses an error
* caught by Flow 0.59 which was not caught before. Most likely, this error
* is because an exported function parameter is missing an annotation.
* Without an annotation, these parameters are uncovered by Flow. */
static linear(t) {
return t;
}
Expand All @@ -102,6 +114,10 @@ class Easing {
*
* http://easings.net/#easeInQuad
*/
/* $FlowFixMe(>=0.59.0 site=react_native_fb) This comment suppresses an error
* caught by Flow 0.59 which was not caught before. Most likely, this error
* is because an exported function parameter is missing an annotation.
* Without an annotation, these parameters are uncovered by Flow. */
static quad(t) {
return t * t;
}
Expand All @@ -112,6 +128,10 @@ class Easing {
*
* http://easings.net/#easeInCubic
*/
/* $FlowFixMe(>=0.59.0 site=react_native_fb) This comment suppresses an error
* caught by Flow 0.59 which was not caught before. Most likely, this error
* is because an exported function parameter is missing an annotation.
* Without an annotation, these parameters are uncovered by Flow. */
static cubic(t) {
return t * t * t;
}
Expand All @@ -122,7 +142,16 @@ class Easing {
* n = 4: http://easings.net/#easeInQuart
* n = 5: http://easings.net/#easeInQuint
*/
/* $FlowFixMe(>=0.59.0 site=react_native_fb) This comment suppresses an error
* caught by Flow 0.59 which was not caught before. Most likely, this error
* is because an exported function parameter is missing an annotation.
* Without an annotation, these parameters are uncovered by Flow. */
static poly(n) {
/* $FlowFixMe(>=0.59.0 site=react_native_fb) This comment suppresses an
* error caught by Flow 0.59 which was not caught before. Most likely, this
* error is because an exported function parameter is missing an
* annotation. Without an annotation, these parameters are uncovered by
* Flow. */
return (t) => Math.pow(t, n);
}

Expand All @@ -131,6 +160,10 @@ class Easing {
*
* http://easings.net/#easeInSine
*/
/* $FlowFixMe(>=0.59.0 site=react_native_fb) This comment suppresses an error
* caught by Flow 0.59 which was not caught before. Most likely, this error
* is because an exported function parameter is missing an annotation.
* Without an annotation, these parameters are uncovered by Flow. */
static sin(t) {
return 1 - Math.cos(t * Math.PI / 2);
}
Expand All @@ -140,6 +173,10 @@ class Easing {
*
* http://easings.net/#easeInCirc
*/
/* $FlowFixMe(>=0.59.0 site=react_native_fb) This comment suppresses an error
* caught by Flow 0.59 which was not caught before. Most likely, this error
* is because an exported function parameter is missing an annotation.
* Without an annotation, these parameters are uncovered by Flow. */
static circle(t) {
return 1 - Math.sqrt(1 - t * t);
}
Expand All @@ -149,6 +186,10 @@ class Easing {
*
* http://easings.net/#easeInExpo
*/
/* $FlowFixMe(>=0.59.0 site=react_native_fb) This comment suppresses an error
* caught by Flow 0.59 which was not caught before. Most likely, this error
* is because an exported function parameter is missing an annotation.
* Without an annotation, these parameters are uncovered by Flow. */
static exp(t) {
return Math.pow(2, 10 * (t - 1));
}
Expand Down
8 changes: 6 additions & 2 deletions Libraries/CameraRoll/CameraRoll.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ class CameraRoll {
* - `speed`: {number}
* - `page_info` : {object} : An object with the following shape:
* - `has_next_page`: {boolean}
* - `start_cursor`: {boolean}
* - `end_cursor`: {boolean}
* - `start_cursor`: {string}
* - `end_cursor`: {string}
*
* Loading images:
* ```
Expand Down Expand Up @@ -255,6 +255,10 @@ class CameraRoll {
* }
* ```
*/
/* $FlowFixMe(>=0.59.0 site=react_native_fb) This comment suppresses an error
* caught by Flow 0.59 which was not caught before. Most likely, this error
* is because an exported function parameter is missing an annotation.
* Without an annotation, these parameters are uncovered by Flow. */
static getPhotos(params) {
if (__DEV__) {
checkPropTypes(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ type ChangeEventName = $Enum<{

var _subscriptions = new Map();

/**
* Sometimes it's useful to know whether or not the device has a screen reader
* that is currently active. The `AccessibilityInfo` API is designed for this
* purpose. You can use it to query the current state of the screen reader as
* well as to register to be notified when the state of the screen reader
* changes.
*
* See http://facebook.github.io/react-native/docs/accessibilityinfo.html
*/

var AccessibilityInfo = {

fetch: function(): Promise {
Expand Down
Loading

0 comments on commit d5987d7

Please sign in to comment.