Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
469638e651 | ||
|
|
106ad8592c | ||
|
|
7c90b06b75 | ||
|
|
1a23902c60 | ||
|
|
8c99cc43de | ||
|
|
ae47e356f6 |
@@ -2,11 +2,9 @@
|
||||
[android]
|
||||
target = Google Inc.:Google APIs:23
|
||||
|
||||
[download]
|
||||
max_number_of_retries = 3
|
||||
|
||||
[maven_repositories]
|
||||
central = https://repo1.maven.org/maven2
|
||||
|
||||
[alias]
|
||||
rntester = //RNTester/android/app:app
|
||||
movies = //Examples/Movies/android/app:app
|
||||
uiexplorer = //Examples/UIExplorer/android/app:app
|
||||
|
||||
@@ -1,557 +0,0 @@
|
||||
aliases:
|
||||
- &restore-node-cache
|
||||
keys:
|
||||
- v1-dependencies-{{ arch }}-{{ .Branch }}-{{ checksum "package.json" }}
|
||||
# Fallback in case checksum fails
|
||||
- v1-dependencies-{{ arch }}-{{ .Branch }}-
|
||||
|
||||
- &save-node-cache
|
||||
paths:
|
||||
- node_modules
|
||||
key: v1-dependencies-{{ arch }}-{{ .Branch }}-{{ checksum "package.json" }}
|
||||
|
||||
- &restore-cache-website
|
||||
keys:
|
||||
- v1-website-dependencies-{{ arch }}-{{ .Branch }}-{{ checksum "website/package.json" }}
|
||||
# Fallback in case checksum fails
|
||||
- v1-website-dependencies-{{ arch }}-{{ .Branch }}-
|
||||
|
||||
- &save-cache-website
|
||||
paths:
|
||||
- website/node_modules
|
||||
key: v1-website-dependencies-{{ arch }}-{{ .Branch }}-{{ checksum "website/package.json" }}
|
||||
|
||||
- &restore-cache-analysis
|
||||
keys:
|
||||
- v1-analysis-dependencies-{{ arch }}-{{ .Branch }}-{{ checksum "package.json" }}{{ checksum "danger/package.json" }}
|
||||
# Fallback in case checksum fails
|
||||
- v1-analysis-dependencies-{{ arch }}-{{ .Branch }}-
|
||||
- &save-cache-analysis
|
||||
paths:
|
||||
- danger/node_modules
|
||||
- node_modules
|
||||
key: v1-analysis-dependencies-{{ arch }}-{{ .Branch }}-{{ checksum "package.json" }}{{ checksum "danger/package.json" }}
|
||||
|
||||
- &restore-cache-android-packages
|
||||
keys:
|
||||
- v1-android-sdkmanager-packages-{{ arch }}-{{ checksum "scripts/circle-ci-android-setup.sh" }}
|
||||
# Fallback in case checksum fails
|
||||
- v1-android-sdkmanager-packages-{{ arch }}-
|
||||
- &save-cache-android-packages
|
||||
paths:
|
||||
- /opt/android/sdk/system-images/android-23
|
||||
- /opt/android/sdk/system-images/android-19
|
||||
- /opt/android/sdk/platforms/android-26
|
||||
- /opt/android/sdk/platforms/android-23
|
||||
- /opt/android/sdk/platforms/android-19
|
||||
- /opt/android/sdk/build-tools/23.0.1
|
||||
- /opt/android/sdk/add-ons/addon-google_apis-google-23
|
||||
key: v1-android-sdkmanager-packages-{{ arch }}-{{ checksum "scripts/circle-ci-android-setup.sh" }}
|
||||
|
||||
- &restore-cache-ndk
|
||||
keys:
|
||||
- v1-android-ndk-{{ arch }}-r10e-32-64
|
||||
|
||||
- &install-ndk
|
||||
|
|
||||
source scripts/circle-ci-android-setup.sh && getAndroidNDK
|
||||
|
||||
- &save-cache-ndk
|
||||
paths:
|
||||
- /opt/ndk
|
||||
key: v1-android-ndk-{{ arch }}-r10e-32-64
|
||||
|
||||
- &restore-cache-buck-downloads
|
||||
keys:
|
||||
- v1-buck-downloads-{{ arch }}-{{ .Branch }}-{{ checksum "ReactAndroid/build.gradle" }}
|
||||
# Fallback in case checksum fails
|
||||
- v1-buck-downloads-{{ arch }}-{{ .Branch }}-
|
||||
- &save-cache-buck-downloads
|
||||
paths:
|
||||
- "ReactAndroid/build/downloads"
|
||||
key: v1-buck-downloads-{{ arch }}-{{ .Branch }}-{{ checksum "ReactAndroid/build.gradle" }}
|
||||
|
||||
- &restore-cache-buck
|
||||
keys:
|
||||
- v1-buck-{{ arch }}-v2017.09.04.02
|
||||
- &save-cache-buck
|
||||
paths:
|
||||
- ~/buck
|
||||
key: v1-buck-{{ arch }}-v2017.09.04.02
|
||||
|
||||
- &restore-cache-watchman
|
||||
keys:
|
||||
- v1-watchman-{{ arch }}-v4.9.0
|
||||
- &save-cache-watchman
|
||||
paths:
|
||||
- ~/watchman
|
||||
key: v1-watchman-{{ arch }}-v4.9.0
|
||||
|
||||
- &install-node-dependencies
|
||||
|
|
||||
npm install --no-package-lock --no-spin --no-progress
|
||||
|
||||
- &install-buck
|
||||
|
|
||||
if [[ ! -e ~/buck ]]; then
|
||||
git clone https://github.com/facebook/buck.git ~/buck --branch v2017.09.04.02 --depth=1
|
||||
fi
|
||||
cd ~/buck && ant
|
||||
buck --version
|
||||
|
||||
- &install-node
|
||||
|
|
||||
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
|
||||
sudo apt-get install -y nodejs
|
||||
|
||||
- &run-node-tests
|
||||
|
|
||||
npm test -- --maxWorkers=2
|
||||
npm run lint
|
||||
npm run flow -- check
|
||||
|
||||
- &filter-only-master-stable
|
||||
branches:
|
||||
only:
|
||||
- /.*-stable/
|
||||
- master
|
||||
|
||||
- &filter-only-stable
|
||||
branches:
|
||||
only:
|
||||
- /.*-stable/
|
||||
|
||||
- &filter-ignore-gh-pages
|
||||
branches:
|
||||
ignore: gh-pages
|
||||
|
||||
- &filter-ignore-master-stable
|
||||
branches:
|
||||
ignore:
|
||||
- master
|
||||
- /.*-stable/
|
||||
- gh-pages
|
||||
|
||||
- &create-ndk-directory
|
||||
|
|
||||
if [[ ! -e /opt/ndk ]]; then
|
||||
sudo mkdir /opt/ndk
|
||||
fi
|
||||
sudo chown ${USER:=$(/usr/bin/id -run)}:$USER /opt/ndk
|
||||
|
||||
# CircleCI does not support interpolating env variables in the environment
|
||||
# https://circleci.com/docs/2.0/env-vars/#interpolating-environment-variables-to-set-other-environment-variables
|
||||
- &configure-android-path
|
||||
|
|
||||
echo 'export PATH=${ANDROID_NDK}:~/react-native/gradle-2.9/bin:~/buck/bin:$PATH' >> $BASH_ENV
|
||||
source $BASH_ENV
|
||||
|
||||
- &install-android-packages
|
||||
|
|
||||
source scripts/circle-ci-android-setup.sh && getAndroidSDK
|
||||
|
||||
- &install-build-dependencies
|
||||
|
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install ant autoconf automake g++ gcc libqt5widgets5 lib32z1 lib32stdc++6 make maven python-dev python3-dev qml-module-qtquick-controls qtdeclarative5-dev file -y
|
||||
|
||||
- &install-android-app-dependencies
|
||||
|
|
||||
buck fetch ReactAndroid/src/test/java/com/facebook/react/modules
|
||||
buck fetch ReactAndroid/src/main/java/com/facebook/react
|
||||
buck fetch ReactAndroid/src/main/java/com/facebook/react/shell
|
||||
buck fetch ReactAndroid/src/test/...
|
||||
buck fetch ReactAndroid/src/androidTest/...
|
||||
./gradlew :ReactAndroid:downloadBoost :ReactAndroid:downloadDoubleConversion :ReactAndroid:downloadFolly :ReactAndroid:downloadGlog :ReactAndroid:downloadJSCHeaders
|
||||
|
||||
defaults: &defaults
|
||||
working_directory: ~/react-native
|
||||
|
||||
android_defaults: &android_defaults
|
||||
<<: *defaults
|
||||
docker:
|
||||
- image: circleci/android:api-26-alpha
|
||||
resource_class: "large"
|
||||
environment:
|
||||
- TERM: "dumb"
|
||||
- ADB_INSTALL_TIMEOUT: 10
|
||||
- _JAVA_OPTIONS: "-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap"
|
||||
- GRADLE_OPTS: '-Dorg.gradle.daemon=false -Dorg.gradle.jvmargs="-XX:+HeapDumpOnOutOfMemoryError"'
|
||||
- ANDROID_NDK: '/opt/ndk/android-ndk-r10e'
|
||||
- BUILD_THREADS: 2
|
||||
|
||||
version: 2
|
||||
jobs:
|
||||
# Runs JavaScript tests on Node 8
|
||||
test-js-node-8:
|
||||
<<: *defaults
|
||||
docker:
|
||||
- image: circleci/node:8
|
||||
steps:
|
||||
- checkout
|
||||
- restore-cache: *restore-node-cache
|
||||
- run: *install-node-dependencies
|
||||
- save-cache: *save-node-cache
|
||||
- run: *run-node-tests
|
||||
|
||||
# Runs JavaScript tests on Node 6
|
||||
test-js-node-6:
|
||||
<<: *defaults
|
||||
docker:
|
||||
- image: circleci/node:6.11.0
|
||||
steps:
|
||||
- checkout
|
||||
- restore-cache: *restore-node-cache
|
||||
- run: *install-node-dependencies
|
||||
- save-cache: *save-node-cache
|
||||
- run: *run-node-tests
|
||||
|
||||
# Runs JavaScript tests on Node 4
|
||||
test-js-node-4:
|
||||
<<: *defaults
|
||||
docker:
|
||||
- image: circleci/node:4.8.4
|
||||
steps:
|
||||
- checkout
|
||||
- restore-cache: *restore-node-cache
|
||||
- run: *install-node-dependencies
|
||||
- save-cache: *save-node-cache
|
||||
- run: *run-node-tests
|
||||
|
||||
# Runs unit tests on iOS devices
|
||||
test-objc-ios:
|
||||
<<: *defaults
|
||||
macos:
|
||||
xcode: "9.0"
|
||||
dependencies:
|
||||
pre:
|
||||
- xcrun instruments -w "iPhone 5s (10.3.1)" || true
|
||||
steps:
|
||||
- checkout
|
||||
- restore-cache: *restore-node-cache
|
||||
- run: *install-node-dependencies
|
||||
- save-cache: *save-node-cache
|
||||
- run: ./scripts/objc-test-ios.sh
|
||||
|
||||
# Runs unit tests on tvOS devices
|
||||
test-objc-tvos:
|
||||
<<: *defaults
|
||||
macos:
|
||||
xcode: "9.0"
|
||||
dependencies:
|
||||
pre:
|
||||
- xcrun instruments -w "Apple TV 1080p (10.0)" || true
|
||||
steps:
|
||||
- checkout
|
||||
- restore-cache: *restore-node-cache
|
||||
- run: *install-node-dependencies
|
||||
- save-cache: *save-node-cache
|
||||
- run: ./scripts/objc-test-tvos.sh
|
||||
|
||||
# Runs end to end tests
|
||||
test-objc-e2e:
|
||||
<<: *defaults
|
||||
macos:
|
||||
xcode: "9.0"
|
||||
dependencies:
|
||||
pre:
|
||||
- xcrun instruments -w "iPhone 5s (10.3.1)" || true
|
||||
steps:
|
||||
- checkout
|
||||
- restore-cache: *restore-node-cache
|
||||
- run: *install-node-dependencies
|
||||
- save-cache: *save-node-cache
|
||||
- run: node ./scripts/run-ci-e2e-tests.js --ios --js --retries 3;
|
||||
|
||||
# Checks podspec
|
||||
test-podspec:
|
||||
<<: *defaults
|
||||
macos:
|
||||
xcode: "9.0"
|
||||
steps:
|
||||
- checkout
|
||||
- restore-cache: *restore-node-cache
|
||||
- run: *install-node-dependencies
|
||||
- save-cache: *save-node-cache
|
||||
- run: ./scripts/process-podspecs.sh
|
||||
|
||||
# Tests website
|
||||
test-website:
|
||||
<<: *defaults
|
||||
docker:
|
||||
- image: circleci/node:8
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: Install Dependencies
|
||||
command: |
|
||||
cd website
|
||||
npm install --no-package-lock --no-spin --no-progress
|
||||
- run:
|
||||
name: Test Website
|
||||
command: |
|
||||
cd website
|
||||
npm test
|
||||
- run:
|
||||
name: Test Build Static Website
|
||||
command: cd website && node ./server/generate.js
|
||||
|
||||
# Deploys website
|
||||
deploy-website:
|
||||
<<: *defaults
|
||||
docker:
|
||||
- image: circleci/node:8
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: Install Dependencies
|
||||
command: |
|
||||
cd website
|
||||
npm install --no-package-lock --no-spin --no-progress
|
||||
- run:
|
||||
name: Build and Deploy Static Website
|
||||
command: |
|
||||
if [[ $CIRCLE_PROJECT_USERNAME == "facebook" && -z $CI_PULL_REQUEST && -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
|
||||
else
|
||||
echo "Skipping deploy."
|
||||
fi
|
||||
|
||||
# Publishes new version onto npm
|
||||
deploy:
|
||||
<<: *android_defaults
|
||||
steps:
|
||||
- checkout
|
||||
|
||||
# Configure Android dependencies
|
||||
- run: *configure-android-path
|
||||
- run: *install-build-dependencies
|
||||
- restore-cache: *restore-cache-android-packages
|
||||
- run: *install-android-packages
|
||||
- save-cache: *save-cache-android-packages
|
||||
- run: *create-ndk-directory
|
||||
- restore-cache: *restore-cache-ndk
|
||||
- run: *install-ndk
|
||||
- save-cache: *save-cache-ndk
|
||||
- restore-cache: *restore-cache-buck
|
||||
- run: *install-buck
|
||||
- save-cache: *save-cache-buck
|
||||
- run: *install-node
|
||||
- restore-cache: *restore-node-cache
|
||||
- run: *install-node-dependencies
|
||||
- save-cache: *save-node-cache
|
||||
- restore-cache: *restore-cache-buck-downloads
|
||||
- run: *install-android-app-dependencies
|
||||
- save-cache: *save-cache-buck-downloads
|
||||
|
||||
- run:
|
||||
name: Publish React Native Package
|
||||
command: |
|
||||
if [ -z "$CIRCLE_PULL_REQUEST" ]; then
|
||||
echo "//registry.npmjs.org/:_authToken=${CIRCLE_NPM_TOKEN}" > ~/.npmrc
|
||||
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
|
||||
node ./scripts/publish-npm.js
|
||||
else
|
||||
echo "Skipping deploy."
|
||||
fi
|
||||
|
||||
# Build JavaScript bundle for Android tests
|
||||
build-js-bundle:
|
||||
<<: *defaults
|
||||
docker:
|
||||
- image: circleci/node:8
|
||||
steps:
|
||||
- checkout
|
||||
- restore-cache: *restore-node-cache
|
||||
- run: *install-node-dependencies
|
||||
- save-cache: *save-node-cache
|
||||
- run:
|
||||
name: Build JavaScript Bundle
|
||||
command: node local-cli/cli.js bundle --max-workers 2 --platform android --dev true --entry-file ReactAndroid/src/androidTest/js/TestBundle.js --bundle-output ReactAndroid/src/androidTest/assets/AndroidTestBundle.js
|
||||
- persist_to_workspace:
|
||||
root: ReactAndroid/src/androidTest/assets/
|
||||
paths:
|
||||
- AndroidTestBundle.js
|
||||
- store_artifacts:
|
||||
path: ReactAndroid/src/androidTest/assets/AndroidTestBundle.js
|
||||
|
||||
# Runs unit tests tests on Android
|
||||
test-android:
|
||||
<<: *android_defaults
|
||||
steps:
|
||||
- checkout
|
||||
|
||||
# Configure Android dependencies
|
||||
- run: *configure-android-path
|
||||
- run: *install-build-dependencies
|
||||
- restore-cache: *restore-cache-android-packages
|
||||
- run: *install-android-packages
|
||||
- save-cache: *save-cache-android-packages
|
||||
|
||||
# Starting emulator in advance as it takes some time to boot.
|
||||
- run:
|
||||
name: Create Android Virtual Device
|
||||
command: source scripts/circle-ci-android-setup.sh && createAVD
|
||||
- run:
|
||||
name: Launch Android Virtual Device in Background
|
||||
command: source scripts/circle-ci-android-setup.sh && launchAVD
|
||||
background: true
|
||||
|
||||
# Keep configuring Android dependencies while AVD boots up
|
||||
- run: *create-ndk-directory
|
||||
- restore-cache: *restore-cache-ndk
|
||||
- run: *install-ndk
|
||||
- save-cache: *save-cache-ndk
|
||||
- restore-cache: *restore-cache-buck
|
||||
- run: *install-buck
|
||||
- save-cache: *save-cache-buck
|
||||
- run: *install-node
|
||||
- restore-cache: *restore-node-cache
|
||||
- run: *install-node-dependencies
|
||||
- save-cache: *save-node-cache
|
||||
- restore-cache: *restore-cache-buck-downloads
|
||||
- run: *install-android-app-dependencies
|
||||
- save-cache: *save-cache-buck-downloads
|
||||
|
||||
- run:
|
||||
name: Build Android App
|
||||
command: |
|
||||
buck build ReactAndroid/src/main/java/com/facebook/react
|
||||
buck build ReactAndroid/src/main/java/com/facebook/react/shell
|
||||
|
||||
# Wait for AVD to finish booting before running tests
|
||||
- run:
|
||||
name: Wait for Android Virtual Device
|
||||
command: source scripts/circle-ci-android-setup.sh && waitForAVD
|
||||
|
||||
# The JavaScript Bundle is built as part of the build-js-bundle workflow,
|
||||
# and is required for instrumentation tests.
|
||||
- attach_workspace:
|
||||
at: ReactAndroid/src/androidTest/assets/
|
||||
- run:
|
||||
name: Check for JavaScript Bundle
|
||||
command: |
|
||||
if [[ ! -e ReactAndroid/src/androidTest/assets/AndroidTestBundle.js ]]; then
|
||||
echo "JavaScript bundle missing, verify build-js-bundle step"; exit 1;
|
||||
else
|
||||
echo "JavaScript bundle found.";
|
||||
fi
|
||||
|
||||
# Tests
|
||||
- run:
|
||||
name: Compile Native Libs for Unit and Integration Tests
|
||||
command: ./gradlew :ReactAndroid:packageReactNdkLibsForBuck -Pjobs=$BUILD_THREADS -Pcom.android.build.threadPoolSize=1
|
||||
no_output_timeout: 6m
|
||||
- run:
|
||||
name: Unit Tests
|
||||
command: buck test ReactAndroid/src/test/... --config build.threads=$BUILD_THREADS
|
||||
|
||||
# Integration Tests
|
||||
- run:
|
||||
name: Build and Install Test APK
|
||||
command: source scripts/circle-ci-android-setup.sh && NO_BUCKD=1 retry3 buck install ReactAndroid/src/androidTest/buck-runner:instrumentation-tests --config build.threads=$BUILD_THREADS
|
||||
|
||||
# post (always runs)
|
||||
- run:
|
||||
name: Collect Test Results
|
||||
command: |
|
||||
mkdir -p ~/junit/
|
||||
find . -type f -regex ".*/build/test-results/debug/.*xml" -exec cp {} ~/junit/ \;
|
||||
find . -type f -regex ".*/outputs/androidTest-results/connected/.*xml" -exec cp {} ~/junit/ \;
|
||||
when: always
|
||||
- store_test_results:
|
||||
path: ~/junit
|
||||
- store_artifacts:
|
||||
path: ~/junit
|
||||
|
||||
analyze-pull-request:
|
||||
<<: *defaults
|
||||
docker:
|
||||
- image: circleci/node:8
|
||||
steps:
|
||||
- checkout
|
||||
- restore-cache: *restore-cache-analysis
|
||||
- run: *install-node-dependencies
|
||||
- run:
|
||||
name: Install Dependencies
|
||||
command: |
|
||||
if [ -n "$CIRCLE_PULL_REQUEST" ]; then
|
||||
npm install github@0.2.4
|
||||
cd danger
|
||||
npm install --no-package-lock --no-spin --no-progress
|
||||
else
|
||||
echo "Skipping dependency installation."
|
||||
fi
|
||||
- save-cache: *save-cache-analysis
|
||||
- run:
|
||||
name: Analyze Pull Request
|
||||
command: |
|
||||
if [ -n "$CIRCLE_PULL_REQUEST" ]; then
|
||||
cd danger && DANGER_GITHUB_API_TOKEN="e622517d9f1136ea8900""07c6373666312cdfaa69" npm run danger
|
||||
else
|
||||
echo "Skipping pull request analysis."
|
||||
fi
|
||||
when: always
|
||||
- run:
|
||||
name: Analyze Code
|
||||
command: |
|
||||
if [ -n "$CIRCLE_PULL_REQUEST" ]; 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."
|
||||
fi
|
||||
|
||||
# Workflows enables us to run multiple jobs in parallel
|
||||
workflows:
|
||||
version: 2
|
||||
|
||||
build:
|
||||
jobs:
|
||||
|
||||
# Test Javascript on Node 8 and 6
|
||||
- test-js-node-8:
|
||||
filters: *filter-ignore-gh-pages
|
||||
- test-js-node-6:
|
||||
filters: *filter-ignore-gh-pages
|
||||
|
||||
# Test Android
|
||||
- build-js-bundle:
|
||||
filters: *filter-ignore-gh-pages
|
||||
- test-android:
|
||||
requires:
|
||||
- build-js-bundle
|
||||
|
||||
# Test iOS & tvOS
|
||||
- test-objc-ios:
|
||||
filters: *filter-ignore-gh-pages
|
||||
- test-objc-tvos:
|
||||
filters: *filter-ignore-gh-pages
|
||||
- test-objc-e2e:
|
||||
filters: *filter-ignore-gh-pages
|
||||
|
||||
# Test website
|
||||
- test-website:
|
||||
filters: *filter-ignore-gh-pages
|
||||
|
||||
# If we are on a stable branch, deploy to `npm`
|
||||
- hold:
|
||||
type: approval
|
||||
- deploy:
|
||||
filters: *filter-only-stable
|
||||
requires:
|
||||
- hold
|
||||
|
||||
# If we are on a master / stable branch, deploy docs
|
||||
- deploy-website:
|
||||
filters: *filter-only-master-stable
|
||||
requires:
|
||||
- test-website
|
||||
|
||||
- analyze-pull-request:
|
||||
filters: *filter-ignore-master-stable
|
||||
@@ -3,13 +3,3 @@
|
||||
**/staticBundle.js
|
||||
**/main.js
|
||||
Libraries/vendor/**/*
|
||||
Libraries/Renderer/*
|
||||
website/node_modules
|
||||
pr-inactivity-bookmarklet.js
|
||||
question-bookmarklet.js
|
||||
flow/
|
||||
website/core/metadata.js
|
||||
website/core/metadata-blog.js
|
||||
website/src/react-native/docs/
|
||||
website/src/react-native/blog/
|
||||
danger/
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
{
|
||||
"root": true,
|
||||
|
||||
"parser": "babel-eslint",
|
||||
|
||||
"ecmaFeatures": {
|
||||
@@ -13,8 +11,6 @@
|
||||
},
|
||||
|
||||
"plugins": [
|
||||
"flowtype",
|
||||
"prettier",
|
||||
"react"
|
||||
],
|
||||
|
||||
@@ -53,28 +49,34 @@
|
||||
"setTimeout": false,
|
||||
"window": false,
|
||||
"XMLHttpRequest": false,
|
||||
"pit": false
|
||||
"pit": false,
|
||||
|
||||
// Flow global types.
|
||||
"ReactComponent": false,
|
||||
"ReactClass": false,
|
||||
"ReactElement": false,
|
||||
"ReactPropsCheckType": false,
|
||||
"ReactPropsChainableTypeChecker": false,
|
||||
"ReactPropTypes": false,
|
||||
"SyntheticEvent": false,
|
||||
"$Either": false,
|
||||
"$All": false,
|
||||
"$ArrayBufferView": false,
|
||||
"$Tuple": false,
|
||||
"$Supertype": false,
|
||||
"$Subtype": false,
|
||||
"$Shape": false,
|
||||
"$Diff": false,
|
||||
"$Keys": false,
|
||||
"$Enum": false,
|
||||
"$Exports": false,
|
||||
"$FlowIssue": false,
|
||||
"$FlowFixMe": false,
|
||||
"$FixMe": false
|
||||
},
|
||||
|
||||
"rules": {
|
||||
// Flow Plugin
|
||||
// The following rules are made available via `eslint-plugin-flowtype`
|
||||
"flowtype/define-flow-type": 1,
|
||||
"flowtype/use-flow-type": 1,
|
||||
|
||||
// General
|
||||
|
||||
// This must be disallowed in this repo because the minimum supported
|
||||
// version of node is 4 which doesn't support trailing commas.
|
||||
// Once the minimum supported version is 8 or greater this can be changed
|
||||
"comma-dangle": [2, { // disallow trailing commas in object literals
|
||||
"arrays": "ignore",
|
||||
"objects": "ignore",
|
||||
"imports": "ignore",
|
||||
"exports": "ignore",
|
||||
"functions": "never"
|
||||
}],
|
||||
|
||||
"comma-dangle": 0, // disallow trailing commas in object literals
|
||||
"no-cond-assign": 1, // disallow assignment in conditional expressions
|
||||
"no-console": 0, // disallow use of console (off by default in the node environment)
|
||||
"no-const-assign": 2, // disallow assignment to const-declared variables
|
||||
@@ -174,10 +176,6 @@
|
||||
"no-restricted-modules": 1, // restrict usage of specified node modules (off by default)
|
||||
"no-sync": 0, // disallow use of synchronous methods (off by default)
|
||||
|
||||
// Prettier Plugin
|
||||
// https://github.com/prettier/eslint-plugin-prettier
|
||||
"prettier/prettier": [2, "fb", "@format"],
|
||||
|
||||
// Stylistic Issues
|
||||
// These rules are purely matters of style and are quite subjective.
|
||||
|
||||
@@ -230,9 +228,8 @@
|
||||
|
||||
"react/display-name": 0,
|
||||
"react/jsx-boolean-value": 0,
|
||||
"react/jsx-no-comment-textnodes": 1,
|
||||
"react/jsx-no-duplicate-props": 2,
|
||||
"react/jsx-no-undef": 2,
|
||||
"react/jsx-no-undef": 1,
|
||||
"react/jsx-sort-props": 0,
|
||||
"react/jsx-uses-react": 1,
|
||||
"react/jsx-uses-vars": 1,
|
||||
@@ -244,6 +241,6 @@
|
||||
"react/prop-types": 0,
|
||||
"react/react-in-jsx-scope": 1,
|
||||
"react/self-closing-comp": 1,
|
||||
"react/wrap-multilines": 0
|
||||
"react/wrap-multilines": 0,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,6 @@
|
||||
; Ignore the website subdir
|
||||
<PROJECT_ROOT>/website/.*
|
||||
|
||||
; Ignore the Dangerfile
|
||||
<PROJECT_ROOT>/danger/dangerfile.js
|
||||
|
||||
; Ignore "BUCK" generated dirs
|
||||
<PROJECT_ROOT>/\.buckd/
|
||||
|
||||
@@ -21,9 +18,12 @@
|
||||
; For RN Apps installed via npm, "Libraries" folder is inside
|
||||
; "node_modules/react-native" but in the source repo it is in the root
|
||||
.*/Libraries/react-native/React.js
|
||||
.*/Libraries/react-native/ReactNative.js
|
||||
|
||||
; Ignore polyfills
|
||||
.*/Libraries/polyfills/.*
|
||||
; Ignore duplicate ReactErrorUtils in react-dom/lib in React 16 alpha 4.
|
||||
; TODO (bvaughn) Remove this once we've synced to React 16 alpha 5.
|
||||
; For more info see https://phabricator.intern.facebook.com/D4747529#10
|
||||
<PROJECT_ROOT>/node_modules/react-dom/lib/ReactErrorUtils.js
|
||||
|
||||
[include]
|
||||
|
||||
@@ -36,22 +36,22 @@ emoji=true
|
||||
|
||||
module.system=haste
|
||||
|
||||
experimental.strict_type_args=true
|
||||
|
||||
munge_underscores=true
|
||||
|
||||
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
|
||||
|
||||
suppress_type=$FlowIssue
|
||||
suppress_type=$FlowFixMe
|
||||
suppress_type=$FlowFixMeProps
|
||||
suppress_type=$FlowFixMeState
|
||||
suppress_type=$FixMe
|
||||
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-7]\\|[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-7]\\|[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\\.\\(4[0-2]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\)
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-2]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\)?:? #[0-9]+
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
|
||||
|
||||
unsafe.enable_getters_and_setters=true
|
||||
|
||||
[version]
|
||||
^0.57.0
|
||||
^0.42.0
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
docs/* @hramos
|
||||
blog/* @hramos
|
||||
Libraries/Animated/* @janicduplessis
|
||||
Libraries/NativeAnimation/* @janicduplessis
|
||||
Libraries/Image/* @shergin
|
||||
Libraries/Text/* @shergin
|
||||
React/Base/* @shergin
|
||||
React/Views/* @shergin
|
||||
React/Modules/* @shergin
|
||||
React/CxxBridge/* @mhorowitz
|
||||
ReactAndroid/src/main/java/com/facebook/react/animated/* @janicduplessis
|
||||
website/* @hramos
|
||||
website/showcase.json @hramos
|
||||
package.json @hramos
|
||||
website/package.json @hramos
|
||||
local-cli/core/* @grabbou @kureev
|
||||
local-cli/link/* @grabbou @kureev
|
||||
local-cli/unlink/* @grabbou @kureev
|
||||
@@ -1,122 +1,29 @@
|
||||
<!--
|
||||
PLEASE DON'T DELETE THIS TEMPLATE UNTIL YOU HAVE READ THE FIRST SECTION.
|
||||
-->
|
||||
Please read the following carefully before opening a new issue.
|
||||
Your issue may be closed if it does not provide the information required by this template.
|
||||
|
||||
### Is this a bug report?
|
||||
We use GitHub Issues for tracking bugs in React Native.
|
||||
|
||||
(write your answer here)
|
||||
- If you have a question, ask on Stack Overflow: http://stackoverflow.com/questions/tagged/react-native
|
||||
- If you have a feature request, post it on Canny: https://react-native.canny.io/feature-requests
|
||||
|
||||
<!--
|
||||
If you answered "Yes":
|
||||
--- Delete everything above this line ---
|
||||
|
||||
We expect that it will take you about 30 minutes to produce a high-quality bug report.
|
||||
While this may seem like a lot, putting care into issues helps us fix them faster.
|
||||
For bug reports, it is REQUIRED to fill the rest of this template, or the issue will be closed.
|
||||
### Description
|
||||
|
||||
If you answered "No":
|
||||
Explain what you did, what you expected to happen, and what actually happens.
|
||||
|
||||
We use GitHub Issues exclusively for tracking bugs in React Native. If you're looking for help,
|
||||
the Community page at http://facebook.github.io/react-native/support.html list various resources
|
||||
that should help you get started.
|
||||
### Reproduction Steps and Sample Code
|
||||
|
||||
Now scroll below!
|
||||
-->
|
||||
Try to reproduce your bug on https://sketch.expo.io/ and provide a link.
|
||||
If you can't reproduce the bug on Sketch, provide a sample project. At the very least, provide an example of your code.
|
||||
|
||||
### Have you read the [Contributing Guidelines](https://facebook.github.io/react-native/docs/contributing.html)?
|
||||
### Solution
|
||||
|
||||
(Write your answer here.)
|
||||
What needs to be done to address this issue? Ideally, provide a pull request with a fix.
|
||||
|
||||
### Environment
|
||||
### Additional Information
|
||||
|
||||
<!--
|
||||
In your terminal run `react-native info` and paste its contents here. Next, specify your target platform, like this:
|
||||
|
||||
Environment:
|
||||
OS: macOS Sierra 10.12.6
|
||||
Node: 8.4.0
|
||||
Yarn: 0.27.5
|
||||
npm: 5.4.0
|
||||
Watchman: 4.7.0
|
||||
Xcode: Xcode 8.3.3 Build version 8E3004b
|
||||
Android Studio: 2.3 AI-162.4069837
|
||||
|
||||
Packages: (wanted => installed)
|
||||
react-native: 0.48.1 => 0.48.1
|
||||
react: 16.0.0-alpha.12 => 16.0.0-alpha.12
|
||||
|
||||
Target Platform: iOS (10.3)
|
||||
|
||||
***Make sure you are on v0.48.0 or greater of react-native, otherwise you may get this error:
|
||||
|
||||
Unrecognized command 'info'
|
||||
Run react-native --help to see list of all available commands
|
||||
-->
|
||||
|
||||
### Steps to Reproduce
|
||||
|
||||
<!--
|
||||
How would you describe your issue to someone who doesn’t know you or your project?
|
||||
Try to write a sequence of steps that anybody can repeat to see the issue.
|
||||
Be specific! If the bug cannot be reproduced, your issue may be closed.
|
||||
-->
|
||||
|
||||
(Write your steps here:)
|
||||
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
|
||||
### Expected Behavior
|
||||
|
||||
<!--
|
||||
How did you expect your project to behave?
|
||||
It’s fine if you’re not sure your understanding is correct.
|
||||
Just write down what you thought would happen.
|
||||
-->
|
||||
|
||||
(Write what you thought would happen.)
|
||||
|
||||
### Actual Behavior
|
||||
|
||||
<!--
|
||||
Did something go wrong?
|
||||
Is something broken, or not behaving as you expected?
|
||||
Describe this section in detail, and attach screenshots if possible.
|
||||
Don't just say "it doesn't work"!
|
||||
-->
|
||||
|
||||
(Write what happened. Add screenshots!)
|
||||
|
||||
### Reproducible Demo
|
||||
|
||||
<!--
|
||||
Please share a project that reproduces the issue.
|
||||
There are two ways to do it:
|
||||
|
||||
* Create a new app using https://snack.expo.io/ and try to reproduce the issue in it.
|
||||
This is useful if you roughly know where the problem is, or can’t share the real code.
|
||||
|
||||
* Or, copy your app and remove things until you’re left with the minimal reproducible demo.
|
||||
This is useful for finding the root cause. You may then optionally create a Snack.
|
||||
|
||||
This is a good guide to creating bug demos: https://stackoverflow.com/help/mcve
|
||||
Once you’re done, copy and paste the link to the Snack or a public GitHub repository below:
|
||||
-->
|
||||
|
||||
(Paste the link to an example project and exact instructions to reproduce the issue.)
|
||||
|
||||
<!--
|
||||
What happens if you skip this step?
|
||||
|
||||
Someone will read your bug report, and maybe will be able to help you,
|
||||
but it’s unlikely that it will get much attention from the team. Eventually,
|
||||
the issue will likely get closed in favor of issues that have reproducible demos.
|
||||
|
||||
Please remember that:
|
||||
|
||||
* Issues without reproducible demos have a very low priority.
|
||||
* The person fixing the bug would have to do that anyway. Please be respectful of their time.
|
||||
* You might figure out the issues yourself as you work on extracting it.
|
||||
|
||||
Thanks for helping us help you!
|
||||
-->
|
||||
* React Native version: [FILL THIS OUT: Be specific, filling out "latest" here is not enough.]
|
||||
* Platform: [FILL THIS OUT: iOS, Android, or both?]
|
||||
* Development Operating System: [FILL THIS OUT: Are you developing on MacOS, Linux, or Windows?]
|
||||
* Dev tools: [FILL THIS OUT: Xcode or Android Studio version, iOS or Android SDK version, if applicable]
|
||||
|
||||
@@ -1,46 +1,32 @@
|
||||
<!--
|
||||
Thank you for sending the PR! We appreciate you spending the time to work on these changes.
|
||||
Thanks for submitting a PR! Please read these instructions carefully:
|
||||
|
||||
Help us understand your motivation by explaining why you decided to make this change.
|
||||
- [ ] Explain the **motivation** for making this change.
|
||||
- [ ] Provide a **test plan** demonstrating that the code is solid.
|
||||
- [ ] Match the **code formatting** of the rest of the codebase.
|
||||
- [ ] Target the `master` branch, NOT a "stable" branch.
|
||||
|
||||
You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html
|
||||
## Motivation (required)
|
||||
|
||||
Happy contributing!
|
||||
What existing problem does the pull request solve?
|
||||
|
||||
-->
|
||||
## Test Plan (required)
|
||||
|
||||
## Motivation
|
||||
A good test plan has the exact commands you ran and their output, provides screenshots or videos if the pull request changes UI or updates the website. See [What is a Test Plan?][1] to learn more.
|
||||
|
||||
(Write your motivation here.)
|
||||
If you have added code that should be tested, add tests.
|
||||
|
||||
## Test Plan
|
||||
## Next Steps
|
||||
|
||||
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)
|
||||
Sign the [CLA][2], if you haven't already.
|
||||
|
||||
## Release Notes
|
||||
<!--
|
||||
Help reviewers and the release process by writing your own release notes
|
||||
Small pull requests are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.
|
||||
|
||||
**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**
|
||||
Make sure all **tests pass** on both [Travis][3] and [Circle CI][4]. PRs that break tests are unlikely to be merged.
|
||||
|
||||
CATEGORY
|
||||
[----------] TYPE
|
||||
[ CLI ] [-------------] LOCATION
|
||||
[ DOCS ] [ BREAKING ] [-------------]
|
||||
[ GENERAl ] [ BUGFIX ] [-{Component}-]
|
||||
[ INTERNAL ] [ ENHANCEMENT ] [ {File} ]
|
||||
[ IOS ] [ FEATURE ] [ {Directory} ] |-----------|
|
||||
[ ANDROID ] [ MINOR ] [ {Framework} ] - | {Message} |
|
||||
[----------] [-------------] [-------------] |-----------|
|
||||
For more info, see the ["Pull Requests"][5] section of our "Contributing" guidelines.
|
||||
|
||||
[CATEGORY] [TYPE] [LOCATION] - MESSAGE
|
||||
|
||||
EXAMPLES:
|
||||
|
||||
[IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
|
||||
[ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
|
||||
[CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
|
||||
[DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
|
||||
[GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
|
||||
[INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
|
||||
-->
|
||||
[1]: https://medium.com/@martinkonicek/what-is-a-test-plan-8bfc840ec171#.y9lcuqqi9
|
||||
[2]: https://code.facebook.com/cla
|
||||
[3]: https://travis-ci.org/facebook/react-native
|
||||
[4]: http://circleci.com/gh/facebook/react-native
|
||||
[5]: https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#pull-requests
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
# Configuration for probot-no-response - https://github.com/probot/no-response
|
||||
|
||||
# Number of days of inactivity before an Issue is closed for lack of response
|
||||
daysUntilClose: 14
|
||||
# Label requiring a response
|
||||
responseRequiredLabel: Needs more information
|
||||
# Comment to post when closing an Issue for lack of response. Set to `false` to disable
|
||||
closeComment: >
|
||||
Closing this issue as more information is needed to debug this and we have not heard back from the author.
|
||||
@@ -1,20 +0,0 @@
|
||||
# Number of days of inactivity before an issue becomes stale
|
||||
daysUntilStale: 60
|
||||
# Number of days of inactivity before a stale issue is closed
|
||||
daysUntilClose: 7
|
||||
# Issues with these labels will never be considered stale
|
||||
exemptLabels:
|
||||
- Good first issue
|
||||
- For Discussion
|
||||
- Core Team
|
||||
# Label to use when marking an issue as stale
|
||||
staleLabel: Stale
|
||||
# Comment to post when marking an issue as stale. Set to `false` to disable
|
||||
markComment: >
|
||||
This issue has been automatically marked as stale because it has not had
|
||||
recent activity. It will be closed if no further activity occurs.
|
||||
Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people.
|
||||
If you think this issue should definitely remain open, please let us know why.
|
||||
Thank you for your contributions.
|
||||
# Comment to post when closing a stale issue. Set to `false` to disable
|
||||
closeComment: false
|
||||
@@ -23,10 +23,10 @@ project.xcworkspace
|
||||
|
||||
# Gradle
|
||||
/build/
|
||||
/RNTester/android/app/build/
|
||||
/RNTester/android/app/gradle/
|
||||
/RNTester/android/app/gradlew
|
||||
/RNTester/android/app/gradlew.bat
|
||||
/Examples/**/android/app/build/
|
||||
/Examples/**/android/app/gradle/
|
||||
/Examples/**/android/app/gradlew
|
||||
/Examples/**/android/app/gradlew.bat
|
||||
/ReactAndroid/build/
|
||||
|
||||
# Buck
|
||||
@@ -47,7 +47,6 @@ local.properties
|
||||
node_modules
|
||||
*.log
|
||||
.nvm
|
||||
/danger/node_modules/
|
||||
|
||||
# OS X
|
||||
.DS_Store
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
language: objective-c
|
||||
|
||||
osx_image: xcode8.2
|
||||
|
||||
install:
|
||||
- mkdir -p /Users/travis/build/facebook/.nvm
|
||||
- export NVM_DIR="/Users/travis/build/facebook/.nvm"
|
||||
- brew install nvm
|
||||
- source $(brew --prefix nvm)/nvm.sh
|
||||
# TODO npm 2 started stalling on Travis, t11852928
|
||||
|
||||
# Use node 6 because that is what runs on land-blocking tests
|
||||
- nvm install 6
|
||||
- rm -Rf "${TMPDIR}/jest_preprocess_cache"
|
||||
- wget https://github.com/yarnpkg/yarn/releases/download/v0.16.0/yarn-0.16.0.js
|
||||
- export yarn="node $(pwd)/yarn-0.16.0.js"
|
||||
- $yarn install
|
||||
|
||||
script:
|
||||
- if [[ "$TEST_TYPE" = objc-ios ]]; then travis_retry travis_wait ./scripts/objc-test-ios.sh test; fi
|
||||
- if [[ "$TEST_TYPE" = objc-tvos ]]; then travis_retry travis_wait ./scripts/objc-test-tvos.sh; fi
|
||||
- if [[ "$TEST_TYPE" = e2e-objc ]]; then node ./scripts/run-ci-e2e-tests.js --ios --js --retries 3; fi
|
||||
- if [[ ( "$TEST_TYPE" = podspecs ) && ( "$TRAVIS_PULL_REQUEST" = "false" ) ]]; then gem install cocoapods && ./scripts/process-podspecs.sh; fi
|
||||
|
||||
|
||||
matrix:
|
||||
- fast_finish: true # Fail the whole build as soon as one test type fails. Should help with Travis capacity issues (very long queues).
|
||||
|
||||
# The order of these tests says which are more likely to run first and fail the whole build fast.
|
||||
env:
|
||||
- TEST_TYPE=objc-ios
|
||||
- TEST_TYPE=podspecs
|
||||
- TEST_TYPE=e2e-objc
|
||||
- TEST_TYPE=objc-tvos
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- /^.*-stable$/
|
||||
|
||||
notifications:
|
||||
email:
|
||||
recipients:
|
||||
- mkonicek@fb.com
|
||||
- douglowder@mac.com # Doug Lowder built and maintains Apple TV specific code and wants to be notified about tvOS failures.
|
||||
- eloy@artsy.net # Eloy Durán maintains the podspecs test and wants to be notified about failures.
|
||||
on_failure: change
|
||||
on_success: change
|
||||
slack:
|
||||
secure: oQL2C966v7/DtxNqfM7WowjY0R5mgLHR2qHkoucwK5iVrmaptnHr8fq01xlj7VT0kDwNLqT3n4+gtCviGw89lq71m3W76c8Pms/10jpjw+LwAfQPVizNw/Bx8MFNNmjDauK/auFxaybiLZupi7zd4xFGOZvScmFdfD4CAAp2OOA=
|
||||
on_pull_requests: false
|
||||
on_failure: change
|
||||
on_success: change
|
||||
@@ -1,43 +0,0 @@
|
||||
# [Open Source Code of Conduct](https://code.facebook.com/codeofconduct)
|
||||
|
||||
This code of conduct outlines our expectations for participants within the **Facebook Open Source** community, as well as steps to reporting unacceptable behavior. We are committed to providing a welcoming and inspiring community for all and expect our code of conduct to be honored. Anyone who violates this code of conduct may be banned from the community.
|
||||
|
||||
Our open source community strives to:
|
||||
|
||||
* **Be friendly and patient.**
|
||||
* **Be welcoming:** We strive to be a community that welcomes and supports people of all backgrounds and identities. This includes, but is not limited to members of any race, ethnicity, culture, national origin, colour, immigration status, social and economic class, educational level, sex, sexual orientation, gender identity and expression, age, size, family status, political belief, religion, and mental and physical ability.
|
||||
* **Be considerate:** Your work will be used by other people, and you in turn will depend on the work of others. Any decision you take will affect users and colleagues, and you should take those consequences into account when making decisions. Remember that we’re a world-wide community, so you might not be communicating in someone else’s primary language.
|
||||
* **Be respectful:** Not all of us will agree all the time, but disagreement is no excuse for poor behavior and poor manners. We might all experience some frustration now and then, but we cannot allow that frustration to turn into a personal attack. It’s important to remember that a community where people feel uncomfortable or threatened is not a productive one.
|
||||
* **Be careful in the words that you choose:** we are a community of professionals, and we conduct ourselves professionally. Be kind to others. Do not insult or put down other participants. Harassment and other exclusionary behavior aren’t acceptable. This includes, but is not limited to:
|
||||
* Violent threats or language directed against another person.
|
||||
* Discriminatory jokes and language.
|
||||
* Posting sexually explicit or violent material.
|
||||
* Posting (or threatening to post) other people’s personally identifying information (“doxing”).
|
||||
* Personal insults, especially those using racist or sexist terms.
|
||||
* Unwelcome sexual attention.
|
||||
* Advocating for, or encouraging, any of the above behavior.
|
||||
* Repeated harassment of others. In general, if someone asks you to stop, then stop.
|
||||
* **When we disagree, try to understand why:** Disagreements, both social and technical, happen all the time. It is important that we resolve disagreements and differing views constructively.
|
||||
* **Remember that we’re different.** The strength of our community comes from its diversity, people from a wide range of backgrounds. Different people have different perspectives on issues. Being unable to understand why someone holds a viewpoint doesn’t mean that they’re wrong. Don’t forget that it is human to err and blaming each other doesn’t get us anywhere. Instead, focus on helping to resolve issues and learning from mistakes.
|
||||
|
||||
This code is not exhaustive or complete. It serves to distill our common understanding of a collaborative, shared environment, and goals. We expect it to be followed in spirit as much as in the letter.
|
||||
|
||||
## Diversity Statement
|
||||
|
||||
We encourage everyone to participate and are committed to building a community for all. Although we may not be able to satisfy everyone, we all agree that everyone is equal. Whenever a participant has made a mistake, we expect them to take responsibility for it. If someone has been harmed or offended, it is our responsibility to listen carefully and respectfully, and do our best to right the wrong.
|
||||
|
||||
Although this list cannot be exhaustive, we explicitly honor diversity in age, gender, gender identity or expression, culture, ethnicity, language, national origin, political beliefs, profession, race, religion, sexual orientation, socioeconomic status, and technical ability. We will not tolerate discrimination based on any of the protected characteristics above, including participants with disabilities.
|
||||
|
||||
## Reporting Issues
|
||||
|
||||
If you experience or witness unacceptable behavior—or have any other concerns—please report it by contacting us via opensource@fb.com. All reports will be handled with discretion. In your report please include:
|
||||
|
||||
* Your contact information.
|
||||
* Names (real, nicknames, or pseudonyms) of any individuals involved. If there are additional witnesses, please include them as well. Your account of what occurred, and if you believe the incident is ongoing. If there is a publicly available record (e.g. a mailing list archive or a public IRC logger), please include a link.
|
||||
* Any additional information that may be helpful.
|
||||
|
||||
After filing a report, a representative will contact you personally. If the person who is harassing you is part of the response team, they will recuse themselves from handling your incident. A representative will then review the incident, follow up with any additional questions, and make a decision as to how to respond. We will respect confidentiality requests for the purpose of protecting victims of abuse.
|
||||
|
||||
Anyone asked to stop unacceptable behavior is expected to comply immediately. If an individual engages in unacceptable behavior, the representative may take any action they deem appropriate, up to and including a permanent ban from our community without warning.
|
||||
|
||||
_This Code Of Conduct follows the [template](http://todogroup.org/opencodeofconduct/) established by the [TODO Group](http://todogroup.org/)._
|
||||
@@ -1,140 +1,44 @@
|
||||
# Contributing to React Native
|
||||
|
||||
<!-- generated_contributing_start -->
|
||||
React Native is one of Facebook's first open source projects that is both under very active development and is also being used to ship code to everybody using Facebook's mobile apps. If you're interested in contributing to React Native, hopefully this document makes the process for contributing clear.
|
||||
React Native is one of Facebook's first open source projects that is both under very active development and is also being used to ship code to everybody on [facebook.com](https://facebook.com). We're still working out the kinks to make contributing to this project as easy and transparent as possible, but we're not quite there yet. Hopefully this document makes the process for contributing clear and preempts some questions you may have.
|
||||
|
||||
## [Code of Conduct](https://code.facebook.com/codeofconduct)
|
||||
## Our Development Process
|
||||
|
||||
Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please read [the full text](https://code.facebook.com/codeofconduct) so that you can understand what actions will and will not be tolerated.
|
||||
Some of the core team will be working directly on GitHub. These changes will be public from the beginning. Other changesets will come via a bridge with Facebook's internal source control. This is a necessity as it allows engineers at Facebook outside of the core team to move fast and contribute from an environment they are comfortable in.
|
||||
|
||||
## Get involved
|
||||
### `master` is unsafe
|
||||
|
||||
There are many ways to contribute to React Native, and many of them do not involve writing any code. Here's a few ideas to get started:
|
||||
We will do our best to keep `master` in good shape, with tests passing at all times. But in order to move fast, we will make API changes that your application might not be compatible with. We will do our best to communicate these changes and version appropriately so you can lock into a specific version if need be.
|
||||
|
||||
* Simply start using React Native. Go through the [Getting Started](http://facebook.github.io/react-native/docs/getting-started.html) guide. Does everything work as expected? If not, we're always looking for improvements. Let us know by [opening an issue](http://facebook.github.io/react-native/docs/contributing.html#reporting-new-issues).
|
||||
* Look through the [open issues](https://github.com/facebook/react-native/issues). Provide workarounds, ask for clarification, or suggest labels. Help [triage issues](http://facebook.github.io/react-native/docs/contributing.html#triaging-issues-and-pull-requests).
|
||||
* If you find an issue you would like to fix, [open a pull request](http://facebook.github.io/react-native/docs/contributing.html#your-first-pull-request). Issues tagged as [_Good first issue_](https://github.com/facebook/react-native/labels/Good%20first%20issue) are a good place to get started.
|
||||
* Read through the [React Native docs](http://facebook.github.io/react-native/docs). If you find anything that is confusing or can be improved, you can make edits by clicking "Improve this page" at the bottom of most docs.
|
||||
* Browse [Stack Overflow](https://stackoverflow.com/questions/tagged/react-native) and answer questions. This will help you get familiarized with common pitfalls or misunderstandings, which can be useful when contributing updates to the documentation.
|
||||
* Take a look at the [features requested](https://react-native.canny.io/feature-requests) by others in the community and consider opening a pull request if you see something you want to work on.
|
||||
### Pull Requests
|
||||
|
||||
Contributions are very welcome. If you think you need help planning your contribution, please hop into [#react-native](https://discord.gg/0ZcbPKXt5bZjGY5n) and let people know you're looking for a mentor.
|
||||
The core team will be monitoring for pull requests. When we get one, we'll run some Facebook-specific integration tests on it first. From here, we'll need to get another person to sign off on the changes and then merge the pull request. For API changes we may need to fix internal uses, which could cause some delay. We'll do our best to provide updates and feedback throughout the process.
|
||||
|
||||
Core contributors to React Native meet monthly and post their meeting notes on the [React Native blog](https://facebook.github.io/react-native/blog). You can also find ad hoc discussions in the [React Native Core Contributors](https://www.facebook.com/groups/reactnativeoss/) Facebook group.
|
||||
**Please submit your pull request on the `master` branch**. If the fix is critical and should be included in a stable branch please mention it and it will be cherry picked into it by a project maintainer.
|
||||
|
||||
### Triaging issues and pull requests
|
||||
*Before* submitting a pull request, please make sure the following is done…
|
||||
|
||||
One great way you can contribute to the project without writing any code is to help triage issues and pull requests as they come in.
|
||||
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!
|
||||
- If you've changed APIs, update the documentation.
|
||||
- If you've updated the docs, verify the website locally and submit screenshots if applicable.
|
||||
|
||||
* Ask for more information if the issue does not provide all the details required by the template.
|
||||
* Suggest [labels](https://github.com/facebook/react-native/labels) that can help categorize issues.
|
||||
* Flag issues that are stale or that should be closed.
|
||||
* Ask for test plans and review code.
|
||||
```
|
||||
$ cd website
|
||||
$ npm install && npm start
|
||||
Open the following in your browser: http://localhost:8079/react-native/index.html
|
||||
```
|
||||
|
||||
You can learn more about handling issues in the [maintainer's guide](docs/maintainers.html#handling-issues).
|
||||
|
||||
## Our development process
|
||||
|
||||
Some of the core team will be working directly on [GitHub](https://github.com/facebook/react-native). These changes will be public from the beginning. Other changesets will come via a bridge with Facebook's internal source control. This is a necessity as it allows engineers at Facebook outside of the core team to move fast and contribute from an environment they are comfortable in.
|
||||
|
||||
When a change made on GitHub is approved, it will first be imported into Facebook's internal source control. The change will eventually sync back to GitHub as a single commit once it has passed all internal tests.
|
||||
|
||||
### Branch organization
|
||||
|
||||
We will do our best to keep `master` in good shape, with tests passing at all times. But in order to move fast, we will make API changes that your application might not be compatible with. We will do our best to [communicate these changes](https://github.com/facebook/react-native/releases) and version appropriately so you can lock into a specific version if need be.
|
||||
|
||||
To see what changes are coming and provide better feedback to React Native contributors, use the [latest release candidate](http://facebook.github.io/react-native/versions.html) when possible. By the time a release candidate is released, the changes it contains will have been shipped in production Facebook apps for over two weeks.
|
||||
|
||||
## Bugs
|
||||
|
||||
We use [GitHub Issues](https://github.com/facebook/react-native/issues) for our public bugs. If you would like to report a problem, take a look around and see if someone already opened an issue about it. If you a are certain this is a new, unreported bug, you can submit a [bug report](http://facebook.github.io/react-native/docs/contributing.html#reporting-new-issues).
|
||||
|
||||
If you have questions about using React Native, the [Community page](http://facebook.github.io/react-native/support.html) list various resources that should help you get started.
|
||||
|
||||
We also have a [place where you can request features or enhancements](https://react-native.canny.io/feature-requests). If you see anything you'd like to be implemented, vote it up and explain your use case.
|
||||
|
||||
## Reporting new issues
|
||||
|
||||
When [opening a new issue](https://github.com/facebook/react-native/issues/new), always make sure to fill out the [issue template](https://raw.githubusercontent.com/facebook/react-native/master/.github/ISSUE_TEMPLATE.md). **This step is very important!** Not doing so may result in your issue getting closed. Don't take this personally if this happens, and feel free to open a new issue once you've gathered all the information required by the template.
|
||||
|
||||
* **One issue, one bug:** Please report a single bug per issue.
|
||||
* **Provide a Snack:** The best way to get attention on your issue is to provide a reduced test case. You can use [Snack](https://snack.expo.io/) to demonstrate the issue.
|
||||
* **Provide reproduction steps:** List all the steps necessary to reproduce the issue. Provide a Snack or upload a sample project to GitHub. The person reading your bug report should be able to follow these steps to reproduce your issue with minimal effort.
|
||||
* **Try out the latest version:** Verify that the issue can be reproduced locally by updating your project to use [React Native from `master`](http://facebook.github.io/react-native/versions.html). The bug may have already been fixed!
|
||||
|
||||
We're not able to provide support through GitHub Issues. If you're looking for help with your code, consider asking on [Stack Overflow](http://stackoverflow.com/questions/tagged/react-native) or reaching out to the community through [other channels](https://facebook.github.io/react-native/support.html).
|
||||
|
||||
### Security bugs
|
||||
|
||||
Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe disclosure of security bugs. With that in mind, please do not file public issues; go through the process outlined on that page.
|
||||
|
||||
## Pull requests
|
||||
|
||||
### Your first pull request
|
||||
|
||||
So you have decided to contribute code back to upstream by opening a pull request. You've invested a good chunk of time, and we appreciate it. We will do our best to work with you and get the PR looked at.
|
||||
|
||||
Working on your first Pull Request? You can learn how from this free video series:
|
||||
|
||||
[**How to Contribute to an Open Source Project on GitHub**](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github)
|
||||
|
||||
We have a list of [beginner friendly issues](https://github.com/facebook/react-native/labels/Good%20First%20Task) to help you get your feet wet in the React Native codebase and familiar with our contribution process. This is a great place to get started.
|
||||
|
||||
### Proposing a change
|
||||
|
||||
If you would like to request a new feature or enhancement but are not yet thinking about opening a pull request, we have a [place to track feature requests](https://react-native.canny.io/feature-requests).
|
||||
|
||||
If you intend to change the public API, or make any non-trivial changes to the implementation, we recommend [filing an issue](https://github.com/facebook/react-native/issues/new?title=%5BProposal%5D) that includes `[Proposal]` in the title. This lets us reach an agreement on your proposal before you put significant effort into it. These types of issues should be rare. If you have been contributing to the project long enough, you will probably already have access to the [React Native Core Contributors](https://www.facebook.com/groups/reactnativeoss/) Facebook Group, where this sort of discussion is usually held.
|
||||
|
||||
If you're only fixing a bug, it's fine to submit a pull request right away but we still recommend to file an issue detailing what you're fixing. This is helpful in case we don't accept that specific fix but want to keep track of the issue.
|
||||
|
||||
### Sending a pull request
|
||||
|
||||
Small pull requests are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.
|
||||
|
||||
Please make sure the following is done when submitting a pull request:
|
||||
|
||||
1. Fork [the repository](https://github.com/facebook/react-native) and create your branch from `master`.
|
||||
2. Add the copyright notice to the top of any new files you've added.
|
||||
3. Describe your [**test plan**](/react-native/docs/contributing.html#test-plan) in your pull request description. Make sure to [test your changes](/react-native/docs/testing.html)!
|
||||
4. Make sure your code lints (`npm run lint`).
|
||||
5. If you haven't already, [sign the CLA](https://code.facebook.com/cla).
|
||||
|
||||
All pull requests should be opened against the `master` branch. After opening your pull request, ensure [**all tests pass**](/react-native/docs/contributing.html#contrinuous-integration-tests) on Circle CI. If a test fails and you believe it is unrelated to your change, leave a comment on the pull request explaining why.
|
||||
3. Add the copyright notice to the top of any new files you've added.
|
||||
4. Ensure tests pass on Travis and Circle CI.
|
||||
5. Make sure your code lints (`node linter.js <files touched>`).
|
||||
6. If you haven't already, sign the [CLA](https://code.facebook.com/cla).
|
||||
7. Squash your commits (`git rebase -i`).
|
||||
One intent alongside one commit makes it clearer for people to review and easier to understand your intention.
|
||||
|
||||
> **Note:** It is not necessary to keep clicking `Merge master to your branch` on the PR page. You would want to merge master if there are conflicts or tests are failing. The Facebook-GitHub-Bot ultimately squashes all commits to a single one before merging your PR.
|
||||
|
||||
#### Test plan
|
||||
|
||||
A good test plan has the exact commands you ran and their output, provides screenshots or videos if the pull request changes UI or updates the website.
|
||||
|
||||
* If you've added code that should be tested, add tests!
|
||||
* If you've changed APIs, update the documentation.
|
||||
* If you've updated the docs, verify the website locally and submit screenshots if applicable (see [website/README.md](https://github.com/facebook/react-native/blob/master/website/README.md))
|
||||
|
||||
See [What is a Test Plan?](https://medium.com/@martinkonicek/what-is-a-test-plan-8bfc840ec171#.y9lcuqqi9) to learn more.
|
||||
|
||||
#### Continuous integration tests
|
||||
|
||||
Make sure all **tests pass** on [Circle CI][circle]. PRs that break tests are unlikely to be merged. Learn more about [testing your changes here](/react-native/docs/testing.html).
|
||||
|
||||
[circle]: http://circleci.com/gh/facebook/react-native
|
||||
|
||||
#### Breaking changes
|
||||
|
||||
When adding a new breaking change, follow this template in your pull request:
|
||||
|
||||
```
|
||||
### New breaking change here
|
||||
|
||||
* **Who does this affect**:
|
||||
* **How to migrate**:
|
||||
* **Why make this breaking change**:
|
||||
* **Severity (number of people affected x effort)**:
|
||||
```
|
||||
|
||||
If your pull request is merged, a core contributor will update the [list of breaking changes](https://github.com/facebook/react-native/wiki/Breaking-Changes) which is then used to populate the release notes.
|
||||
|
||||
#### Copyright Notice for files
|
||||
|
||||
Copy and paste this to the top of your new file(s):
|
||||
@@ -152,21 +56,34 @@ Copy and paste this to the top of your new file(s):
|
||||
|
||||
If you've added a new module, add a `@providesModule <moduleName>` at the end of the comment. This will allow the haste package manager to find it.
|
||||
|
||||
#### Contributor License Agreement (CLA)
|
||||
### Contributor License Agreement (CLA)
|
||||
|
||||
In order to accept your pull request, we need you to submit a CLA. You only need to do this once, so if you've done this for another Facebook open source project, you're good to go. If you are submitting a pull request for the first time, the Facebook GitHub Bot will reply with a link to the CLA form. You may also [complete your CLA here](https://code.facebook.com/cla).
|
||||
In order to accept your pull request, we need you to submit a CLA. You only need to do this once, so if you've done this for another Facebook open source project, you're good to go. If you are submitting a pull request for the first time, just let us know that you have completed the CLA and we can cross-check with your GitHub username.
|
||||
|
||||
### What happens next?
|
||||
[Complete your CLA here](https://code.facebook.com/cla)
|
||||
|
||||
The core team will be monitoring for pull requests. Read [what to expect from maintainers](https://facebook.github.io/react-native/docs/maintainers.html#handling-pull-requests) to understand what may happen after you open a pull request.
|
||||
## Bugs
|
||||
|
||||
### Where to Find Known Issues
|
||||
|
||||
We are using GitHub Issues for our public bugs. We keep a close eye on this and try to make it clear when we have an internal fix in progress. Before filing a new task, try to make sure your problem doesn't already exist.
|
||||
|
||||
### Reporting New Issues
|
||||
|
||||
The best way to get your bug fixed is to provide a reduced test case. Please provide either a public repository with a runnable example or a [Sketch](https://sketch.expo.io/).
|
||||
|
||||
### Security Bugs
|
||||
|
||||
Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe disclosure of security bugs. With that in mind, please do not file public issues; go through the process outlined on that page.
|
||||
|
||||
## How to Get in Touch
|
||||
|
||||
* [Facebook](https://www.facebook.com/groups/react.native.community/)
|
||||
* [Twitter](https://www.twitter.com/reactnative)
|
||||
|
||||
## Style Guide
|
||||
|
||||
Our linter will catch most styling issues that may exist in your code. You can check the status of your code styling by simply running `npm run lint`.
|
||||
|
||||
However, there are still some styles that the linter cannot pick up.
|
||||
|
||||
### Code Conventions
|
||||
### Code
|
||||
|
||||
#### General
|
||||
|
||||
@@ -178,7 +95,7 @@ However, there are still some styles that the linter cannot pick up.
|
||||
#### JavaScript
|
||||
|
||||
* Use semicolons;
|
||||
* ES6 standards
|
||||
* `'use strict';`
|
||||
* Prefer `'` over `"`
|
||||
* Do not use the optional parameters of `setTimeout` and `setInterval`
|
||||
* 80 character line length
|
||||
@@ -212,4 +129,3 @@ However, there are still some styles that the linter cannot pick up.
|
||||
## License
|
||||
|
||||
By contributing to React Native, you agree that your contributions will be licensed under its BSD license.
|
||||
<!-- generated_contributing_end -->
|
||||
|
||||
@@ -3,6 +3,7 @@ FROM containership/android-base:latest
|
||||
# set default environment variables
|
||||
ENV GRADLE_OPTS="-Dorg.gradle.jvmargs=\"-Xmx512m -XX:+HeapDumpOnOutOfMemoryError\""
|
||||
ENV JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF8"
|
||||
ENV REACT_NATIVE_MAX_WORKERS=1
|
||||
|
||||
# add ReactAndroid directory
|
||||
ADD .buckconfig /app/.buckconfig
|
||||
|
||||
@@ -86,16 +86,10 @@ RUN echo "y" | android update sdk -u -a -t $(android list sdk -a | grep "Intel x
|
||||
RUN echo "y" | android update sdk -u -a -t $(android list sdk -a | grep "Google APIs, Android API 23, revision 1" | awk '{ print $1 }' | sed 's/.$//')
|
||||
|
||||
# Android Support Repository, revision 45
|
||||
RUN echo "y" | android update sdk -u -a -t $(android list sdk -a | grep "Android Support Repository" | awk '{ print $1 }' | sed 's/.$//')
|
||||
RUN echo "y" | android update sdk -u -a -t $(android list sdk -a | grep "Android Support Repository, revision 45" | awk '{ print $1 }' | sed 's/.$//')
|
||||
|
||||
# Link adb executable
|
||||
RUN ln -s /opt/android/platform-tools/adb /usr/bin/adb
|
||||
|
||||
# Install google-chrome
|
||||
RUN curl -fsSL https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
|
||||
&& echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y google-chrome-stable
|
||||
|
||||
# clean up unnecessary directories
|
||||
RUN rm -rf /opt/android/system-images/android-19/default/x86
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
FROM library/node:6.9.2
|
||||
|
||||
ENV YARN_VERSION=0.27.5
|
||||
ENV YARN_VERSION=0.19.1
|
||||
|
||||
# install dependencies
|
||||
RUN apt-get update && apt-get install ocaml libelf-dev -y
|
||||
|
||||
@@ -28,6 +28,12 @@ const child_process = require('child_process');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
// Flaky tests ignored on Circle CI. They still run internally at fb.
|
||||
const ignoredTests = [
|
||||
'ReactScrollViewTestCase',
|
||||
'ReactHorizontalScrollViewTestCase'
|
||||
];
|
||||
|
||||
const colors = {
|
||||
GREEN: '\x1b[32m',
|
||||
RED: '\x1b[31m',
|
||||
@@ -36,7 +42,6 @@ const colors = {
|
||||
|
||||
const test_opts = {
|
||||
FILTER: new RegExp(argv.filter || '.*', 'i'),
|
||||
IGNORE: argv.ignore || null,
|
||||
PACKAGE: argv.package || 'com.facebook.react.tests',
|
||||
PATH: argv.path || './ReactAndroid/src/androidTest/java/com/facebook/react/tests',
|
||||
RETRIES: parseInt(argv.retries || 2, 10),
|
||||
@@ -45,7 +50,7 @@ const test_opts = {
|
||||
|
||||
OFFSET: argv.offset,
|
||||
COUNT: argv.count
|
||||
};
|
||||
}
|
||||
|
||||
let max_test_class_length = Number.NEGATIVE_INFINITY;
|
||||
|
||||
@@ -54,21 +59,14 @@ let testClasses = fs.readdirSync(path.resolve(process.cwd(), test_opts.PATH))
|
||||
return file.endsWith('.java');
|
||||
}).map((clazz) => {
|
||||
return path.basename(clazz, '.java');
|
||||
}).filter(className => {
|
||||
return ignoredTests.indexOf(className) === -1;
|
||||
}).map((clazz) => {
|
||||
return test_opts.PACKAGE + '.' + clazz;
|
||||
}).filter((clazz) => {
|
||||
return test_opts.FILTER.test(clazz);
|
||||
});
|
||||
|
||||
if (test_opts.IGNORE) {
|
||||
test_opts.IGNORE = new RegExp(test_opts.IGNORE, 'i');
|
||||
testClasses = testClasses.filter(className => {
|
||||
return !test_opts.IGNORE.test(className);
|
||||
});
|
||||
}
|
||||
|
||||
testClasses = testClasses.map((clazz) => {
|
||||
return test_opts.PACKAGE + '.' + clazz;
|
||||
}).filter((clazz) => {
|
||||
return test_opts.FILTER.test(clazz);
|
||||
});
|
||||
|
||||
// only process subset of the tests at corresponding offset and count if args provided
|
||||
if (test_opts.COUNT != null && test_opts.OFFSET != null) {
|
||||
const testCount = testClasses.length;
|
||||
@@ -85,14 +83,14 @@ if (test_opts.COUNT != null && test_opts.OFFSET != null) {
|
||||
}
|
||||
|
||||
return async.mapSeries(testClasses, (clazz, callback) => {
|
||||
if (clazz.length > max_test_class_length) {
|
||||
if(clazz.length > max_test_class_length) {
|
||||
max_test_class_length = clazz.length;
|
||||
}
|
||||
|
||||
return async.retry(test_opts.RETRIES, (retryCb) => {
|
||||
const test_process = child_process.spawn('./ContainerShip/scripts/run-instrumentation-tests-via-adb-shell.sh', [test_opts.PACKAGE, clazz], {
|
||||
stdio: 'inherit'
|
||||
});
|
||||
})
|
||||
|
||||
const timeout = setTimeout(() => {
|
||||
test_process.kill();
|
||||
@@ -106,7 +104,7 @@ return async.mapSeries(testClasses, (clazz, callback) => {
|
||||
test_process.on('exit', (code) => {
|
||||
clearTimeout(timeout);
|
||||
|
||||
if (code !== 0) {
|
||||
if(code !== 0) {
|
||||
return retryCb(new Error(`Process exited with code: ${code}`));
|
||||
}
|
||||
|
||||
@@ -138,16 +136,16 @@ function print_test_suite_results(results) {
|
||||
function pad_output(num_chars) {
|
||||
let i = 0;
|
||||
|
||||
while (i < num_chars) {
|
||||
while(i < num_chars) {
|
||||
process.stdout.write(' ');
|
||||
i++;
|
||||
}
|
||||
}
|
||||
results.forEach((test) => {
|
||||
if (test.status === 'success') {
|
||||
if(test.status === 'success') {
|
||||
color = colors.GREEN;
|
||||
passing_suites++;
|
||||
} else if (test.status === 'failure') {
|
||||
} else if(test.status === 'failure') {
|
||||
color = colors.RED;
|
||||
failing_suites++;
|
||||
}
|
||||
|
||||
@@ -11,16 +11,13 @@ RUN_CLI_INSTALL=1
|
||||
RUN_IOS=0
|
||||
RUN_JS=0
|
||||
|
||||
RETRY_COUNT=${RETRY_COUNT:-2}
|
||||
RETRY_COUNT=${RETRY_COUNT:-1}
|
||||
AVD_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 8 | head -n 1)
|
||||
|
||||
ANDROID_NPM_DEPS="appium@1.5.1 mocha@2.4.5 wd@0.3.11 colors@1.0.3 pretty-data2@0.40.1"
|
||||
CLI_PACKAGE=$ROOT/react-native-cli/react-native-cli-*.tgz
|
||||
PACKAGE=$ROOT/react-native-*.tgz
|
||||
|
||||
# solve issue with max user watches limit
|
||||
echo 65536 | tee -a /proc/sys/fs/inotify/max_user_watches
|
||||
watchman shutdown-server
|
||||
REACT_NATIVE_MAX_WORKERS=1
|
||||
|
||||
# retries command on failure
|
||||
# $1 -- max attempts
|
||||
@@ -180,6 +177,7 @@ function e2e_suite() {
|
||||
cd ..
|
||||
keytool -genkey -v -keystore android/keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"
|
||||
|
||||
echo "Starting packager server"
|
||||
node ./node_modules/.bin/appium >> /dev/null &
|
||||
APPIUM_PID=$!
|
||||
echo "Starting appium server $APPIUM_PID"
|
||||
@@ -195,7 +193,6 @@ function e2e_suite() {
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo "Starting packager server"
|
||||
npm start >> /dev/null &
|
||||
SERVER_PID=$!
|
||||
sleep 15
|
||||
@@ -230,13 +227,13 @@ function e2e_suite() {
|
||||
# js tests
|
||||
if [ $RUN_JS -ne 0 ]; then
|
||||
# Check the packager produces a bundle (doesn't throw an error)
|
||||
react-native bundle --max-workers 1 --platform android --dev true --entry-file index.js --bundle-output android-bundle.js
|
||||
REACT_NATIVE_MAX_WORKERS=1 react-native bundle --platform android --dev true --entry-file index.android.js --bundle-output android-bundle.js
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Could not build android bundle"
|
||||
return 1
|
||||
fi
|
||||
|
||||
react-native bundle --max-workers 1 --platform ios --dev true --entry-file index.js --bundle-output ios-bundle.js
|
||||
REACT_NATIVE_MAX_WORKERS=1 react-native bundle --platform ios --dev true --entry-file index.ios.js --bundle-output ios-bundle.js
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Could not build iOS bundle"
|
||||
return 1
|
||||
|
||||
@@ -29,7 +29,7 @@ def update():
|
||||
# prevent CircleCI from killing the process for inactivity
|
||||
while not done:
|
||||
time.sleep(5)
|
||||
print "Running in background. Waiting for 'adb' command response..."
|
||||
print "Running in background. Waiting for 'adb' command reponse..."
|
||||
|
||||
t = threading.Thread(target=update)
|
||||
t.dameon = True
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"rules": {
|
||||
"no-alert": 0
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
# RNTester
|
||||
# UIExplorer
|
||||
|
||||
The RNTester showcases React Native views and modules.
|
||||
The UIExplorer is a sample app that showcases React Native views and modules.
|
||||
|
||||
## Running this app
|
||||
|
||||
@@ -14,7 +14,7 @@ Before running the app, make sure you ran:
|
||||
|
||||
Mac OS and Xcode are required.
|
||||
|
||||
- Open `RNTester/RNTester.xcodeproj` in Xcode
|
||||
- Open `Examples/UIExplorer/UIExplorer.xcodeproj` in Xcode
|
||||
- Hit the Run button
|
||||
|
||||
See [Running on device](https://facebook.github.io/react-native/docs/running-on-device.html) if you want to use a physical device.
|
||||
@@ -26,12 +26,12 @@ You'll need to have all the [prerequisites](https://github.com/facebook/react-na
|
||||
Start an Android emulator ([Genymotion](https://www.genymotion.com) is recommended).
|
||||
|
||||
cd react-native
|
||||
./gradlew :RNTester:android:app:installDebug
|
||||
./scripts/packager.sh
|
||||
./gradlew :Examples:UIExplorer:android:app:installDebug
|
||||
./packager/packager.sh
|
||||
|
||||
_Note: Building for the first time can take a while._
|
||||
|
||||
Open the RNTester app in your emulator.
|
||||
Open the UIExplorer app in your emulator.
|
||||
|
||||
See [Running on Device](https://facebook.github.io/react-native/docs/running-on-device.html) in case you want to use a physical device.
|
||||
|
||||
@@ -44,9 +44,9 @@ Install Buck from [here](https://buckbuild.com/setup/install.html).
|
||||
Run the following commands from the react-native folder:
|
||||
|
||||
./gradlew :ReactAndroid:packageReactNdkLibsForBuck
|
||||
buck fetch rntester
|
||||
buck install -r rntester
|
||||
./scripts/packager.sh
|
||||
buck fetch uiexplorer
|
||||
buck install -r uiexplorer
|
||||
./packager/packager.sh
|
||||
|
||||
_Note: The native libs are still built using gradle. Full build with buck is coming soon(tm)._
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
BlueprintIdentifier = "2D2A28121D9B038B00D4039D"
|
||||
BuildableName = "libReact.a"
|
||||
BlueprintName = "React-tvOS"
|
||||
ReferencedContainer = "container:../React/React.xcodeproj">
|
||||
ReferencedContainer = "container:../../React/React.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
@@ -29,9 +29,9 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2DD3238F1DA2DD8A000FE1B8"
|
||||
BuildableName = "RNTester-tvOS.app"
|
||||
BlueprintName = "RNTester-tvOS"
|
||||
ReferencedContainer = "container:RNTester.xcodeproj">
|
||||
BuildableName = "UIExplorer-tvOS.app"
|
||||
BlueprintName = "UIExplorer-tvOS"
|
||||
ReferencedContainer = "container:UIExplorer.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
@@ -47,9 +47,9 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2DD323A41DA2DD8B000FE1B8"
|
||||
BuildableName = "RNTester-tvOSUnitTests.xctest"
|
||||
BlueprintName = "RNTester-tvOSUnitTests"
|
||||
ReferencedContainer = "container:RNTester.xcodeproj">
|
||||
BuildableName = "UIExplorer-tvOSUnitTests.xctest"
|
||||
BlueprintName = "UIExplorer-tvOSUnitTests"
|
||||
ReferencedContainer = "container:UIExplorer.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
<TestableReference
|
||||
@@ -57,9 +57,9 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2D4624C11DA2EA6900C74D09"
|
||||
BuildableName = "RNTester-tvOSIntegrationTests.xctest"
|
||||
BlueprintName = "RNTester-tvOSIntegrationTests"
|
||||
ReferencedContainer = "container:RNTester.xcodeproj">
|
||||
BuildableName = "UIExplorer-tvOSIntegrationTests.xctest"
|
||||
BlueprintName = "UIExplorer-tvOSIntegrationTests"
|
||||
ReferencedContainer = "container:UIExplorer.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
@@ -67,9 +67,9 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2DD3238F1DA2DD8A000FE1B8"
|
||||
BuildableName = "RNTester-tvOS.app"
|
||||
BlueprintName = "RNTester-tvOS"
|
||||
ReferencedContainer = "container:RNTester.xcodeproj">
|
||||
BuildableName = "UIExplorer-tvOS.app"
|
||||
BlueprintName = "UIExplorer-tvOS"
|
||||
ReferencedContainer = "container:UIExplorer.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
@@ -90,9 +90,9 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2DD3238F1DA2DD8A000FE1B8"
|
||||
BuildableName = "RNTester-tvOS.app"
|
||||
BlueprintName = "RNTester-tvOS"
|
||||
ReferencedContainer = "container:RNTester.xcodeproj">
|
||||
BuildableName = "UIExplorer-tvOS.app"
|
||||
BlueprintName = "UIExplorer-tvOS"
|
||||
ReferencedContainer = "container:UIExplorer.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<EnvironmentVariables>
|
||||
@@ -116,9 +116,9 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2DD3238F1DA2DD8A000FE1B8"
|
||||
BuildableName = "RNTester-tvOS.app"
|
||||
BlueprintName = "RNTester-tvOS"
|
||||
ReferencedContainer = "container:RNTester.xcodeproj">
|
||||
BuildableName = "UIExplorer-tvOS.app"
|
||||
BlueprintName = "UIExplorer-tvOS"
|
||||
ReferencedContainer = "container:UIExplorer.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
@@ -17,7 +17,7 @@
|
||||
BlueprintIdentifier = "83CBBA2D1A601D0E00E9B192"
|
||||
BuildableName = "libReact.a"
|
||||
BlueprintName = "React"
|
||||
ReferencedContainer = "container:../React/React.xcodeproj">
|
||||
ReferencedContainer = "container:../../React/React.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
@@ -29,9 +29,9 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "3D13F83D1D6F6AE000E69E0E"
|
||||
BuildableName = "RNTesterBundle.bundle"
|
||||
BlueprintName = "RNTesterBundle"
|
||||
ReferencedContainer = "container:RNTester.xcodeproj">
|
||||
BuildableName = "UIExplorerBundle.bundle"
|
||||
BlueprintName = "UIExplorerBundle"
|
||||
ReferencedContainer = "container:UIExplorer.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
@@ -43,9 +43,9 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||
BuildableName = "RNTester.app"
|
||||
BlueprintName = "RNTester"
|
||||
ReferencedContainer = "container:RNTester.xcodeproj">
|
||||
BuildableName = "UIExplorer.app"
|
||||
BlueprintName = "UIExplorer"
|
||||
ReferencedContainer = "container:UIExplorer.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
@@ -57,9 +57,9 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "004D289D1AAF61C70097A701"
|
||||
BuildableName = "RNTesterUnitTests.xctest"
|
||||
BlueprintName = "RNTesterUnitTests"
|
||||
ReferencedContainer = "container:RNTester.xcodeproj">
|
||||
BuildableName = "UIExplorerUnitTests.xctest"
|
||||
BlueprintName = "UIExplorerUnitTests"
|
||||
ReferencedContainer = "container:UIExplorer.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
@@ -71,9 +71,9 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "143BC5941B21E3E100462512"
|
||||
BuildableName = "RNTesterIntegrationTests.xctest"
|
||||
BlueprintName = "RNTesterIntegrationTests"
|
||||
ReferencedContainer = "container:RNTester.xcodeproj">
|
||||
BuildableName = "UIExplorerIntegrationTests.xctest"
|
||||
BlueprintName = "UIExplorerIntegrationTests"
|
||||
ReferencedContainer = "container:UIExplorer.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
@@ -89,9 +89,9 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "004D289D1AAF61C70097A701"
|
||||
BuildableName = "RNTesterUnitTests.xctest"
|
||||
BlueprintName = "RNTesterUnitTests"
|
||||
ReferencedContainer = "container:RNTester.xcodeproj">
|
||||
BuildableName = "UIExplorerUnitTests.xctest"
|
||||
BlueprintName = "UIExplorerUnitTests"
|
||||
ReferencedContainer = "container:UIExplorer.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
<TestableReference
|
||||
@@ -99,9 +99,9 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "143BC5941B21E3E100462512"
|
||||
BuildableName = "RNTesterIntegrationTests.xctest"
|
||||
BlueprintName = "RNTesterIntegrationTests"
|
||||
ReferencedContainer = "container:RNTester.xcodeproj">
|
||||
BuildableName = "UIExplorerIntegrationTests.xctest"
|
||||
BlueprintName = "UIExplorerIntegrationTests"
|
||||
ReferencedContainer = "container:UIExplorer.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
@@ -109,9 +109,9 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||
BuildableName = "RNTester.app"
|
||||
BlueprintName = "RNTester"
|
||||
ReferencedContainer = "container:RNTester.xcodeproj">
|
||||
BuildableName = "UIExplorer.app"
|
||||
BlueprintName = "UIExplorer"
|
||||
ReferencedContainer = "container:UIExplorer.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
@@ -132,9 +132,9 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||
BuildableName = "RNTester.app"
|
||||
BlueprintName = "RNTester"
|
||||
ReferencedContainer = "container:RNTester.xcodeproj">
|
||||
BuildableName = "UIExplorer.app"
|
||||
BlueprintName = "UIExplorer"
|
||||
ReferencedContainer = "container:UIExplorer.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<EnvironmentVariables>
|
||||
@@ -158,9 +158,9 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||
BuildableName = "RNTester.app"
|
||||
BlueprintName = "RNTester"
|
||||
ReferencedContainer = "container:RNTester.xcodeproj">
|
||||
BuildableName = "UIExplorer.app"
|
||||
BlueprintName = "UIExplorer"
|
||||
ReferencedContainer = "container:UIExplorer.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* The examples provided by Facebook are for non-commercial testing and
|
||||
* evaluation purposes only.
|
||||
*
|
||||
* Facebook reserves all rights not expressly granted.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
|
||||
* FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@class RCTBridge;
|
||||
|
||||
@interface AppDelegate : UIResponder <UIApplicationDelegate>
|
||||
|
||||
@property (nonatomic, strong) UIWindow *window;
|
||||
@property (nonatomic, readonly) RCTBridge *bridge;
|
||||
|
||||
@end
|
||||
@@ -1,11 +1,15 @@
|
||||
/**
|
||||
* Copyright (c) 2015-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
* The examples provided by Facebook are for non-commercial testing and
|
||||
* evaluation purposes only.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* Facebook reserves all rights not expressly granted.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
|
||||
* FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#import "AppDelegate.h"
|
||||
@@ -35,11 +39,11 @@
|
||||
NSDictionary *initProps = nil;
|
||||
NSString *_routeUri = [[NSUserDefaults standardUserDefaults] stringForKey:@"route"];
|
||||
if (_routeUri) {
|
||||
initProps = @{@"exampleFromAppetizeParams": [NSString stringWithFormat:@"rntester://example/%@Example", _routeUri]};
|
||||
initProps = @{@"exampleFromAppetizeParams": [NSString stringWithFormat:@"rnuiexplorer://example/%@Example", _routeUri]};
|
||||
}
|
||||
|
||||
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:_bridge
|
||||
moduleName:@"RNTesterApp"
|
||||
moduleName:@"UIExplorerApp"
|
||||
initialProperties:initProps];
|
||||
|
||||
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
|
||||
@@ -52,16 +56,10 @@
|
||||
|
||||
- (NSURL *)sourceURLForBridge:(__unused RCTBridge *)bridge
|
||||
{
|
||||
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"RNTester/js/RNTesterApp.ios"
|
||||
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"Examples/UIExplorer/js/UIExplorerApp.ios"
|
||||
fallbackResource:nil];
|
||||
}
|
||||
|
||||
- (BOOL)application:(UIApplication *)app
|
||||
openURL:(NSURL *)url
|
||||
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
|
||||
{
|
||||
return [RCTLinkingManager application:app openURL:url options:options];
|
||||
}
|
||||
|
||||
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
|
||||
sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
|
||||
@@ -1,13 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12120" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9059" systemVersion="15A284" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12088"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
|
||||
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
@@ -18,18 +14,21 @@
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2015 Facebook. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
|
||||
<rect key="frame" x="20" y="439" width="441" height="21"/>
|
||||
<animations/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="RNTester" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="UIExplorer" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
|
||||
<rect key="frame" x="20" y="140" width="441" height="43"/>
|
||||
<animations/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
|
||||
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
|
||||
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 166 B After Width: | Height: | Size: 166 B |
|
Before Width: | Height: | Size: 657 B After Width: | Height: | Size: 657 B |
|
Before Width: | Height: | Size: 360 B After Width: | Height: | Size: 360 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
@@ -27,7 +27,7 @@
|
||||
<string>com.reactjs.ios</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>rntester</string>
|
||||
<string>rnuiexplorer</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* The examples provided by Facebook are for non-commercial testing and
|
||||
* evaluation purposes only.
|
||||
*
|
||||
* Facebook reserves all rights not expressly granted.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
|
||||
* FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import <React/RCTView.h>
|
||||
|
||||
@interface FlexibleSizeExampleView : RCTView
|
||||
|
||||
@end
|
||||
@@ -1,11 +1,15 @@
|
||||
/**
|
||||
* Copyright (c) 2015-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
* The examples provided by Facebook are for non-commercial testing and
|
||||
* evaluation purposes only.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* Facebook reserves all rights not expressly granted.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
|
||||
* FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#import "FlexibleSizeExampleView.h"
|
||||
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* The examples provided by Facebook are for non-commercial testing and
|
||||
* evaluation purposes only.
|
||||
*
|
||||
* Facebook reserves all rights not expressly granted.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
|
||||
* FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import <React/RCTView.h>
|
||||
|
||||
@interface UpdatePropertiesExampleView : RCTView
|
||||
|
||||
@end
|
||||
@@ -1,11 +1,15 @@
|
||||
/**
|
||||
* Copyright (c) 2015-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
* The examples provided by Facebook are for non-commercial testing and
|
||||
* evaluation purposes only.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* Facebook reserves all rights not expressly granted.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
|
||||
* FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#import "UpdatePropertiesExampleView.h"
|
||||
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 61 KiB |
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* The examples provided by Facebook are for non-commercial testing and
|
||||
* evaluation purposes only.
|
||||
*
|
||||
* Facebook reserves all rights not expressly granted.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
|
||||
* FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "AppDelegate.h"
|
||||
|
||||
int main(int argc, char * argv[]) {
|
||||
@autoreleasepool {
|
||||
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,7 @@
|
||||
BlueprintIdentifier = "2D2A28121D9B038B00D4039D"
|
||||
BuildableName = "libReact.a"
|
||||
BlueprintName = "React-tvOS"
|
||||
ReferencedContainer = "container:../React/ReactLegacy.xcodeproj">
|
||||
ReferencedContainer = "container:../../React/ReactCxx.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
@@ -29,9 +29,9 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "3D13F83D1D6F6AE000E69E0E"
|
||||
BuildableName = "RNTesterBundle.bundle"
|
||||
BlueprintName = "RNTesterBundle"
|
||||
ReferencedContainer = "container:RNTesterLegacy.xcodeproj">
|
||||
BuildableName = "UIExplorerBundle.bundle"
|
||||
BlueprintName = "UIExplorerBundle"
|
||||
ReferencedContainer = "container:UIExplorerCxx.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
@@ -43,9 +43,9 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2DD3238F1DA2DD8A000FE1B8"
|
||||
BuildableName = "RNTester-tvOS.app"
|
||||
BlueprintName = "RNTester-tvOS"
|
||||
ReferencedContainer = "container:RNTesterLegacy.xcodeproj">
|
||||
BuildableName = "UIExplorer-tvOS.app"
|
||||
BlueprintName = "UIExplorer-tvOS"
|
||||
ReferencedContainer = "container:UIExplorerCxx.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
@@ -61,9 +61,9 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2DD323A41DA2DD8B000FE1B8"
|
||||
BuildableName = "RNTester-tvOSUnitTests.xctest"
|
||||
BlueprintName = "RNTester-tvOSUnitTests"
|
||||
ReferencedContainer = "container:RNTesterLegacy.xcodeproj">
|
||||
BuildableName = "UIExplorer-tvOSUnitTests.xctest"
|
||||
BlueprintName = "UIExplorer-tvOSUnitTests"
|
||||
ReferencedContainer = "container:UIExplorerCxx.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
<TestableReference
|
||||
@@ -71,9 +71,9 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2D4624C11DA2EA6900C74D09"
|
||||
BuildableName = "RNTester-tvOSIntegrationTests.xctest"
|
||||
BlueprintName = "RNTester-tvOSIntegrationTests"
|
||||
ReferencedContainer = "container:RNTesterLegacy.xcodeproj">
|
||||
BuildableName = "UIExplorer-tvOSIntegrationTests.xctest"
|
||||
BlueprintName = "UIExplorer-tvOSIntegrationTests"
|
||||
ReferencedContainer = "container:UIExplorerCxx.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
@@ -81,9 +81,9 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2DD3238F1DA2DD8A000FE1B8"
|
||||
BuildableName = "RNTester-tvOS.app"
|
||||
BlueprintName = "RNTester-tvOS"
|
||||
ReferencedContainer = "container:RNTesterLegacy.xcodeproj">
|
||||
BuildableName = "UIExplorer-tvOS.app"
|
||||
BlueprintName = "UIExplorer-tvOS"
|
||||
ReferencedContainer = "container:UIExplorerCxx.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
@@ -104,9 +104,9 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2DD3238F1DA2DD8A000FE1B8"
|
||||
BuildableName = "RNTester-tvOS.app"
|
||||
BlueprintName = "RNTester-tvOS"
|
||||
ReferencedContainer = "container:RNTesterLegacy.xcodeproj">
|
||||
BuildableName = "UIExplorer-tvOS.app"
|
||||
BlueprintName = "UIExplorer-tvOS"
|
||||
ReferencedContainer = "container:UIExplorerCxx.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
@@ -123,9 +123,9 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2DD3238F1DA2DD8A000FE1B8"
|
||||
BuildableName = "RNTester-tvOS.app"
|
||||
BlueprintName = "RNTester-tvOS"
|
||||
ReferencedContainer = "container:RNTesterLegacy.xcodeproj">
|
||||
BuildableName = "UIExplorer-tvOS.app"
|
||||
BlueprintName = "UIExplorer-tvOS"
|
||||
ReferencedContainer = "container:UIExplorerCxx.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
@@ -17,7 +17,7 @@
|
||||
BlueprintIdentifier = "83CBBA2D1A601D0E00E9B192"
|
||||
BuildableName = "libReact.a"
|
||||
BlueprintName = "React"
|
||||
ReferencedContainer = "container:../React/ReactLegacy.xcodeproj">
|
||||
ReferencedContainer = "container:../../React/ReactCxx.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
@@ -29,9 +29,9 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "3D13F83D1D6F6AE000E69E0E"
|
||||
BuildableName = "RNTesterBundle.bundle"
|
||||
BlueprintName = "RNTesterBundle"
|
||||
ReferencedContainer = "container:RNTesterLegacy.xcodeproj">
|
||||
BuildableName = "UIExplorerBundle.bundle"
|
||||
BlueprintName = "UIExplorerBundle"
|
||||
ReferencedContainer = "container:UIExplorerCxx.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
@@ -43,9 +43,9 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||
BuildableName = "RNTester.app"
|
||||
BlueprintName = "RNTester"
|
||||
ReferencedContainer = "container:RNTesterLegacy.xcodeproj">
|
||||
BuildableName = "UIExplorer.app"
|
||||
BlueprintName = "UIExplorer"
|
||||
ReferencedContainer = "container:UIExplorerCxx.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
@@ -57,9 +57,9 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "004D289D1AAF61C70097A701"
|
||||
BuildableName = "RNTesterUnitTests.xctest"
|
||||
BlueprintName = "RNTesterUnitTests"
|
||||
ReferencedContainer = "container:RNTesterLegacy.xcodeproj">
|
||||
BuildableName = "UIExplorerUnitTests.xctest"
|
||||
BlueprintName = "UIExplorerUnitTests"
|
||||
ReferencedContainer = "container:UIExplorerCxx.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
@@ -71,9 +71,9 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "143BC5941B21E3E100462512"
|
||||
BuildableName = "RNTesterIntegrationTests.xctest"
|
||||
BlueprintName = "RNTesterIntegrationTests"
|
||||
ReferencedContainer = "container:RNTesterLegacy.xcodeproj">
|
||||
BuildableName = "UIExplorerIntegrationTests.xctest"
|
||||
BlueprintName = "UIExplorerIntegrationTests"
|
||||
ReferencedContainer = "container:UIExplorerCxx.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
@@ -89,9 +89,9 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "004D289D1AAF61C70097A701"
|
||||
BuildableName = "RNTesterUnitTests.xctest"
|
||||
BlueprintName = "RNTesterUnitTests"
|
||||
ReferencedContainer = "container:RNTesterLegacy.xcodeproj">
|
||||
BuildableName = "UIExplorerUnitTests.xctest"
|
||||
BlueprintName = "UIExplorerUnitTests"
|
||||
ReferencedContainer = "container:UIExplorerCxx.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
<TestableReference
|
||||
@@ -99,9 +99,9 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "143BC5941B21E3E100462512"
|
||||
BuildableName = "RNTesterIntegrationTests.xctest"
|
||||
BlueprintName = "RNTesterIntegrationTests"
|
||||
ReferencedContainer = "container:RNTesterLegacy.xcodeproj">
|
||||
BuildableName = "UIExplorerIntegrationTests.xctest"
|
||||
BlueprintName = "UIExplorerIntegrationTests"
|
||||
ReferencedContainer = "container:UIExplorerCxx.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
@@ -109,9 +109,9 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||
BuildableName = "RNTester.app"
|
||||
BlueprintName = "RNTester"
|
||||
ReferencedContainer = "container:RNTesterLegacy.xcodeproj">
|
||||
BuildableName = "UIExplorer.app"
|
||||
BlueprintName = "UIExplorer"
|
||||
ReferencedContainer = "container:UIExplorerCxx.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
@@ -132,9 +132,9 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||
BuildableName = "RNTester.app"
|
||||
BlueprintName = "RNTester"
|
||||
ReferencedContainer = "container:RNTesterLegacy.xcodeproj">
|
||||
BuildableName = "UIExplorer.app"
|
||||
BlueprintName = "UIExplorer"
|
||||
ReferencedContainer = "container:UIExplorerCxx.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<EnvironmentVariables>
|
||||
@@ -158,9 +158,9 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||
BuildableName = "RNTester.app"
|
||||
BlueprintName = "RNTester"
|
||||
ReferencedContainer = "container:RNTesterLegacy.xcodeproj">
|
||||
BuildableName = "UIExplorer.app"
|
||||
BlueprintName = "UIExplorer"
|
||||
ReferencedContainer = "container:UIExplorerCxx.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
@@ -1,11 +1,15 @@
|
||||
/**
|
||||
* Copyright (c) 2015-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
* The examples provided by Facebook are for non-commercial testing and
|
||||
* evaluation purposes only.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* Facebook reserves all rights not expressly granted.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
|
||||
* FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#import <XCTest/XCTest.h>
|
||||
@@ -5,7 +5,22 @@
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
//vs
|
||||
|
||||
/**
|
||||
* The examples provided by Facebook are for non-commercial testing and
|
||||
* evaluation purposes only.
|
||||
*
|
||||
* Facebook reserves all rights not expressly granted.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
|
||||
* FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
@@ -17,7 +32,7 @@
|
||||
#import <React/RCTRootViewDelegate.h>
|
||||
|
||||
#define RCT_TEST_DATA_CONFIGURATION_BLOCK(appName, testType, input, block) \
|
||||
- (void)DISABLED_test##appName##_##testType##_##input \
|
||||
- (void)test##appName##_##testType##_##input \
|
||||
{ \
|
||||
[_runner runTest:_cmd \
|
||||
module:@#appName \
|
||||
@@ -26,7 +41,7 @@ configurationBlock:block]; \
|
||||
}
|
||||
|
||||
#define RCT_TEST_CONFIGURATION_BLOCK(appName, block) \
|
||||
- (void)DISABLED_test##appName \
|
||||
- (void)test##appName \
|
||||
{ \
|
||||
[_runner runTest:_cmd \
|
||||
module:@#appName \
|
||||
@@ -140,8 +155,9 @@ RCT_TEST_DATA_CONFIGURATION_BLOCK(SizeFlexibilityUpdateTest, MultipleUpdates, bo
|
||||
RCT_TEST_CONFIGURATION_BLOCK(ReactContentSizeUpdateTest, reactContentSizeUpdateBlock(RCTBoth))
|
||||
|
||||
// Test if setting 'appProperties' property updates the RN app
|
||||
RCT_TEST_CONFIGURATION_BLOCK(PropertiesUpdateTest, ^(RCTRootView *rootView) {
|
||||
rootView.appProperties = @{@"markTestPassed":@YES};
|
||||
})
|
||||
// Disabled since it's occassionally crashing
|
||||
// RCT_TEST_CONFIGURATION_BLOCK(PropertiesUpdateTest, ^(RCTRootView *rootView) {
|
||||
// rootView.appProperties = @{@"markTestPassed":@YES};
|
||||
// })
|
||||
|
||||
@end
|
||||
@@ -1,11 +1,15 @@
|
||||
/**
|
||||
* Copyright (c) 2015-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
* The examples provided by Facebook are for non-commercial testing and
|
||||
* evaluation purposes only.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* Facebook reserves all rights not expressly granted.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
|
||||
* FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
After Width: | Height: | Size: 153 KiB |
|
After Width: | Height: | Size: 89 KiB |
|
After Width: | Height: | Size: 153 KiB |
|
After Width: | Height: | Size: 88 KiB |
|
After Width: | Height: | Size: 130 KiB |
|
After Width: | Height: | Size: 90 KiB |
|
After Width: | Height: | Size: 130 KiB |
|
After Width: | Height: | Size: 89 KiB |
|
After Width: | Height: | Size: 182 KiB |
|
After Width: | Height: | Size: 182 KiB |
|
After Width: | Height: | Size: 147 KiB |
|
After Width: | Height: | Size: 147 KiB |
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |
|
After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |
|
After Width: | Height: | Size: 49 KiB |
|
After Width: | Height: | Size: 365 KiB |
|
After Width: | Height: | Size: 127 KiB |
|
After Width: | Height: | Size: 365 KiB |
|
After Width: | Height: | Size: 124 KiB |
|
After Width: | Height: | Size: 175 KiB |
|
After Width: | Height: | Size: 96 KiB |
|
After Width: | Height: | Size: 175 KiB |
|
After Width: | Height: | Size: 95 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
@@ -26,11 +26,11 @@
|
||||
} \
|
||||
}
|
||||
|
||||
@interface RNTesterIntegrationTests : XCTestCase
|
||||
@interface UIExplorerIntegrationTests : XCTestCase
|
||||
|
||||
@end
|
||||
|
||||
@implementation RNTesterIntegrationTests
|
||||
@implementation UIExplorerIntegrationTests
|
||||
{
|
||||
RCTTestRunner *_runner;
|
||||
}
|
||||
@@ -71,13 +71,8 @@ RCT_TEST(ImageCachePolicyTest)
|
||||
RCT_TEST(ImageSnapshotTest)
|
||||
//RCT_TEST(LayoutEventsTest) // Disabled due to flakiness: #8686784
|
||||
RCT_TEST(SimpleSnapshotTest)
|
||||
RCT_TEST(SyncMethodTest)
|
||||
RCT_TEST(PromiseTest)
|
||||
RCT_TEST_ONLY_WITH_PACKAGER(WebSocketTest)
|
||||
RCT_TEST(AccessibilityManagerTest)
|
||||
|
||||
#if !TARGET_OS_TV // tvOS does not fully support WebView
|
||||
RCT_TEST(WebViewTest)
|
||||
#endif
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,61 @@
|
||||
/**
|
||||
* The examples provided by Facebook are for non-commercial testing and
|
||||
* evaluation purposes only.
|
||||
*
|
||||
* Facebook reserves all rights not expressly granted.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
|
||||
* FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <XCTest/XCTest.h>
|
||||
|
||||
#import <RCTTest/RCTTestRunner.h>
|
||||
|
||||
@interface UIExplorerSnapshotTests : XCTestCase
|
||||
{
|
||||
RCTTestRunner *_runner;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation UIExplorerSnapshotTests
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
_runner = RCTInitRunnerForApp(@"Examples/UIExplorer/js/UIExplorerApp.ios", nil);
|
||||
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 10) {
|
||||
_runner.testSuffix = @"-iOS10";
|
||||
}
|
||||
_runner.recordMode = NO;
|
||||
}
|
||||
|
||||
#define RCT_TEST(name) \
|
||||
- (void)test##name \
|
||||
{ \
|
||||
[_runner runTest:_cmd module:@#name]; \
|
||||
}
|
||||
|
||||
RCT_TEST(ViewExample)
|
||||
RCT_TEST(LayoutExample)
|
||||
RCT_TEST(ScrollViewExample)
|
||||
RCT_TEST(TextExample)
|
||||
#if !TARGET_OS_TV
|
||||
// No switch or slider available on tvOS
|
||||
RCT_TEST(SwitchExample)
|
||||
RCT_TEST(SliderExample)
|
||||
// TabBarExample on tvOS passes locally but not on Travis
|
||||
RCT_TEST(TabBarExample)
|
||||
#endif
|
||||
|
||||
- (void)testZZZNotInRecordMode
|
||||
{
|
||||
XCTAssertFalse(_runner.recordMode, @"Don't forget to turn record mode back to off");
|
||||
}
|
||||
|
||||
@end
|
||||
|
Before Width: | Height: | Size: 128 B After Width: | Height: | Size: 128 B |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 129 B |