Skip to content

Commit

Permalink
merge with upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
ptmt committed Apr 15, 2016
2 parents f01b6e5 + d09cd62 commit 0bc7d51
Show file tree
Hide file tree
Showing 678 changed files with 60,646 additions and 10,726 deletions.
10 changes: 10 additions & 0 deletions .buckconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

[android]
target = Google Inc.:Google APIs:23

[maven_repositories]
central = https://repo1.maven.org/maven2

[alias]
movies = //Examples/Movies/android/app:app
uiexplorer = //Examples/UIExplorer/android/app:app
5 changes: 0 additions & 5 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,6 @@
"wrap-iife": 0, // require immediate function invocation to be wrapped in parentheses (off by default)
"yoda": 1, // require or disallow Yoda conditions

// Strict Mode
// These rules relate to using strict mode.

"strict": [2, "global"], // require or disallow the "use strict" pragma in the global scope (off by default in the node environment)

// Variables
// These rules have to do with variable declarations.

Expand Down
17 changes: 12 additions & 5 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@
# Ignore Website
.*/website/.*

# Ignore generators
.*/local-cli/generator.*

# Ignore BUCK generated folders
.*\.buckd/

.*/node_modules/is-my-json-valid/test/.*\.json
.*/node_modules/iconv-lite/encodings/tables/.*\.json
.*/node_modules/y18n/test/.*\.json
Expand All @@ -62,8 +68,9 @@
.*/node_modules/binary-extensions/binary-extensions.json
.*/node_modules/url-regex/tlds.json
.*/node_modules/joi/.*\.json
.*/build/.*\.json
.*/\.buckd/.*
.*/node_modules/isemail/.*\.json
.*/node_modules/tr46/.*\.json


[include]

Expand All @@ -86,9 +93,9 @@ suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FixMe

suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-2]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(2[0-2]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-3]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(2[0-3]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy

[version]
0.22.1
0.23.0
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,17 @@ project.xcworkspace
# Gradle
/build/
/Examples/**/android/app/build/
/Examples/**/android/app/gradle/
/Examples/**/android/app/gradlew
/Examples/**/android/app/gradlew.bat
/ReactAndroid/build/

# Android
.idea
.gradle
local.properties
*.iml
/android/

# Node
node_modules
Expand Down
29 changes: 8 additions & 21 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
language: objective-c

osx_image: xcode7.3
osx_image: xcode7.2

install:
- brew reinstall nvm
- mkdir -p .nvm
- export NVM_DIR="$PWD/.nvm"
- mkdir -p /Users/travis/build/facebook/.nvm
- export NVM_DIR="/Users/travis/build/facebook/.nvm"
- source $(brew --prefix nvm)/nvm.sh
- nvm install 4.4.0
- rm -Rf "${TMPDIR}/jest_preprocess_cache"
Expand All @@ -16,29 +16,16 @@ install:
- npm --version

script:
- |
if [ "$TEST_TYPE" = objc ]
then
travis_retry ./scripts/objc-test.sh
elif [ "$TEST_TYPE" = js ]
then
npm run flow && npm test -- --maxWorkers=1
./scripts/e2e-test.sh --packager
elif [ "$TEST_TYPE" = e2e-objc ]
then
./scripts/e2e-test.sh --osx
else
echo "Unknown test type: $TEST_TYPE"
exit 1
fi
- if [[ "$TEST_TYPE" = objc ]]; then travis_retry ./scripts/objc-test.sh; fi
- if [[ "$TEST_TYPE" = e2e-objc ]]; then travis_retry node ./scripts/run-ci-e2e-tests.js --ios --js; fi
- if [[ "$TEST_TYPE" = js ]]; then npm run flow check; fi
- if [[ "$TEST_TYPE" = js ]]; then npm test -- --maxWorkers=1; fi

env:
matrix:
#- TEST_TYPE=e2e-objc
- TEST_TYPE=objc
- TEST_TYPE=js
global:
#- TEST_TYPE=e2e-objc


branches:
only:
Expand Down
16 changes: 11 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,17 @@ The core team will be monitoring for pull requests. When we get one, we'll run s
1. Fork the repo and create your branch from `master`.
2. **Describe your test plan in your commit.** If you've added code that should be tested, add tests!
3. If you've changed APIs, update the documentation.
4. Add the copyright notice to the top of any new files you've added.
5. Ensure tests pass on Travis and Circle CI.
6. Make sure your code lints (`node linter.js <files touched>`).
7. Squash your commits (`git rebase -i`).
8. If you haven't already, sign the [CLA](https://code.facebook.com/cla).
4. If you've updated the docs, verify the website locally and submit screenshots if applicable
```
$ cd website
$ npm install && npm start
go to: http://localhost:8079/react-native/index.html
```
5. Add the copyright notice to the top of any new files you've added.
6. Ensure tests pass on Travis and Circle CI.
7. Make sure your code lints (`node linter.js <files touched>`).
8. Squash your commits (`git rebase -i`).
9. If you haven't already, sign the [CLA](https://code.facebook.com/cla).

#### Copyright Notice for files

Expand Down
5 changes: 3 additions & 2 deletions Examples/SimpleChatClient/components/ChatLayout.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/* @flow */
'use strict';

var React = require('react-native-desktop');
var React = require('React');
var ReactNative = require('react-native-desktop');
var {
View,
StyleSheet,
Expand All @@ -12,7 +13,7 @@ var {
TouchableHighlight,
TextInput,
LayoutAnimation
} = React;
} = ReactNative;

import LoadingIndicator from './LoadingIndicator';
import MessagesListView from './MessagesListView';
Expand Down
5 changes: 3 additions & 2 deletions Examples/SimpleChatClient/components/SigninForm.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/* @flow */
'use strict';

var React = require('react-native-desktop');
var React = require('React');
var ReactNative = require('react-native-desktop');;
var {
View,
Text,
Expand All @@ -13,7 +14,7 @@ var {
LinkingIOS,
Image,
Dimensions
} = React;
} = ReactNative;

const AnimatedButton = Animated.createAnimatedComponent(TouchableHighlight);

Expand Down
5 changes: 3 additions & 2 deletions Examples/SimpleChatClient/components/SuperSimpleMarkdown.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
/* @noflow */
import React from 'react-native-desktop';
import React from 'react';
import ReactNative from 'react-native-desktop';
/* $FlowFixMe(>=17.0.0) - config */
import SimpleMarkdown from 'simple-markdown';

const {
View,
Text,
Image
} = React;
} = ReactNative;

export default class Markdown extends React.Component {

Expand Down
5 changes: 3 additions & 2 deletions Examples/SimpleChatClient/index.osx.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/* @flow */
'use strict';

import React from 'react-native-desktop';
import React from 'react';
import ReactNative from 'react-native-desktop';
import { createStore, applyMiddleware } from 'redux';
import { Provider } from 'react-redux';
import logger from 'redux-logger';
Expand Down Expand Up @@ -39,4 +40,4 @@ class SimpleChatClient extends React.Component {
}


React.AppRegistry.registerComponent('SimpleChatClient', () => SimpleChatClient);
ReactNative.AppRegistry.registerComponent('SimpleChatClient', () => SimpleChatClient);
5 changes: 3 additions & 2 deletions Examples/SimpleGmailClient/components/Label.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/* @flow */
'use strict';

var React = require('react-native-desktop');
var React = require('React');
var ReactNative = require('react-native-desktop');;
var {
Text,
StyleSheet,
TouchableHighlight,
} = React;
} = ReactNative;

class Label extends React.Component {
constructor() {
Expand Down
5 changes: 3 additions & 2 deletions Examples/SimpleGmailClient/components/MailLayout.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
/* @flow */
'use strict';

var React = require('react-native-desktop');
var React = require('React');
var ReactNative = require('react-native-desktop');;
var {
View,
StyleSheet,
ScrollView,
Dimensions,
Text,
ActivityIndicatorIOS
} = React;
} = ReactNative;

var SearchBox = require('./SearchBox');
var Message = require('./Message');
Expand Down
5 changes: 3 additions & 2 deletions Examples/SimpleGmailClient/components/Message.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/* @flow */
'use strict';

var React = require('react-native-desktop');
var React = require('React');
var ReactNative = require('react-native-desktop');;
var {
View,
Text,
StyleSheet,
} = React;
} = ReactNative;

class Message extends React.Component {
constructor() {
Expand Down
5 changes: 3 additions & 2 deletions Examples/SimpleGmailClient/components/SearchBox.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/* @flow */
'use strict';

var React = require('react-native-desktop');
var React = require('React');
var ReactNative = require('react-native-desktop');;
var {
View,
StyleSheet,
TextInput,
} = React;
} = ReactNative;


class SearchBox extends React.Component {
Expand Down
5 changes: 3 additions & 2 deletions Examples/SimpleGmailClient/components/SigninForm.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/* @flow */
'use strict';

var React = require('react-native-desktop');
var React = require('React');
var ReactNative = require('react-native-desktop');;
var {
View,
Text,
Expand All @@ -10,7 +11,7 @@ var {
TextInput,
TouchableOpacity,
LinkingIOS
} = React;
} = ReactNative;

// Yes this is my api credentials restricted only for Gmail API.
var CLIENT_ID = '588257598045-mlcll7rfg8vud8glu411f8v92u560pbt.apps.googleusercontent.com';
Expand Down
6 changes: 3 additions & 3 deletions Examples/SimpleGmailClient/index.osx.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/* @flow */
'use strict';

// TODO: why import is not working?
var React = require('react-native-desktop');
var React = require('React');
var ReactNative = require('react-native-desktop');;

var {
View,
AppRegistry,
} = React;
} = ReactNative;

var SigninForm = require('./components/SigninForm');
var MailLayout = require('./components/MailLayout');
Expand Down
5 changes: 3 additions & 2 deletions Examples/UIExplorer/AccessibilityAndroidExample.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@
*/
'use strict';

var React = require('react-native');
var React = require('React');
var ReactNative = require('react-native-desktop');
var {
StyleSheet,
Text,
View,
ToastAndroid,
TouchableWithoutFeedback,
} = React;
} = ReactNative;

var UIExplorerBlock = require('./UIExplorerBlock');
var UIExplorerPage = require('./UIExplorerPage');
Expand Down
5 changes: 3 additions & 2 deletions Examples/UIExplorer/AccessibilityIOSExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@
*/
'use strict';

var React = require('react-native-desktop');
var React = require('React');
var ReactNative = require('react-native-desktop');
var {
Text,
View,
} = React;
} = ReactNative;

var AccessibilityIOSExample = React.createClass({
render() {
Expand Down
Loading

0 comments on commit 0bc7d51

Please sign in to comment.