diff --git a/.ado/android-pr.yml b/.ado/android-pr.yml
index 15ca618a20ec0f..a7c4b1bc37fabc 100644
--- a/.ado/android-pr.yml
+++ b/.ado/android-pr.yml
@@ -78,10 +78,10 @@ jobs:
#verbosityPack: 'Detailed' # Options: quiet, normal, detailed
#arguments: # Required when command == Custom
- - task: CmdLine@2
- displayName: Setup Build Dependencies
- inputs:
- script: .ado\setup_droid_deps.bat
+# - task: CmdLine@2
+# displayName: Setup Build Dependencies
+# inputs:
+# script: .ado\setup_droid_deps.bat
- task: CmdLine@2
displayName: Remove RNTesterApp.android.bundle
@@ -95,8 +95,8 @@ jobs:
- task: Gradle@1
displayName: gradlew installArchives
- env:
- REACT_NATIVE_DEPENDENCIES: $(System.DefaultWorkingDirectory)\build_deps
+# env:
+# REACT_NATIVE_DEPENDENCIES: $(System.DefaultWorkingDirectory)\build_deps
inputs:
gradleWrapperFile: gradlew
# workingDirectory: src\react-native\
diff --git a/.ado/publish.yml b/.ado/publish.yml
index 57f088b307a20e..15324a87fd56cf 100644
--- a/.ado/publish.yml
+++ b/.ado/publish.yml
@@ -157,15 +157,15 @@ jobs:
#verbosityPack: 'Detailed' # Options: quiet, normal, detailed
#arguments: # Required when command == Custom
- - task: CmdLine@2
- displayName: Setup Build Dependencies
- inputs:
- script: .ado\setup_droid_deps.bat
+# - task: CmdLine@2
+# displayName: Setup Build Dependencies
+# inputs:
+# script: .ado\setup_droid_deps.bat
- task: Gradle@1
displayName: gradlew installArchives
- env:
- REACT_NATIVE_DEPENDENCIES: $(System.DefaultWorkingDirectory)\build_deps
+# env:
+# REACT_NATIVE_DEPENDENCIES: $(System.DefaultWorkingDirectory)\build_deps
inputs:
gradleWrapperFile: gradlew
# workingDirectory: src\react-native\
diff --git a/.ado/templates/apple-droid-node-patching.yml b/.ado/templates/apple-droid-node-patching.yml
index 6906d373537dfc..3b56bbbb9a99fb 100644
--- a/.ado/templates/apple-droid-node-patching.yml
+++ b/.ado/templates/apple-droid-node-patching.yml
@@ -5,4 +5,4 @@ steps:
- task: CmdLine@2
displayName: Apply Android specific patches for Office consumption
inputs:
- script: node $(System.DefaultWorkingDirectory)/android-patches/bundle/bundle.js patch $(System.DefaultWorkingDirectory) BuildAndThirdPartyFixes DialogModule UIEditText UIScroll UITextFont Accessibility OfficeRNHost SecurityFixes V8Integration AnnotationProcessing --patch-store $(System.DefaultWorkingDirectory)/android-patches/patches-droid-office-grouped --log-folder $(System.DefaultWorkingDirectory)/android-patches/logs --confirm ${{ parameters.apply_office_patches }}
+ script: node $(System.DefaultWorkingDirectory)/android-patches/bundle/bundle.js patch $(System.DefaultWorkingDirectory) BasicBuild V8Integration --patch-store $(System.DefaultWorkingDirectory)/android-patches/patches-0.61.5 --log-folder $(System.DefaultWorkingDirectory)/android-patches/logs --confirm ${{ parameters.apply_office_patches }}
diff --git a/.ado/templates/apple-job-react-native.yml b/.ado/templates/apple-job-react-native.yml
index da7d019b998943..32192ab8e36f71 100644
--- a/.ado/templates/apple-job-react-native.yml
+++ b/.ado/templates/apple-job-react-native.yml
@@ -32,6 +32,13 @@ steps:
inputs:
script: yarn install
+ - task: CmdLine@2
+ displayName: pod install
+ inputs:
+ script: |
+ cd RNTester
+ pod install
+
- task: ShellScript@2
displayName: 'Setup packager and WebSocket test server'
inputs:
@@ -50,7 +57,7 @@ steps:
parameters:
xcode_sdk: ${{ parameters.xcode_sdk }}
xcode_configuration: Debug
- xcode_workspacePath: RNTester/RNTester.xcodeproj
+ xcode_workspacePath: RNTester/RNTesterPods.xcworkspace
xcode_scheme: ${{ parameters.xcode_scheme }}
xcode_actions: ${{ parameters.xcode_actions_debug }}
xcode_useXcpretty: true
@@ -60,7 +67,7 @@ steps:
parameters:
xcode_sdk: ${{ parameters.xcode_sdk }}
xcode_configuration: Release
- xcode_workspacePath: RNTester/RNTester.xcodeproj
+ xcode_workspacePath: RNTester/RNTesterPods.xcworkspace
xcode_scheme: ${{ parameters.xcode_scheme }}
xcode_actions: ${{ parameters.xcode_actions_release }}
xcode_useXcpretty: false
diff --git a/.ado/templates/prep-android-nuget.yml b/.ado/templates/prep-android-nuget.yml
index c890912c4b7b14..e7aec17def62f5 100644
--- a/.ado/templates/prep-android-nuget.yml
+++ b/.ado/templates/prep-android-nuget.yml
@@ -14,5 +14,5 @@ steps:
inputs:
targetType: inline # filePath | inline
script: |
- (Get-Content android\com\facebook\react\react-native\0.60.0\react-native-0.60.0.pom).replace('0.60.0', '1000.0.0-master') | Set-Content android\com\facebook\react\react-native\0.60.0\react-native-0.60.0.pom
+ (Get-Content android\com\facebook\react\react-native\0.61.5\react-native-0.61.5.pom).replace('0.61.5', '1000.0.0-master') | Set-Content android\com\facebook\react\react-native\0.61.5\react-native-0.61.5.pom
diff --git a/.appveyor/config.yml b/.appveyor/config.yml
index 545f955abeeaa2..ed8162cf135899 100644
--- a/.appveyor/config.yml
+++ b/.appveyor/config.yml
@@ -1,13 +1,13 @@
environment:
ANDROID_HOME: "C:\\android-sdk-windows"
- ANDROID_NDK: "C:\\android-sdk-windows\\android-ndk-r17c"
+ ANDROID_NDK: "C:\\android-sdk-windows\\android-ndk-r19c"
ANDROID_BUILD_VERSION: 28
ANDROID_TOOLS_VERSION: 28.0.3
GRADLE_OPTS: -Dorg.gradle.daemon=false
SDK_TOOLS_URL: https://dl.google.com/android/repository/sdk-tools-windows-3859397.zip
- NDK_TOOLS_URL: https://dl.google.com/android/repository/android-ndk-r17c-windows-x86_64.zip
+ NDK_TOOLS_URL: https://dl.google.com/android/repository/android-ndk-r19c-windows-x86_64.zip
matrix:
- nodejs_version: 8
@@ -38,7 +38,7 @@ build_script:
- yarn run flow-check-android
- yarn run flow-check-ios
- yarn run test
- - gradlew.bat RNTester:android:app:assembleRelease
+ # - gradlew.bat RNTester:android:app:assembleRelease
cache:
- node_modules
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 5205521678b026..0c9449e4c9bb44 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -1,143 +1,4 @@
-# -------------------------
-# ALIASES
-# -------------------------
-aliases:
- # -------------------------
- # ALIASES: Caches
- # -------------------------
- - &restore-yarn-cache
- keys:
- - v1-yarn-cache-{{ arch }}-{{ checksum "package.json" }}{{ checksum "bots/package.json" }}
- - v1-yarn-cache-{{ arch }}
-
- - &save-yarn-cache
- paths:
- - ~/.cache/yarn
- key: v1-yarn-cache-{{ arch }}-{{ checksum "package.json" }}{{ checksum "bots/package.json" }}
-
- - &restore-brew-cache
- keys:
- - v1-brew
-
- - &save-brew-cache
- paths:
- - /usr/local/Homebrew
- - ~/Library/Caches/Homebrew
- key: v1-brew
-
- # Android
- - &restore-buck-downloads-cache
- keys:
- - v3-buck-v2019.01.10.01-{{ checksum "scripts/circleci/buck_fetch.sh" }}}
- - v3-buck-v2019.01.10.01-
- - &save-buck-downloads-cache
- paths:
- - ~/buck
- - ~/okbuck
- key: v3-buck-v2019.01.10.01-{{ checksum "scripts/circleci/buck_fetch.sh" }}
-
- - &restore-gradle-downloads-cache
- keys:
- - v1-gradle-{{ checksum "ReactAndroid/build.gradle" }}-{{ checksum "scripts/circleci/gradle_download_deps.sh" }}
- - v1-gradle-
-
- - &save-gradle-downloads-cache
- paths:
- - ~/.gradle
- - ReactAndroid/build/downloads
- - ReactAndroid/build/third-party-ndk
- key: v1-gradle-{{ checksum "ReactAndroid/build.gradle" }}-{{ checksum "scripts/circleci/gradle_download_deps.sh" }}
-
- # -------------------------
- # ALIASES: Shared Commands
- # -------------------------
- - &yarn
- name: Run Yarn
- command: |
- # Skip yarn install on metro bump commits as the package is not yet
- # available on npm
- if [[ $(echo "$GIT_COMMIT_DESC" | grep -c "Bump metro@") -eq 0 ]]; then
- yarn install --non-interactive --cache-folder ~/.cache/yarn
- fi
-
- - &setup-artifacts
- name: Initial Setup
- command: |
- mkdir -p ~/react-native/reports/buck/
- mkdir -p ~/react-native/reports/build/
- mkdir -p ~/react-native/reports/junit/
- mkdir -p ~/react-native/reports/outputs/
-
- # Android
- - &download-dependencies-buck
- name: Download Dependencies Using Buck
- command: ./scripts/circleci/buck_fetch.sh
-
- - &download-dependencies-gradle
- name: Download Dependencies Using Gradle
- command: ./scripts/circleci/gradle_download_deps.sh
-
- # JavaScript
- - &run-js-tests
- name: JavaScript Test Suite
- command: yarn test-ci
-
- # -------------------------
- # ALIASES: Disabled Tests
- # -------------------------
- - &run-podspec-tests
- name: Test CocoaPods
- command: ./scripts/process-podspecs.sh
- - &run-e2e-tests
- name: End-to-End Test Suite
- command: ./scripts/run-ci-e2e-tests.js --android --ios --js --retries 3;
- - &run-android-e2e-tests
- name: Android End-to-End Test Suite
- command: node ./scripts/run-ci-e2e-tests.js --android --retries 3;
-
-
- # -------------------------
- # ALIASES: Branch Filters
- # -------------------------
- - &filter-only-master
- branches:
- only: master
-
- - &filter-only-master-stable
- branches:
- only:
- - /.*-stable/
- - master
-
- - &filter-only-stable
- branches:
- only:
- - /.*-stable/
-
- - &filter-ignore-gh-pages
- branches:
- ignore: gh-pages
-
- - &filter-only-version-tags
- # Both of the following conditions must be included!
- # Ignore any commit on any branch by default.
- branches:
- ignore: /.*/
- # Only act on version tags.
- tags:
- only: /v[0-9]+(\.[0-9]+)*(\-rc(\.[0-9]+)?)?/
-
- - &filter-only-forked-pull-requests
- branches:
- only: /^pull\/.*$/
-
- # -------------------------
- # ALIASES: Workflows
- # -------------------------
- - &run-after-checkout
- filters: *filter-ignore-gh-pages
- requires:
- - checkout_code
+version: 2.1
# -------------------------
# DEFAULTS
@@ -147,50 +8,194 @@ defaults: &defaults
environment:
- GIT_COMMIT_DESC: git log --format=oneline -n 1 $CIRCLE_SHA1
-# JavaScript
-js_defaults: &js_defaults
- <<: *defaults
- docker:
- - image: node:8
-
-# Android
-android_defaults: &android_defaults
- <<: *defaults
- docker:
- - image: reactnativecommunity/react-native-android:2019-5-29
- 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"'
- - BUILD_THREADS: 2
-
-# iOS
-macos_defaults: &macos_defaults
- <<: *defaults
- macos:
- xcode: "10.2.0"
+# -------------------------
+# EXECUTORS
+# -------------------------
+executors:
+ node8:
+ <<: *defaults
+ docker:
+ - image: circleci/node:8
+ nodelts:
+ <<: *defaults
+ docker:
+ - image: circleci/node:lts
+ reactnativeandroid:
+ <<: *defaults
+ docker:
+ - image: reactnativecommunity/react-native-android:2019-6-4
+ 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"'
+ - BUILD_THREADS: 2
+ reactnativeios:
+ <<: *defaults
+ macos:
+ xcode: "10.2.1"
+
+# -------------------------
+# COMMANDS
+# -------------------------
+commands:
+ restore_cache_checkout:
+ parameters:
+ checkout_type:
+ type: string
+ default: node
+ steps:
+ - restore_cache:
+ key: v1-repo-{{ .Environment.CIRCLE_SHA1 }}-<< parameters.checkout_type >>
+
+ setup_artifacts:
+ steps:
+ - run:
+ name: Initial Setup
+ command: mkdir -p ~/reports/{buck,build,junit,outputs}
+
+ run_yarn:
+ steps:
+ - restore_cache:
+ keys:
+ - v4-yarn-cache-{{ arch }}-{{ checksum "yarn.lock" }}
+ - v4-yarn-cache-{{ arch }}
+ - run:
+ name: Run Yarn
+ command: |
+ # Skip yarn install on metro bump commits as the package is not yet
+ # available on npm
+ if [[ $(echo "$GIT_COMMIT_DESC" | grep -c "Bump metro@") -eq 0 ]]; then
+ yarn install --non-interactive --cache-folder ~/.cache/yarn
+ fi
+ - save_cache:
+ paths:
+ - ~/.cache/yarn
+ key: v4-yarn-cache-{{ arch }}-{{ checksum "yarn.lock" }}
+
+ install_buck_tooling:
+ steps:
+ - restore_cache:
+ keys:
+ - v4-buck-v2019.01.10.01-{{ checksum "scripts/circleci/buck_fetch.sh" }}}
+ - v4-buck-v2019.01.10.01-
+ - run:
+ name: Install BUCK
+ command: |
+ buck --version
+ # Install related tooling
+ if [[ ! -e ~/okbuck ]]; then
+ git clone https://github.com/uber/okbuck.git ~/okbuck --depth=1
+ fi
+ - save_cache:
+ paths:
+ - ~/buck
+ - ~/okbuck
+ key: v4-buck-v2019.01.10.01-{{ checksum "scripts/circleci/buck_fetch.sh" }}
+
+ brew_install:
+ parameters:
+ package:
+ description: Homebrew package to install
+ type: string
+ steps:
+ - run: HOMEBREW_NO_AUTO_UPDATE=1 brew install << parameters.package >> >/dev/null
+
+ with_brew_cache_span:
+ parameters:
+ steps:
+ type: steps
+ steps:
+ - restore_cache:
+ keys:
+ - v1-brew
+ - steps: << parameters.steps >>
+ - save_cache:
+ paths:
+ - /usr/local/Homebrew
+ - ~/Library/Caches/Homebrew
+ key: v1-brew
+
+ with_pods_cache_span:
+ parameters:
+ steps:
+ type: steps
+ steps:
+ - run:
+ name: Setup CocoaPods cache
+ # Copy RNTester/Podfile.lock since it can be changed by pod install
+ command: cp RNTester/Podfile.lock RNTester/Podfile.lock.bak
+ - restore_cache:
+ keys:
+ - v1-pods-{{ .Environment.CIRCLE_JOB }}-{{ checksum "RNTester/Podfile.lock.bak" }}
+ - v1-pods-{{ .Environment.CIRCLE_JOB }}-
+ - steps: << parameters.steps >>
+ - save_cache:
+ paths:
+ - RNTester/Pods
+ key: v1-pods-{{ .Environment.CIRCLE_JOB }}-{{ checksum "RNTester/Podfile.lock.bak" }}
+
+ download_gradle_dependencies:
+ steps:
+ - restore_cache:
+ keys:
+ - v1-gradle-{{ checksum "ReactAndroid/build.gradle" }}-{{ checksum "scripts/circleci/gradle_download_deps.sh" }}
+ - v1-gradle-
+ - run:
+ name: Download Dependencies Using Gradle
+ command: ./scripts/circleci/gradle_download_deps.sh
+ - save_cache:
+ paths:
+ - ~/.gradle
+ - ReactAndroid/build/downloads
+ - ReactAndroid/build/third-party-ndk
+ key: v1-gradle-{{ checksum "ReactAndroid/build.gradle" }}-{{ checksum "scripts/circleci/gradle_download_deps.sh" }}
+
+ download_buck_dependencies:
+ steps:
+ - run:
+ name: Download Dependencies Using Buck
+ command: ./scripts/circleci/buck_fetch.sh
+
+ # -------------------------
+ # COMMANDS: Disabled Tests
+ # -------------------------
+ run_podspec_tests:
+ steps:
+ - run:
+ name: Test CocoaPods
+ command: ./scripts/process-podspecs.sh
+ run_e2e_tests:
+ steps:
+ - run:
+ name: Full End-to-End Test Suite
+ command: node ./scripts/run-ci-e2e-tests.js --android --ios --js --retries 3;
+ run_android_e2e_tests:
+ steps:
+ - run:
+ name: Android End-to-End Test Suite
+ command: node ./scripts/run-ci-e2e-tests.js --android --retries 3;
# -------------------------
# JOBS
# -------------------------
-version: 2
jobs:
- # Set up a Node environment for downstream jobs
- checkout_code:
- <<: *js_defaults
+ setup:
+ parameters:
+ executor:
+ type: executor
+ default: node8
+ checkout_type:
+ type: string
+ default: node
+ executor: << parameters.executor >>
steps:
- checkout
- - run: *setup-artifacts
-
- - restore-cache: *restore-yarn-cache
- - run: *yarn
- - save-cache: *save-yarn-cache
-
- - persist_to_workspace:
- root: .
- paths: .
+ - save_cache:
+ key: v1-repo-{{ .Environment.CIRCLE_SHA1 }}-<< parameters.checkout_type >>
+ paths:
+ - ~/react-native
# -------------------------
# JOBS: Analyze PR
@@ -199,9 +204,7 @@ jobs:
# Issues will be posted to the PR itself via GitHub bots.
# This workflow should only fail if the bots fail to run.
analyze_pr:
- <<: *defaults
- docker:
- - image: node:lts
+ executor: nodelts
# The public github tokens are publicly visible by design
environment:
- PUBLIC_PULLBOT_GITHUB_TOKEN_A: "a6edf8e8d40ce4e8b11a"
@@ -210,62 +213,42 @@ jobs:
- PUBLIC_ANALYSISBOT_GITHUB_TOKEN_B: "b1a98e0bbd56ff1ccba1"
steps:
- - checkout
- - run: *setup-artifacts
-
- - restore-cache: *restore-yarn-cache
- - run: *yarn
+ - restore_cache_checkout:
+ checkout_type: node
+ - run_yarn
- run:
- name: Analyze Shell Scripts
+ name: Install dependencies
command: |
- echo -e "\\x1B[36mInstalling additional dependencies\\x1B[0m"
- apt update && apt install -y shellcheck jq
- yarn add @octokit/rest@15.18.0
- echo -e "\\x1B[36mAnalyzing shell scripts\\x1B[0m"; \
- GITHUB_TOKEN="$PUBLIC_ANALYSISBOT_GITHUB_TOKEN_A""$PUBLIC_ANALYSISBOT_GITHUB_TOKEN_B" \
- GITHUB_OWNER="$CIRCLE_PROJECT_USERNAME" \
- GITHUB_REPO="$CIRCLE_PROJECT_REPONAME" \
- GITHUB_PR_NUMBER="$CIRCLE_PR_NUMBER" \
- ./scripts/circleci/analyze_scripts.sh
- when: always
+ sudo apt update && sudo apt install -y shellcheck jq
+ cd bots && yarn install --non-interactive --cache-folder ~/.cache/yarn
- run:
- name: Analyze Code
- command: |
- echo -e "\\x1B[36mInstalling additional dependencies\\x1B[0m"; yarn add @octokit/rest@15.18.0
- echo -e "\\x1B[36mAnalyzing code\\x1B[0m"; \
- GITHUB_TOKEN="$PUBLIC_ANALYSISBOT_GITHUB_TOKEN_A""$PUBLIC_ANALYSISBOT_GITHUB_TOKEN_B" \
- GITHUB_OWNER="$CIRCLE_PROJECT_USERNAME" \
- GITHUB_REPO="$CIRCLE_PROJECT_REPONAME" \
- GITHUB_PR_NUMBER="$CIRCLE_PR_NUMBER" \
- ./scripts/circleci/analyze_code.sh
+ name: Run linters against modified files (analysis-bot)
+ command: GITHUB_TOKEN="$PUBLIC_ANALYSISBOT_GITHUB_TOKEN_A""$PUBLIC_ANALYSISBOT_GITHUB_TOKEN_B" yarn lint-ci
when: always
- run:
- name: Analyze Pull Request
+ name: Analyze Pull Request (pull-bot)
command: |
- echo -e "\\x1B[36mInstalling additional dependencies\\x1B[0m"
cd bots
- yarn install --non-interactive --cache-folder ~/.cache/yarn
- echo -e "\\x1B[36mAnalyzing pull request\\x1B[0m"; \
- DANGER_GITHUB_API_TOKEN="$PUBLIC_PULLBOT_GITHUB_TOKEN_A""$PUBLIC_PULLBOT_GITHUB_TOKEN_B" \
- yarn danger ci --use-github-checks
+ DANGER_GITHUB_API_TOKEN="$PUBLIC_PULLBOT_GITHUB_TOKEN_A""$PUBLIC_PULLBOT_GITHUB_TOKEN_B" yarn danger ci --use-github-checks
when: always
- - save-cache: *save-yarn-cache
# -------------------------
# JOBS: Analyze Code
# -------------------------
- analyze:
- <<: *js_defaults
+ analyze_code:
+ executor: node8
steps:
- - attach_workspace:
- at: ~/react-native
+ - restore_cache_checkout:
+ checkout_type: node
+ - setup_artifacts
+ - run_yarn
- run:
name: Lint code
- command: scripts/circleci/exec_swallow_error.sh yarn lint --format junit -o ~/react-native/reports/junit/eslint/results.xml
+ command: scripts/circleci/exec_swallow_error.sh yarn lint --format junit -o ~/reports/junit/eslint/results.xml
when: always
- run:
@@ -291,173 +274,91 @@ jobs:
when: always
- store_test_results:
- path: ~/react-native/reports/junit
- - store_artifacts:
- path: ~/react-native/yarn.lock
+ path: ~/reports/junit
# -------------------------
# JOBS: Test JavaScript
# -------------------------
- # Runs JavaScript tests on Node 8
- test_javascript:
- <<: *js_defaults
- steps:
- - attach_workspace:
- at: ~/react-native
-
- - run:
- name: JavaScript Test Suite
- command: node ./scripts/run-ci-javascript-tests.js --maxWorkers 2
-
- - store_test_results:
- path: ~/react-native/reports/junit
-
- # Run JavaScript tests on Node LTS
- test_node_lts:
- <<: *defaults
- docker:
- - image: node:lts
+ # Runs JavaScript tests
+ test_js:
+ parameters:
+ executor:
+ type: executor
+ default: node8
+ executor: << parameters.executor >>
steps:
- - checkout
- - run: *setup-artifacts
-
- - run: *yarn
+ - restore_cache_checkout:
+ checkout_type: node
+ - setup_artifacts
+ - run_yarn
- run:
name: JavaScript Test Suite
command: node ./scripts/run-ci-javascript-tests.js --maxWorkers 2
- store_test_results:
- path: ~/react-native/reports/junit
-
+ path: ~/reports/junit
# -------------------------
# JOBS: Test iOS
# -------------------------
# Runs unit tests on iOS devices
test_ios:
- <<: *macos_defaults
+ executor: reactnativeios
+ parameters:
+ use_frameworks:
+ type: boolean
+ default: false
environment:
- REPORTS_DIR: "./reports"
steps:
- - attach_workspace:
- at: ~/react-native
+ - restore_cache_checkout:
+ checkout_type: ios
+ - setup_artifacts
+ - run_yarn
+ - run: |
+ cd RNTester
+ bundle check || bundle install
- run:
- name: Print Xcode environment
- command: xcodebuild -version
-
- - run:
- name: List available devices
- command: instruments -s devices
-
- - run:
- name: Boot iOS Simulator
+ name: Boot iPhone Simulator
command: source scripts/.tests.env && xcrun simctl boot "$IOS_DEVICE" || true
- - restore-cache: *restore-brew-cache
- - run:
- name: Install Watchman
- command: |
- HOMEBREW_NO_AUTO_UPDATE=1 brew install watchman >/dev/null
- touch .watchmanconfig
- - save-cache: *save-brew-cache
-
- - run:
- name: Start Metro packager
- command: yarn start --max-workers=1 || echo "Can't start packager automatically"
- background: true
-
- - run:
- name: Start WebSocket test server
- command: open "./IntegrationTests/launchWebSocketServer.command" || echo "Can't start web socket server automatically"
- background: true
-
- - run:
- name: Verify RNTester can be built
- command: |
- source ./scripts/.tests.env
- xcodebuild \
- -project RNTester/RNTester.xcodeproj \
- -scheme RNTester \
- -sdk iphonesimulator \
- -destination "platform=iOS Simulator,name=$IOS_DEVICE,OS=$IOS_TARGET_OS" \
- -UseModernBuildSystem=NO \
- build | \
- xcpretty --report junit --output "$REPORTS_DIR/junit/ios_buiild/results.xml" && \
- exit "${PIPESTATUS[0]}"
-
- - run:
- name: Wait for Metro packager
- command: |
- max_attempts=60
- attempt_num=1
- until curl -s http://localhost:8081/status | grep "packager-status:running" -q; do
- if (( attempt_num == max_attempts )); then
- echo "Packager did not respond in time. No more attempts left."
- exit 1
- else
- (( attempt_num++ ))
- echo "Packager did not respond. Retrying for attempt number $attempt_num..."
- sleep 1
- fi
- done
- echo "Packager is ready!"
-
- - run:
- name: Preload the RNTesterApp bundles
- command: |
- curl --silent 'http://localhost:8081/RNTester/js/RNTesterApp.ios.bundle?platform=ios&dev=true' --output /dev/null
- curl --silent 'http://localhost:8081/RNTester/js/RNTesterApp.ios.bundle?platform=ios&dev=true&minify=false' --output /dev/null
- curl --silent 'http://localhost:8081/IntegrationTests/IntegrationTestsApp.bundle?platform=ios&dev=true' --output /dev/null
- curl --silent 'http://localhost:8081/IntegrationTests/RCTRootViewIntegrationTestApp.bundle?platform=ios&dev=true' --output /dev/null
-
- run:
- name: Run RNTester Unit Tests
+ name: Fetch CocoaPods Specs
command: |
- source ./scripts/.tests.env
- xcodebuild \
- -project RNTester/RNTester.xcodeproj \
- -scheme RNTester \
- -sdk iphonesimulator \
- -destination "platform=iOS Simulator,name=$IOS_DEVICE,OS=$IOS_TARGET_OS" \
- -UseModernBuildSystem=NO \
- -only-testing:RNTesterUnitTests \
- build test | \
- xcpretty --report junit --output "$REPORTS_DIR/junit/ios_unit_tests/results.xml" && \
- exit "${PIPESTATUS[0]}"
-
- - run:
- name: Run RNTester Integration Tests
- command: |
- source ./scripts/.tests.env
- xcodebuild \
- -project RNTester/RNTester.xcodeproj \
- -scheme RNTester \
- -sdk iphonesimulator \
- -destination "platform=iOS Simulator,name=$IOS_DEVICE,OS=$IOS_TARGET_OS" \
- -UseModernBuildSystem=NO \
- -only-testing:RNTesterIntegrationTests \
- build test | \
- xcpretty --report junit --output "$REPORTS_DIR/junit/ios_integration_tests/results.xml" && \
- exit "${PIPESTATUS[0]}"
-
- - run:
- name: Stop Metro packager and WebSocket test server
- command: |
- # kill whatever is occupying port 8081 (packager)
- lsof -i tcp:8081 | awk 'NR!=1 {print $2}' | xargs kill
- # kill whatever is occupying port 5555 (web socket server)
- lsof -i tcp:5555 | awk 'NR!=1 {print $2}' | xargs kill
-
+ curl https://cocoapods-specs.circleci.com/fetch-cocoapods-repo-from-s3.sh | bash -s cf
+
+ - when:
+ condition: << parameters.use_frameworks >>
+ steps:
+ - run:
+ name: Set USE_FRAMEWORKS=1
+ command: echo "export USE_FRAMEWORKS=1" >> $BASH_ENV
+
+ - with_pods_cache_span:
+ steps:
+ - run:
+ name: Generate RNTesterPods Workspace
+ command: cd RNTester && pod install --verbose
+
+ - with_brew_cache_span:
+ steps:
+ - brew_install:
+ package: watchman
+ - run: touch .watchmanconfig
+
+ - run: yarn test-ios
- store_test_results:
- path: ~/react-native/reports/junit
+ path: ~/reports/junit
- # Runs end-to-end tests
- test_end_to_end:
- <<: *macos_defaults
+ # Runs iOS end-to-end tests
+ test_ios_e2e:
+ executor: reactnativeios
steps:
- - attach_workspace:
- at: ~/react-native
+ - restore_cache_checkout:
+ checkout_type: ios
+ - setup_artifacts
+ - run_yarn
- run:
name: Boot iPhone Simulator
@@ -470,41 +371,32 @@ jobs:
source $BASH_ENV
# Brew
- - restore-cache: *restore-brew-cache
- - run:
- name: Configure Detox Environment
- command: |
- HOMEBREW_NO_AUTO_UPDATE=1 brew install node@8 >/dev/null
- HOMEBREW_NO_AUTO_UPDATE=1 brew tap wix/brew >/dev/null
- HOMEBREW_NO_AUTO_UPDATE=1 brew install applesimutils >/dev/null
- touch .watchmanconfig
- node -v
- - save-cache: *save-brew-cache
+ - with_brew_cache_span:
+ steps:
+ - brew_install:
+ package: node@8
+ - run: HOMEBREW_NO_AUTO_UPDATE=1 brew tap wix/brew >/dev/null
+ - brew_install:
+ package: applesimutils
+ - brew_install:
+ package: watchman
+ # Configure Watchman
+ - run: touch .watchmanconfig
- # Yarn install
- - restore-cache: *restore-yarn-cache
- - run: *yarn
- - save-cache: *save-yarn-cache
+ - restore_cache:
+ keys:
+ - v1-cocoapods-{{ checksum "template/ios/Podfile" }}
+ - v1-cocoapods-
- # Xcode build
- - run:
- name: Build app for Detox iOS End-to-End Tests
- command: yarn run build-ios-e2e
+ - run: pod setup
- # Test
- run:
- name: Run Detox iOS End-to-End Tests
- command: yarn run test-ios-e2e
- when: always
+ name: Generate RNTesterPods Workspace
+ command: pushd RNTester && pod install --verbose && popd
- run:
- name: Run JavaScript End-to-End Tests
- command: |
- # free up port 8081 for the packager before running tests
- set +eo pipefail
- lsof -i tcp:8081 | awk 'NR!=1 {print $2}' | xargs kill
- set -eo pipefail
- node ./scripts/run-ci-e2e-tests.js --js --retries 3
+ name: Run Detox iOS End-to-End Tests
+ command: yarn run build-ios-e2e && yarn run test-ios-e2e
when: always
- run:
@@ -517,16 +409,38 @@ jobs:
node ./scripts/run-ci-e2e-tests.js --ios --retries 3;
when: always
+ - save_cache:
+ paths:
+ - ~/.cocoapods/repos
+ key: v1-cocoapods-{{ checksum "template/ios/Podfile" }}
+
+ test_js_e2e:
+ executor: node8
+ steps:
+ - restore_cache_checkout:
+ checkout_type: node
+ - setup_artifacts
+ - run_yarn
+ - run: sudo apt-get install rsync
+
+ - run:
+ name: Run JavaScript End-to-End Tests
+ command: node ./scripts/run-ci-e2e-tests.js --js --retries 3
+
+ - store_test_results:
+ path: ~/reports/junit
# -------------------------
# JOBS: Test Android
# -------------------------
# Run Android tests
test_android:
- <<: *android_defaults
+ executor: reactnativeandroid
steps:
- - attach_workspace:
- at: ~/react-native
+ - restore_cache_checkout:
+ checkout_type: android
+ - setup_artifacts
+ - run_yarn
# Validate Android SDK installation and packages
- run:
@@ -544,31 +458,15 @@ jobs:
# Keep configuring Android dependencies while AVD boots up
- - restore-cache: *restore-buck-downloads-cache
- - run:
- name: Install Buck
- command: |
- buck --version
- # Install related tooling
- if [[ ! -e ~/okbuck ]]; then
- git clone https://github.com/uber/okbuck.git ~/okbuck --depth=1
- fi
- mkdir -p ~/react-native/tooling/junit
- cp -R ~/okbuck/tooling/junit/* ~/react-native/tooling/junit/.
- - save-cache: *save-buck-downloads-cache
+ - install_buck_tooling
# Validate Android test environment (including Buck)
- run:
name: Validate Android Test Environment
command: ./scripts/validate-android-test-env.sh
- # Download dependencies using Buck
- - run: *download-dependencies-buck
-
- # Download dependencies using Gradle
- - restore-cache: *restore-gradle-downloads-cache
- - run: *download-dependencies-gradle
- - save-cache: *save-gradle-downloads-cache
+ - download_buck_dependencies
+ - download_gradle_dependencies
# Build and compile
- run:
@@ -594,7 +492,7 @@ jobs:
# Test Suite
- run:
name: Run Unit Tests
- command: buck test ReactAndroid/src/test/... --config build.threads=$BUILD_THREADS --xml ~/react-native/reports/buck/all-results-raw.xml
+ command: buck test ReactAndroid/src/test/... --config build.threads=$BUILD_THREADS --xml ~/reports/buck/all-results-raw.xml
- run:
name: Run Instrumentation Tests
@@ -612,19 +510,21 @@ jobs:
- run:
name: Collect Test Results
command: |
- find . -type f -regex ".*/build/test-results/debug/.*xml" -exec cp {} ~/react-native/reports/build/ \;
- find . -type f -regex ".*/outputs/androidTest-results/connected/.*xml" -exec cp {} ~/react-native/reports/outputs/ \;
- find . -type f -regex ".*/buck-out/gen/ReactAndroid/src/test/.*/.*xml" -exec cp {} ~/react-native/reports/buck/ \;
- ./tooling/junit/buck_to_junit.sh ~/react-native/reports/buck/all-results-raw.xml ~/react-native/reports/junit/all-results-junit.xml
+ find . -type f -regex ".*/build/test-results/debug/.*xml" -exec cp {} ~/reports/build/ \;
+ find . -type f -regex ".*/outputs/androidTest-results/connected/.*xml" -exec cp {} ~/reports/outputs/ \;
+ find . -type f -regex ".*/buck-out/gen/ReactAndroid/src/test/.*/.*xml" -exec cp {} ~/reports/buck/ \;
+ if [ -f ~/react-native/reports/buck/all-results-raw.xml ]; then
+ ./tooling/junit/buck_to_junit.sh ~/react-native/reports/buck/all-results-raw.xml ~/react-native/reports/junit/all-results-junit.xml
+ fi
when: always
- store_test_results:
- path: ~/react-native/reports/junit
+ path: ~/reports/junit
# -------------------------
- # JOBS: Test Docker Build
+ # JOBS: Test Docker
# -------------------------
- test_docker_build:
+ test_docker:
machine: true
steps:
- checkout
@@ -643,16 +543,17 @@ jobs:
# -------------------------
# Collect JavaScript test coverage
js_coverage:
- <<: *js_defaults
+ executor: node8
environment:
- CI_BRANCH: $CIRCLE_BRANCH
- CI_PULL_REQUEST: $CIRCLE_PULL_REQUEST
- CI_BUILD_NUMBER: $CIRCLE_BUILD_NUM
- CI_BUILD_URL: $CIRCLE_BUILD_URL
steps:
- - checkout
- - restore-cache: *restore-yarn-cache
- - run: *yarn
+ - restore_cache_checkout:
+ checkout_type: node
+ - setup_artifacts
+ - run_yarn
- run:
name: Test coverage
command: |
@@ -668,74 +569,123 @@ jobs:
# Publishes new version onto npm
# Only works on stable branches when a properly tagged commit is pushed
publish_npm_package:
- <<: *android_defaults
+ executor: reactnativeandroid
steps:
- - checkout
-
- - restore-cache: *restore-yarn-cache
- - run: *yarn
-
- # Fetch dependencies using Buck
- - restore-cache: *restore-buck-downloads-cache
- - run: *download-dependencies-buck
-
- # Fetch dependencies using Gradle
- - restore-cache: *restore-gradle-downloads-cache
- - run: *download-dependencies-gradle
-
- - run:
- name: Authenticate with npm
- command: echo "//registry.npmjs.org/:_authToken=${CIRCLE_NPM_TOKEN}" > ~/.npmrc
-
- - run:
- name: Authenticate git user
- command: |
- git config --global user.email "react-native-bot@users.noreply.github.com"
- git config --global user.name "npm Deployment Script"
- echo "machine github.com login react-native-bot password $GITHUB_TOKEN" > ~/.netrc
-
- # Build and publish release. Requires an Android environment.
- - run:
- name: Publish React Native Package
- command: node ./scripts/publish-npm.js
+ - restore_cache_checkout:
+ checkout_type: android
+ - run_yarn
+ - install_buck_tooling
+ - download_buck_dependencies
+ - download_gradle_dependencies
+ - run: echo "//registry.npmjs.org/:_authToken=${CIRCLE_NPM_TOKEN}" > ~/.npmrc
+ - run: |
+ git config --global user.email "react-native-bot@users.noreply.github.com"
+ git config --global user.name "npm Deployment Script"
+ echo "machine github.com login react-native-bot password $GITHUB_TOKEN" > ~/.netrc
+ - run: node ./scripts/publish-npm.js
# -------------------------
# WORK FLOWS
# -------------------------
workflows:
- version: 2
-
tests:
jobs:
- - test_node_lts:
- filters: *filter-ignore-gh-pages
-
- - checkout_code:
- filters: *filter-ignore-gh-pages
-
- - analyze: *run-after-checkout
- - test_javascript: *run-after-checkout
- - test_android: *run-after-checkout
- - test_ios: *run-after-checkout
- - test_end_to_end: *run-after-checkout
- - test_docker_build:
- filters: *filter-ignore-gh-pages
-
+ - setup:
+ name: setup_js
+ filters:
+ branches:
+ ignore: gh-pages
+ - setup:
+ name: setup_ios
+ checkout_type: ios
+ executor: reactnativeios
+ filters:
+ branches:
+ ignore: gh-pages
+ - setup:
+ name: setup_android
+ checkout_type: android
+ executor: reactnativeandroid
+ filters:
+ branches:
+ ignore: gh-pages
+ - test_js:
+ requires:
+ - setup_js
+ - test_js_e2e:
+ requires:
+ - setup_js
+ - test_js
+ - test_android:
+ requires:
+ - setup_android
+ - test_ios:
+ requires:
+ - setup_ios
+ - test_ios:
+ name: test_ios_frameworks
+ use_frameworks: true
+ requires:
+ - setup_ios
+ - test_ios_e2e:
+ requires:
+ - setup_ios
+ - test_js
+ - test_js:
+ name: test_js_lts
+ executor: nodelts
+ requires:
+ - setup_js
+ - test_docker:
+ filters:
+ branches:
+ ignore: gh-pages
releases:
jobs:
- - checkout_code:
- filters: *filter-only-version-tags
+ - setup:
+ name: setup_android
+ checkout_type: android
+ executor: reactnativeandroid
+ filters:
+ # Both of the following conditions must be included!
+ # Ignore any commit on any branch by default.
+ branches:
+ ignore: /.*/
+ # Only act on version tags.
+ tags:
+ only: /v[0-9]+(\.[0-9]+)*(\-rc(\.[0-9]+)?)?/
- publish_npm_package:
- filters: *filter-only-version-tags
requires:
- - checkout_code
+ - setup_android
+ filters:
+ # Both of the following conditions must be included!
+ # Ignore any commit on any branch by default.
+ branches:
+ ignore: /.*/
+ # Only act on version tags.
+ tags:
+ only: /v[0-9]+(\.[0-9]+)*(\-rc(\.[0-9]+)?)?/
analysis:
jobs:
+ - setup
+ # Run lints on every commit other than those to the gh-pages branch
+ - analyze_code:
+ requires:
+ - setup
+ filters:
+ branches:
+ ignore: gh-pages
+
# Run code checks on PRs from forks
- analyze_pr:
- filters: *filter-only-forked-pull-requests
+ requires:
+ - setup
+ filters:
+ branches:
+ only: /^pull\/.*$/
- # Gather coverage on master
+ # Gather coverage
- js_coverage:
- filters: *filter-only-master
\ No newline at end of file
+ requires:
+ - setup
\ No newline at end of file
diff --git a/.editorconfig b/.editorconfig
index dadac3a2b6d50b..45dc2a9a3fecd4 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,4 +1,4 @@
-# EditorConfig is awesome: http://EditorConfig.org
+# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
diff --git a/.eslintrc b/.eslintrc
index d18f7eb8286127..9c36dc1804f899 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -6,6 +6,14 @@
],
"overrides": [
+ {
+ "files": [
+ "Libraries/**/*.js",
+ ],
+ rules: {
+ '@react-native-community/no-haste-imports': 2
+ }
+ },
{
"files": [
"**/__fixtures__/**/*.js",
diff --git a/.flowconfig b/.flowconfig
index cba3e883ea9d48..9e6dd708c0d5e1 100644
--- a/.flowconfig
+++ b/.flowconfig
@@ -13,17 +13,6 @@
; Ignore "BUCK" generated dirs
/\.buckd/
-; Ignore unexpected extra "@providesModule"
-.*/node_modules/.*/node_modules/fbjs/.*
-
-; Ignore duplicate module providers
-; 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
-
-; Ignore polyfills
-.*/Libraries/polyfills/.*
-
; Ignore metro.config.js
/metro.config.js
@@ -32,7 +21,7 @@
.*/node_modules/warning/.*
; Flow doesn't support platforms
-.*/Libraries/Utilities/HMRLoadingView.js
+.*/Libraries/Utilities/LoadingView.js
[untyped]
.*/node_modules/@react-native-community/cli/.*/.*
@@ -53,35 +42,17 @@ module.file_ext=.js
module.file_ext=.json
module.file_ext=.ios.js
-module.system=haste
-module.system.haste.use_name_reducers=true
-# keep the following in sync with server/haste/hasteImpl.js
-# get basename
-module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
-# strip .js or .js.flow suffix
-module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
-# strip .ios suffix
-module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
-# TODO(macOS ISS#2323203):
-module.system.haste.name_reducers='^\(.*\)\.macos$' -> '\1'
-module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
-module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
-module.system.haste.paths.blacklist=.*/__tests__/.*
-module.system.haste.paths.blacklist=.*/__mocks__/.*
-module.system.haste.paths.whitelist=/Libraries/.*
-module.system.haste.paths.whitelist=/RNTester/.*
-module.system.haste.paths.whitelist=/IntegrationTests/.*
-module.system.haste.paths.blacklist=/Libraries/react-native/react-native-implementation.js
-module.system.haste.paths.blacklist=/Libraries/Animated/src/polyfills/.*
-
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'
+module.name_mapper='^react-native$' -> '/Libraries/react-native/react-native-implementation'
+module.name_mapper='^react-native/\(.*\)$' -> '/\1'
+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\)$' -> '/Libraries/Image/RelativeImageStub'
suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState
+suppress_type=$FlowFixMeEmpty
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
@@ -110,4 +81,4 @@ untyped-import
untyped-type-import
[version]
-^0.98.0
+^0.105.0
diff --git a/.flowconfig.android b/.flowconfig.android
index 3eadd57a134b56..9368fd544cab41 100644
--- a/.flowconfig.android
+++ b/.flowconfig.android
@@ -13,17 +13,6 @@
; Ignore "BUCK" generated dirs
/\.buckd/
-; Ignore unexpected extra "@providesModule"
-.*/node_modules/.*/node_modules/fbjs/.*
-
-; Ignore duplicate module providers
-; 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
-
-; Ignore polyfills
-.*/Libraries/polyfills/.*
-
; TODO(macOS ISS#2323203): Ignore metro.config.js
/metro.config.js
@@ -41,7 +30,7 @@
.*/node_modules/warning/.*
; Flow doesn't support platforms
-.*/Libraries/Utilities/HMRLoadingView.js
+.*/Libraries/Utilities/LoadingView.js
[untyped]
.*/node_modules/@react-native-community/cli/.*/.*
@@ -62,35 +51,19 @@ module.file_ext=.js
module.file_ext=.json
module.file_ext=.android.js
-module.system=haste
-module.system.haste.use_name_reducers=true
-# keep the following in sync with server/haste/hasteImpl.js
-# get basename
-module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
-# strip .js or .js.flow suffix
-module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
-# strip .android suffix
-module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
-module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
# TODO(macOS ISS#2323203):
module.system.haste.name_reducers='^\(.*\)\.macos$' -> '\1'
-module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
-module.system.haste.paths.blacklist=.*/__tests__/.*
-module.system.haste.paths.blacklist=.*/__mocks__/.*
-module.system.haste.paths.whitelist=/Libraries/.*
-module.system.haste.paths.whitelist=/RNTester/.*
-module.system.haste.paths.whitelist=/IntegrationTests/.*
-module.system.haste.paths.blacklist=/Libraries/react-native/react-native-implementation.js
-module.system.haste.paths.blacklist=/Libraries/Animated/src/polyfills/.*
-
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'
+module.name_mapper='^react-native$' -> '/Libraries/react-native/react-native-implementation'
+module.name_mapper='^react-native/\(.*\)$' -> '/\1'
+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\)$' -> '/Libraries/Image/RelativeImageStub'
suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState
+suppress_type=$FlowFixMeEmpty
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native\\(_android\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native\\(_android\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
@@ -119,4 +92,4 @@ untyped-import
untyped-type-import
[version]
-^0.98.0
+^0.105.0
diff --git a/.flowconfig.macos b/.flowconfig.macos
index da9a2ac9be58c8..5898f1bb0031f0 100644
--- a/.flowconfig.macos
+++ b/.flowconfig.macos
@@ -13,17 +13,6 @@
; Ignore "BUCK" generated dirs
/\.buckd/
-; Ignore unexpected extra "@providesModule"
-.*/node_modules/.*/node_modules/fbjs/.*
-
-; Ignore duplicate module providers
-; 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
-
-; Ignore polyfills
-.*/Libraries/polyfills/.*
-
; Ignore metro.config.js
/metro.config.js
@@ -32,7 +21,7 @@
.*/node_modules/warning/.*
; Flow doesn't support platforms
-.*/Libraries/Utilities/HMRLoadingView.js
+.*/Libraries/Utilities/LoadingView.js
[untyped]
.*/node_modules/@react-native-community/cli/.*/.*
@@ -53,34 +42,17 @@ module.file_ext=.js
module.file_ext=.json
module.file_ext=.macos.js
-module.system=haste
-module.system.haste.use_name_reducers=true
-# keep the following in sync with server/haste/hasteImpl.js
-# get basename
-module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
-# strip .js or .js.flow suffix
-module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
-# strip .macos suffix
-module.system.haste.name_reducers='^\(.*\)\.macos$' -> '\1'
-module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
-module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
-module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
-module.system.haste.paths.blacklist=.*/__tests__/.*
-module.system.haste.paths.blacklist=.*/__mocks__/.*
-module.system.haste.paths.whitelist=/Libraries/.*
-module.system.haste.paths.whitelist=/RNTester/.*
-module.system.haste.paths.whitelist=/IntegrationTests/.*
-module.system.haste.paths.blacklist=/Libraries/react-native/react-native-implementation.js
-module.system.haste.paths.blacklist=/Libraries/Animated/src/polyfills/.*
-
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'
+module.name_mapper='^react-native$' -> '/Libraries/react-native/react-native-implementation'
+module.name_mapper='^react-native/\(.*\)$' -> '/\1'
+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\)$' -> '/Libraries/Image/RelativeImageStub'
suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState
+suppress_type=$FlowFixMeEmpty
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
@@ -109,4 +81,4 @@ untyped-import
untyped-type-import
[version]
-^0.98.0
+^0.105.0
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index 09c71aff836751..0856e966039493 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -29,12 +29,12 @@ React Native version:
Describe what you expected to happen:
-Snack, code example, or link to a repository:
-
+Snack, code example, screenshot, or link to a repository:
diff --git a/.gitignore b/.gitignore
index f831efb12ac614..94dbd79416fca2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -86,7 +86,13 @@ RNTester/build
# CocoaPods
/template/ios/Pods/
/template/ios/Podfile.lock
+/RNTester/Gemfile.lock
+# Ignore RNTester specific Pods, but keep the __offline_mirrors__ here.
+RNTester/Pods/*
+!RNTester/Pods/__offline_mirrors
+
+# NuGet
*.nupkg
#vscode
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 42cb49e62135ee..28ddd7ac89c652 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -18,7 +18,7 @@ If you are eager to start contributing code right away, we have a list of [good
There are other ways you can contribute without writing a single line of code. Here are a few things you can do to help out:
-1. **Replying and handling open issues.** We get a lot of issues every day, and some of them may lack necessary information. You can help out by guiding people through the process of filling out the issue template, asking for clarifying information, or pointing them to existing issues that match their description of the problem. We'll cover more about this process later, in [Handling Issues](http://github.com/facebook/react-native/wiki/Handling-Issues).
+1. **Replying and handling open issues.** We get a lot of issues every day, and some of them may lack necessary information. You can help out by guiding people through the process of filling out the issue template, asking for clarifying information, or pointing them to existing issues that match their description of the problem. We cover more about this process in the [Issue Triage wiki](https://github.com/facebook/react-native/wiki/Issues#triage).
2. **Reviewing pull requests for the docs.** Reviewing [documentation updates](https://github.com/facebook/react-native-website/pulls) can be as simple as checking for spelling and grammar. If you encounter situations that can be explained better in the docs, click **Edit** at the top of most docs pages to get started with your own contribution.
3. **Help people write test plans.** Some pull requests sent to the main repository may lack a proper test plan. These help reviewers understand how the change was tested, and can speed up the time it takes for a contribution to be accepted.
@@ -30,6 +30,7 @@ We use GitHub issues and pull requests to keep track of bug reports and contribu
You can learn more about the contribution process in the following documents:
+* [Issues](https://github.com/facebook/react-native/wiki/Issues)
* [Pull Requests](https://github.com/facebook/react-native/wiki/Pull-Requests)
We also have a thriving community of contributors who would be happy to help you get set up. You can reach out to us through [@ReactNative](http://twitter.com/reactnative) (the React Native team) and [@ReactNativeComm](http://twitter.com/reactnativecomm) (the React Native Community organization).
@@ -47,9 +48,9 @@ There are a few other repositories you might want to familiarize yourself with:
Browsing through these repositories should provide some insight into how the React Native open source project is managed.
-## Handling Issues
+## GitHub Issues
-We use GitHub issues to track bugs exclusively. You can report an issue by filing a [Bug Report](https://github.com/facebook/react-native/issues/new/choose). Watch this space for more details on how to get involved and triage issues.
+We use GitHub issues to track bugs exclusively. We have documented our issue handling processes in the [Issues wiki](https://github.com/facebook/react-native/wiki/Issues).
### Security Bugs
@@ -82,7 +83,7 @@ Code-level contributions to React Native generally come in the form of [pull req
7. Create a pull request to the React Native repository.
8. Review and address comments on your pull request.
1. A bot may comment with suggestions. Generally we ask you to resolve these first before a maintainer will review your code.
-9. If you haven't already, complete the Contributor License Agreement ("CLA").
+9. If you haven't already, please complete the [Contributor License Agreement](https://github.com/facebook/react-native/wiki/Contributor-License-Agreement) ("CLA"). **[Complete your CLA here.](https://code.facebook.com/cla)**
If all goes well, your pull request will be merged. If it is not merged, maintainers will do their best to explain the reason why.
diff --git a/IntegrationTests/AccessibilityManagerTest.js b/IntegrationTests/AccessibilityManagerTest.js
index b05aea774056e4..313b8990346671 100644
--- a/IntegrationTests/AccessibilityManagerTest.js
+++ b/IntegrationTests/AccessibilityManagerTest.js
@@ -14,11 +14,18 @@ const React = require('react');
const ReactNative = require('react-native');
const {View} = ReactNative;
const RCTDeviceEventEmitter = require('react-native/Libraries/EventEmitter/RCTDeviceEventEmitter');
-const {TestModule, AccessibilityManager} = ReactNative.NativeModules;
+const {TestModule} = ReactNative.NativeModules;
+import NativeAccessibilityManager from 'react-native/Libraries/Components/AccessibilityInfo/NativeAccessibilityManager';
+import invariant from 'invariant';
class AccessibilityManagerTest extends React.Component<{}> {
componentDidMount() {
- AccessibilityManager.setAccessibilityContentSizeMultipliers({
+ invariant(
+ NativeAccessibilityManager,
+ "NativeAccessibilityManager doesn't exist",
+ );
+
+ NativeAccessibilityManager.setAccessibilityContentSizeMultipliers({
extraSmall: 1.0,
small: 2.0,
medium: 3.0,
diff --git a/IntegrationTests/AppEventsTest.js b/IntegrationTests/AppEventsTest.js
index a109f42e4c35c6..4bc0b0649c16fa 100644
--- a/IntegrationTests/AppEventsTest.js
+++ b/IntegrationTests/AppEventsTest.js
@@ -36,7 +36,7 @@ class AppEventsTest extends React.Component<{}, State> {
this.setState({sent: event});
}
- receiveEvent = (event: any) => {
+ receiveEvent: (event: any) => void = (event: any) => {
if (deepDiffer(event.data, TEST_PAYLOAD)) {
throw new Error('Received wrong event: ' + JSON.stringify(event));
}
@@ -46,7 +46,7 @@ class AppEventsTest extends React.Component<{}, State> {
});
};
- render() {
+ render(): React.Node {
return (
{JSON.stringify(this.state, null, ' ')}
diff --git a/IntegrationTests/AsyncStorageTest.js b/IntegrationTests/AsyncStorageTest.js
index e1a4de758b00cc..81325c752504ee 100644
--- a/IntegrationTests/AsyncStorageTest.js
+++ b/IntegrationTests/AsyncStorageTest.js
@@ -177,7 +177,7 @@ function testOptimizedMultiGet() {
}
class AsyncStorageTest extends React.Component<{}, $FlowFixMeState> {
- state = {
+ state: any | $TEMPORARY$object<{|done: boolean, messages: string|}> = {
messages: 'Initializing...',
done: false,
};
@@ -194,7 +194,7 @@ class AsyncStorageTest extends React.Component<{}, $FlowFixMeState> {
AsyncStorage.clear(testSetAndGet);
}
- render() {
+ render(): React.Node {
return (
diff --git a/IntegrationTests/GlobalEvalWithSourceUrlTest.js b/IntegrationTests/GlobalEvalWithSourceUrlTest.js
new file mode 100644
index 00000000000000..0fd59bc26441fe
--- /dev/null
+++ b/IntegrationTests/GlobalEvalWithSourceUrlTest.js
@@ -0,0 +1,80 @@
+/**
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ * @format
+ * @flow strict-local
+ */
+
+'use strict';
+
+const React = require('react');
+const ReactNative = require('react-native');
+const parseErrorStack = require('react-native/Libraries/Core/Devtools/parseErrorStack');
+const {View} = ReactNative;
+
+const {TestModule} = ReactNative.NativeModules;
+
+class GlobalEvalWithSourceUrlTest extends React.Component<{}> {
+ componentDidMount() {
+ if (typeof global.globalEvalWithSourceUrl !== 'function') {
+ throw new Error(
+ 'Expected to find globalEvalWithSourceUrl function on global object but found ' +
+ typeof global.globalEvalWithSourceUrl,
+ );
+ }
+ const value = global.globalEvalWithSourceUrl('42');
+ if (value !== 42) {
+ throw new Error(
+ 'Expected globalEvalWithSourceUrl(expression) to return a value',
+ );
+ }
+ let syntaxError;
+ try {
+ global.globalEvalWithSourceUrl('{');
+ } catch (e) {
+ syntaxError = e;
+ }
+ if (!syntaxError) {
+ throw new Error(
+ 'Expected globalEvalWithSourceUrl to throw on a syntax error',
+ );
+ }
+ if (!(syntaxError instanceof SyntaxError)) {
+ throw new Error(
+ 'Expected globalEvalWithSourceUrl to throw SyntaxError on a syntax error',
+ );
+ }
+ const url = 'http://example.com/foo.js';
+ let error;
+ try {
+ global.globalEvalWithSourceUrl('throw new Error()', url);
+ } catch (e) {
+ error = e;
+ }
+ if (!error) {
+ throw new Error(
+ 'Expected globalEvalWithSourceUrl to throw an Error object',
+ );
+ }
+ const parsedStack = parseErrorStack(error);
+ if (parsedStack[0].file !== url) {
+ throw new Error(
+ `Expected first eval stack frame to be in ${url} but found ${String(
+ parsedStack[0].file,
+ )}`,
+ );
+ }
+ TestModule.markTestCompleted();
+ }
+
+ render(): React.Node {
+ return ;
+ }
+}
+
+GlobalEvalWithSourceUrlTest.displayName = 'GlobalEvalWithSourceUrlTest';
+
+module.exports = GlobalEvalWithSourceUrlTest;
diff --git a/IntegrationTests/ImageCachePolicyTest.js b/IntegrationTests/ImageCachePolicyTest.js
index 0dae9812cf6e24..d25e6c2b86ede3 100644
--- a/IntegrationTests/ImageCachePolicyTest.js
+++ b/IntegrationTests/ImageCachePolicyTest.js
@@ -36,9 +36,9 @@ type State = {
};
class ImageCachePolicyTest extends React.Component {
- state = {};
+ state: $FlowFixMe | $TEMPORARY$object<{||}> = {};
- shouldComponentUpdate(nextProps: Props, nextState: State) {
+ shouldComponentUpdate(nextProps: Props, nextState: State): boolean {
const results: Array = TESTS.map(x => nextState[x]);
if (!results.includes(undefined)) {
@@ -56,7 +56,7 @@ class ImageCachePolicyTest extends React.Component {
this.setState({[name]: pass});
}
- render() {
+ render(): React.Node {
return (
Hello
diff --git a/IntegrationTests/ImageSnapshotTest.js b/IntegrationTests/ImageSnapshotTest.js
index c4ffaae51c2ec4..495423ae006340 100644
--- a/IntegrationTests/ImageSnapshotTest.js
+++ b/IntegrationTests/ImageSnapshotTest.js
@@ -22,11 +22,11 @@ class ImageSnapshotTest extends React.Component<{}> {
}
}
- done = (success: boolean) => {
+ done: (success: boolean) => void = (success: boolean) => {
TestModule.markTestPassed(success);
};
- render() {
+ render(): React.Node {
return (
{
- state = {
+ state: State = {
done: false,
};
@@ -38,7 +39,7 @@ class IntegrationTestHarnessTest extends React.Component {
}
}
- runTest = () => {
+ runTest: () => void = () => {
if (this.props.shouldThrow) {
throw new Error('Throwing error because shouldThrow');
}
@@ -52,7 +53,7 @@ class IntegrationTestHarnessTest extends React.Component {
});
};
- render() {
+ render(): React.Node {
return (
diff --git a/IntegrationTests/IntegrationTestsApp.js b/IntegrationTests/IntegrationTestsApp.js
index de3d6004b8e353..a7ad8113abb5a2 100644
--- a/IntegrationTests/IntegrationTestsApp.js
+++ b/IntegrationTests/IntegrationTestsApp.js
@@ -25,17 +25,18 @@ const {
// Keep this list in sync with RNTesterIntegrationTests.m
const TESTS = [
require('./IntegrationTestHarnessTest'),
- // require('./TimersTest'),
+ // require('./TimersTest'),
require('./AsyncStorageTest'),
+ // require('./LayoutEventsTest'),
require('./AppEventsTest'),
+ require('./SimpleSnapshotTest'),
// require('./ImageCachePolicyTest'),
// require('./ImageSnapshotTest'),
- // require('./LayoutEventsTest'),
- require('./SimpleSnapshotTest'),
- require('./SyncMethodTest'),
require('./PromiseTest'),
+ require('./SyncMethodTest'),
require('./WebSocketTest'),
require('./AccessibilityManagerTest'),
+ require('./GlobalEvalWithSourceUrlTest'),
];
TESTS.forEach(
diff --git a/IntegrationTests/LayoutEventsTest.js b/IntegrationTests/LayoutEventsTest.js
index 81919b0bb7cc41..ce7ec5fab61076 100644
--- a/IntegrationTests/LayoutEventsTest.js
+++ b/IntegrationTests/LayoutEventsTest.js
@@ -10,10 +10,10 @@
'use strict';
-const Platform = require('Platform');
const React = require('react');
const ReactNative = require('react-native');
const {Image, LayoutAnimation, StyleSheet, Text, View} = ReactNative;
+const {Platform} = ReactNative; // TODO(macOS ISS#2323203)
const {TestModule} = ReactNative.NativeModules;
import type {ViewStyleProp} from 'react-native/Libraries/StyleSheet/StyleSheet';
@@ -53,8 +53,8 @@ class LayoutEventsTest extends React.Component {
animateViewLayout() {
debug('animateViewLayout invoked');
LayoutAnimation.configureNext(
- Platform.OS === 'macos'
- ? LayoutAnimation.Presets.easeInEaseOut
+ Platform.OS === 'macos' // [TODO(macOS ISS#2323203)
+ ? LayoutAnimation.Presets.easeInEaseOut // ]TODO(macOS ISS#2323203)
: LayoutAnimation.Presets.spring,
() => {
debug('animateViewLayout done');
@@ -64,7 +64,7 @@ class LayoutEventsTest extends React.Component {
this.setState({viewStyle: {margin: 60}});
}
- addWrapText = () => {
+ addWrapText: () => void = () => {
debug('addWrapText invoked');
this.setState(
{extraText: ' And a bunch more text to wrap around a few lines.'},
@@ -72,14 +72,14 @@ class LayoutEventsTest extends React.Component {
);
};
- changeContainer = () => {
+ changeContainer: () => void = () => {
debug('changeContainer invoked');
this.setState({containerStyle: {width: 280}}, () =>
this.checkLayout(TestModule.markTestCompleted),
);
};
- checkLayout = (next?: ?() => void) => {
+ checkLayout: (next?: ?() => void) => void = (next?: ?() => void) => {
const view = this._view;
const txt = this._txt;
const img = this._img;
@@ -123,22 +123,22 @@ class LayoutEventsTest extends React.Component {
}
}
- onViewLayout = (e: LayoutEvent) => {
+ onViewLayout: (e: LayoutEvent) => void = (e: LayoutEvent) => {
debug('received view layout event\n', e.nativeEvent);
this.setState({viewLayout: e.nativeEvent.layout}, this.checkLayout);
};
- onTextLayout = (e: LayoutEvent) => {
+ onTextLayout: (e: LayoutEvent) => void = (e: LayoutEvent) => {
debug('received text layout event\n', e.nativeEvent);
this.setState({textLayout: e.nativeEvent.layout}, this.checkLayout);
};
- onImageLayout = (e: LayoutEvent) => {
+ onImageLayout: (e: LayoutEvent) => void = (e: LayoutEvent) => {
debug('received image layout event\n', e.nativeEvent);
this.setState({imageLayout: e.nativeEvent.layout}, this.checkLayout);
};
- render() {
+ render(): React.Node {
const viewStyle = [styles.view, this.state.viewStyle];
const textLayout = this.state.textLayout || {width: '?', height: '?'};
const imageLayout = this.state.imageLayout || {x: '?', y: '?'};
diff --git a/IntegrationTests/PromiseTest.js b/IntegrationTests/PromiseTest.js
index c36d3beb017b69..b35c971fc34816 100644
--- a/IntegrationTests/PromiseTest.js
+++ b/IntegrationTests/PromiseTest.js
@@ -16,10 +16,10 @@ const {View} = ReactNative;
const {TestModule} = ReactNative.NativeModules;
class PromiseTest extends React.Component<{}> {
- shouldResolve = false;
- shouldReject = false;
- shouldSucceedAsync = false;
- shouldThrowAsync = false;
+ shouldResolve: boolean = false;
+ shouldReject: boolean = false;
+ shouldSucceedAsync: boolean = false;
+ shouldThrowAsync: boolean = false;
componentDidMount() {
Promise.all([
@@ -37,19 +37,19 @@ class PromiseTest extends React.Component<{}> {
);
}
- testShouldResolve = () => {
+ testShouldResolve: () => any = () => {
return TestModule.shouldResolve()
.then(() => (this.shouldResolve = true))
.catch(() => (this.shouldResolve = false));
};
- testShouldReject = () => {
+ testShouldReject: () => any = () => {
return TestModule.shouldReject()
.then(() => (this.shouldReject = false))
.catch(() => (this.shouldReject = true));
};
- testShouldSucceedAsync = async (): Promise => {
+ testShouldSucceedAsync: () => Promise = async (): Promise => {
try {
await TestModule.shouldResolve();
this.shouldSucceedAsync = true;
@@ -58,7 +58,7 @@ class PromiseTest extends React.Component<{}> {
}
};
- testShouldThrowAsync = async (): Promise => {
+ testShouldThrowAsync: () => Promise = async (): Promise => {
try {
await TestModule.shouldReject();
this.shouldThrowAsync = false;
diff --git a/IntegrationTests/ReactContentSizeUpdateTest.js b/IntegrationTests/ReactContentSizeUpdateTest.js
index ad87bb6ed42f08..47373d6f2a8978 100644
--- a/IntegrationTests/ReactContentSizeUpdateTest.js
+++ b/IntegrationTests/ReactContentSizeUpdateTest.js
@@ -10,9 +10,9 @@
'use strict';
+const RCTNativeAppEventEmitter = require('react-native/Libraries/EventEmitter/RCTNativeAppEventEmitter');
const React = require('react');
const ReactNative = require('react-native');
-const RCTNativeAppEventEmitter = require('react-native/Libraries/EventEmitter/RCTNativeAppEventEmitter');
const {View} = ReactNative;
@@ -35,7 +35,7 @@ class ReactContentSizeUpdateTest extends React.Component {
_timeoutID: ?TimeoutID = null;
_subscription: ?EmitterSubscription = null;
- state = {
+ state: State = {
height: reactViewHeight,
width: reactViewWidth,
};
@@ -70,7 +70,9 @@ class ReactContentSizeUpdateTest extends React.Component {
});
}
- rootViewDidChangeIntrinsicSize = (intrinsicSize: State) => {
+ rootViewDidChangeIntrinsicSize: (intrinsicSize: State) => void = (
+ intrinsicSize: State,
+ ) => {
if (
intrinsicSize.height === newReactViewHeight &&
intrinsicSize.width === newReactViewWidth
@@ -79,7 +81,7 @@ class ReactContentSizeUpdateTest extends React.Component {
}
};
- render() {
+ render(): React.Node {
return (
);
diff --git a/IntegrationTests/SimpleSnapshotTest.js b/IntegrationTests/SimpleSnapshotTest.js
index 6ebf24fd25ac3a..90cb3f1e17c475 100644
--- a/IntegrationTests/SimpleSnapshotTest.js
+++ b/IntegrationTests/SimpleSnapshotTest.js
@@ -12,6 +12,7 @@
const React = require('react');
const ReactNative = require('react-native');
+
const requestAnimationFrame = require('fbjs/lib/requestAnimationFrame');
const {StyleSheet, View} = ReactNative;
@@ -25,11 +26,11 @@ class SimpleSnapshotTest extends React.Component<{}> {
requestAnimationFrame(() => TestModule.verifySnapshot(this.done));
}
- done = (success: boolean) => {
+ done: (success: boolean) => void = (success: boolean) => {
TestModule.markTestPassed(success);
};
- render() {
+ render(): React.Node {
return (
diff --git a/IntegrationTests/SizeFlexibilityUpdateTest.js b/IntegrationTests/SizeFlexibilityUpdateTest.js
index 2da24f0b920f9a..419083c57a319a 100644
--- a/IntegrationTests/SizeFlexibilityUpdateTest.js
+++ b/IntegrationTests/SizeFlexibilityUpdateTest.js
@@ -10,9 +10,9 @@
'use strict';
+const RCTNativeAppEventEmitter = require('react-native/Libraries/EventEmitter/RCTNativeAppEventEmitter');
const React = require('react');
const ReactNative = require('react-native');
-const RCTNativeAppEventEmitter = require('react-native/Libraries/EventEmitter/RCTNativeAppEventEmitter');
const {View} = ReactNative;
const {TestModule} = ReactNative.NativeModules;
@@ -46,15 +46,15 @@ class SizeFlexibilityUpdateTest extends React.Component {
}
}
- markPassed = () => {
+ markPassed: () => void = () => {
TestModule.markTestPassed(true);
finalState = true;
};
- rootViewDidChangeIntrinsicSize = (intrinsicSize: {
- width: number,
+ rootViewDidChangeIntrinsicSize: (intrinsicSize: {
height: number,
- }) => {
+ width: number,
+ }) => void = (intrinsicSize: {width: number, height: number}) => {
if (finalState) {
// If a test reaches its final state, it is not expected to do anything more
TestModule.markTestPassed(false);
@@ -99,7 +99,7 @@ class SizeFlexibilityUpdateTest extends React.Component {
}
};
- render() {
+ render(): React.Node {
return ;
}
}
diff --git a/IntegrationTests/TimersTest.js b/IntegrationTests/TimersTest.js
index c7eefb915333c3..8550c6f00eec6b 100644
--- a/IntegrationTests/TimersTest.js
+++ b/IntegrationTests/TimersTest.js
@@ -33,7 +33,7 @@ class TimersTest extends React.Component {
_immediateIDs: Set = new Set();
_animationFrameIDs: Set = new Set();
- state = {
+ state: State = {
count: 0,
done: false,
};
@@ -228,7 +228,7 @@ class TimersTest extends React.Component {
}
}
- render() {
+ render(): React.Node {
return (
diff --git a/IntegrationTests/WebSocketTest.js b/IntegrationTests/WebSocketTest.js
index 0d2cd5e0b4d9e7..fcc2d74cb8d35c 100644
--- a/IntegrationTests/WebSocketTest.js
+++ b/IntegrationTests/WebSocketTest.js
@@ -113,7 +113,7 @@ class WebSocketTest extends React.Component<{}, State> {
this.testConnect();
}
- testConnect = () => {
+ testConnect: () => void = () => {
this._connect();
this._waitFor(this._socketIsConnected, 5, connectSucceeded => {
if (!connectSucceeded) {
@@ -124,7 +124,7 @@ class WebSocketTest extends React.Component<{}, State> {
});
};
- testSendAndReceive = () => {
+ testSendAndReceive: () => void = () => {
this._sendTestMessage();
this._waitFor(this._receivedTestExpectedResponse, 5, messageReceived => {
if (!messageReceived) {
@@ -135,7 +135,7 @@ class WebSocketTest extends React.Component<{}, State> {
});
};
- testDisconnect = () => {
+ testDisconnect: () => void = () => {
this._disconnect();
this._waitFor(this._socketIsDisconnected, 5, disconnectSucceeded => {
TestModule.markTestPassed(disconnectSucceeded);
diff --git a/Libraries/ART/ART.xcodeproj/project.pbxproj b/Libraries/ART/ART.xcodeproj/project.pbxproj
deleted file mode 100644
index a78db70bb3ceaf..00000000000000
--- a/Libraries/ART/ART.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,669 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 46;
- objects = {
-
-/* Begin PBXBuildFile section */
- 0CF68B051AF0549300FF9E5C /* ARTGroup.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68ADE1AF0549300FF9E5C /* ARTGroup.m */; };
- 0CF68B061AF0549300FF9E5C /* ARTNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AE01AF0549300FF9E5C /* ARTNode.m */; };
- 0CF68B071AF0549300FF9E5C /* ARTRenderable.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AE21AF0549300FF9E5C /* ARTRenderable.m */; };
- 0CF68B081AF0549300FF9E5C /* ARTShape.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AE41AF0549300FF9E5C /* ARTShape.m */; };
- 0CF68B091AF0549300FF9E5C /* ARTSurfaceView.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AE61AF0549300FF9E5C /* ARTSurfaceView.m */; };
- 0CF68B0A1AF0549300FF9E5C /* ARTText.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AE81AF0549300FF9E5C /* ARTText.m */; };
- 0CF68B0B1AF0549300FF9E5C /* ARTBrush.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AEC1AF0549300FF9E5C /* ARTBrush.m */; };
- 0CF68B0C1AF0549300FF9E5C /* ARTLinearGradient.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AEE1AF0549300FF9E5C /* ARTLinearGradient.m */; };
- 0CF68B0D1AF0549300FF9E5C /* ARTPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AF01AF0549300FF9E5C /* ARTPattern.m */; };
- 0CF68B0E1AF0549300FF9E5C /* ARTRadialGradient.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AF21AF0549300FF9E5C /* ARTRadialGradient.m */; };
- 0CF68B0F1AF0549300FF9E5C /* ARTSolidColor.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AF41AF0549300FF9E5C /* ARTSolidColor.m */; };
- 0CF68B101AF0549300FF9E5C /* RCTConvert+ART.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AF71AF0549300FF9E5C /* RCTConvert+ART.m */; };
- 0CF68B111AF0549300FF9E5C /* ARTGroupManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AFA1AF0549300FF9E5C /* ARTGroupManager.m */; };
- 0CF68B121AF0549300FF9E5C /* ARTNodeManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AFC1AF0549300FF9E5C /* ARTNodeManager.m */; };
- 0CF68B131AF0549300FF9E5C /* ARTRenderableManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AFE1AF0549300FF9E5C /* ARTRenderableManager.m */; };
- 0CF68B141AF0549300FF9E5C /* ARTShapeManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68B001AF0549300FF9E5C /* ARTShapeManager.m */; };
- 0CF68B151AF0549300FF9E5C /* ARTSurfaceViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68B021AF0549300FF9E5C /* ARTSurfaceViewManager.m */; };
- 0CF68B161AF0549300FF9E5C /* ARTTextManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68B041AF0549300FF9E5C /* ARTTextManager.m */; };
- 325CF7AD1E5F2ABA00AC9606 /* ARTBrush.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AEC1AF0549300FF9E5C /* ARTBrush.m */; };
- 325CF7AE1E5F2ABA00AC9606 /* ARTLinearGradient.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AEE1AF0549300FF9E5C /* ARTLinearGradient.m */; };
- 325CF7AF1E5F2ABA00AC9606 /* ARTPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AF01AF0549300FF9E5C /* ARTPattern.m */; };
- 325CF7B01E5F2ABA00AC9606 /* ARTRadialGradient.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AF21AF0549300FF9E5C /* ARTRadialGradient.m */; };
- 325CF7B11E5F2ABA00AC9606 /* ARTSolidColor.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AF41AF0549300FF9E5C /* ARTSolidColor.m */; };
- 325CF7B21E5F2ABA00AC9606 /* ARTGroupManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AFA1AF0549300FF9E5C /* ARTGroupManager.m */; };
- 325CF7B31E5F2ABA00AC9606 /* ARTNodeManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AFC1AF0549300FF9E5C /* ARTNodeManager.m */; };
- 325CF7B41E5F2ABA00AC9606 /* ARTRenderableManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AFE1AF0549300FF9E5C /* ARTRenderableManager.m */; };
- 325CF7B51E5F2ABA00AC9606 /* ARTShapeManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68B001AF0549300FF9E5C /* ARTShapeManager.m */; };
- 325CF7B61E5F2ABA00AC9606 /* ARTSurfaceViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68B021AF0549300FF9E5C /* ARTSurfaceViewManager.m */; };
- 325CF7B71E5F2ABA00AC9606 /* ARTTextManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68B041AF0549300FF9E5C /* ARTTextManager.m */; };
- 325CF7B81E5F2ABA00AC9606 /* ARTGroup.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68ADE1AF0549300FF9E5C /* ARTGroup.m */; };
- 325CF7B91E5F2ABA00AC9606 /* ARTNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AE01AF0549300FF9E5C /* ARTNode.m */; };
- 325CF7BA1E5F2ABA00AC9606 /* ARTRenderable.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AE21AF0549300FF9E5C /* ARTRenderable.m */; };
- 325CF7BB1E5F2ABA00AC9606 /* ARTShape.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AE41AF0549300FF9E5C /* ARTShape.m */; };
- 325CF7BC1E5F2ABA00AC9606 /* ARTSurfaceView.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AE61AF0549300FF9E5C /* ARTSurfaceView.m */; };
- 325CF7BD1E5F2ABA00AC9606 /* ARTText.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AE81AF0549300FF9E5C /* ARTText.m */; };
- 325CF7BE1E5F2ABA00AC9606 /* RCTConvert+ART.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AF71AF0549300FF9E5C /* RCTConvert+ART.m */; };
- 6431E8A01F9A30AD00BA05C9 /* ARTTextFrame.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 0CF68AE91AF0549300FF9E5C /* ARTTextFrame.h */; };
- 6431E8A11F9A30AD00BA05C9 /* RCTConvert+ART.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 0CF68AF61AF0549300FF9E5C /* RCTConvert+ART.h */; };
- 6431E8A21F9A30B300BA05C9 /* ARTSurfaceView.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 0CF68AE51AF0549300FF9E5C /* ARTSurfaceView.h */; };
- 6431E8A31F9A30B700BA05C9 /* ARTContainer.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 0CF68ADC1AF0549300FF9E5C /* ARTContainer.h */; };
- 6431E8A41F9A30BA00BA05C9 /* ARTCGFloatArray.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 0CF68ADB1AF0549300FF9E5C /* ARTCGFloatArray.h */; };
- 6431E8A51F9A30BD00BA05C9 /* ARTBrush.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 0CF68AEB1AF0549300FF9E5C /* ARTBrush.h */; };
- 6431E8A61F9A312000BA05C9 /* ARTBrush.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 0CF68AEB1AF0549300FF9E5C /* ARTBrush.h */; };
- 6431E8A71F9A312000BA05C9 /* ARTCGFloatArray.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 0CF68ADB1AF0549300FF9E5C /* ARTCGFloatArray.h */; };
- 6431E8A81F9A312000BA05C9 /* ARTContainer.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 0CF68ADC1AF0549300FF9E5C /* ARTContainer.h */; };
- 6431E8A91F9A312000BA05C9 /* ARTSurfaceView.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 0CF68AE51AF0549300FF9E5C /* ARTSurfaceView.h */; };
- 6431E8AA1F9A312000BA05C9 /* ARTTextFrame.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 0CF68AE91AF0549300FF9E5C /* ARTTextFrame.h */; };
- 6431E8AB1F9A312000BA05C9 /* RCTConvert+ART.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 0CF68AF61AF0549300FF9E5C /* RCTConvert+ART.h */; };
- 6431E8AC1F9A316D00BA05C9 /* ARTBrush.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 0CF68AEB1AF0549300FF9E5C /* ARTBrush.h */; };
- 6431E8AD1F9A316D00BA05C9 /* ARTCGFloatArray.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 0CF68ADB1AF0549300FF9E5C /* ARTCGFloatArray.h */; };
- 6431E8AE1F9A316D00BA05C9 /* ARTContainer.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 0CF68ADC1AF0549300FF9E5C /* ARTContainer.h */; };
- 6431E8AF1F9A316D00BA05C9 /* ARTSurfaceView.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 0CF68AE51AF0549300FF9E5C /* ARTSurfaceView.h */; };
- 6431E8B01F9A316E00BA05C9 /* ARTTextFrame.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 0CF68AE91AF0549300FF9E5C /* ARTTextFrame.h */; };
- 6431E8B11F9A316E00BA05C9 /* RCTConvert+ART.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 0CF68AF61AF0549300FF9E5C /* RCTConvert+ART.h */; };
- 647647631F0BC33500C2D89B /* ARTTextManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68B041AF0549300FF9E5C /* ARTTextManager.m */; };
- 647647641F0BC33500C2D89B /* ARTGroupManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AFA1AF0549300FF9E5C /* ARTGroupManager.m */; };
- 647647651F0BC33500C2D89B /* ARTPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AF01AF0549300FF9E5C /* ARTPattern.m */; };
- 647647661F0BC33500C2D89B /* ARTText.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AE81AF0549300FF9E5C /* ARTText.m */; };
- 647647671F0BC33500C2D89B /* ARTNodeManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AFC1AF0549300FF9E5C /* ARTNodeManager.m */; };
- 647647681F0BC33500C2D89B /* ARTGroup.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68ADE1AF0549300FF9E5C /* ARTGroup.m */; };
- 647647691F0BC33500C2D89B /* ARTRenderableManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AFE1AF0549300FF9E5C /* ARTRenderableManager.m */; };
- 6476476A1F0BC33500C2D89B /* ARTSurfaceView.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AE61AF0549300FF9E5C /* ARTSurfaceView.m */; };
- 6476476B1F0BC33500C2D89B /* ARTRadialGradient.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AF21AF0549300FF9E5C /* ARTRadialGradient.m */; };
- 6476476C1F0BC33500C2D89B /* ARTSurfaceViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68B021AF0549300FF9E5C /* ARTSurfaceViewManager.m */; };
- 6476476D1F0BC33500C2D89B /* ARTShape.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AE41AF0549300FF9E5C /* ARTShape.m */; };
- 6476476E1F0BC33500C2D89B /* ARTRenderable.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AE21AF0549300FF9E5C /* ARTRenderable.m */; };
- 6476476F1F0BC33500C2D89B /* RCTConvert+ART.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AF71AF0549300FF9E5C /* RCTConvert+ART.m */; };
- 647647701F0BC33500C2D89B /* ARTNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AE01AF0549300FF9E5C /* ARTNode.m */; };
- 647647711F0BC33500C2D89B /* ARTSolidColor.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AF41AF0549300FF9E5C /* ARTSolidColor.m */; };
- 647647721F0BC33500C2D89B /* ARTLinearGradient.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AEE1AF0549300FF9E5C /* ARTLinearGradient.m */; };
- 647647731F0BC33500C2D89B /* ARTBrush.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68AEC1AF0549300FF9E5C /* ARTBrush.m */; };
- 647647741F0BC33500C2D89B /* ARTShapeManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CF68B001AF0549300FF9E5C /* ARTShapeManager.m */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXCopyFilesBuildPhase section */
- 0CF68ABF1AF0540F00FF9E5C /* Copy Headers */ = {
- isa = PBXCopyFilesBuildPhase;
- buildActionMask = 2147483647;
- dstPath = "include/$(PRODUCT_NAME)";
- dstSubfolderSpec = 16;
- files = (
- 6431E8AC1F9A316D00BA05C9 /* ARTBrush.h in Copy Headers */,
- 6431E8AD1F9A316D00BA05C9 /* ARTCGFloatArray.h in Copy Headers */,
- 6431E8AE1F9A316D00BA05C9 /* ARTContainer.h in Copy Headers */,
- 6431E8AF1F9A316D00BA05C9 /* ARTSurfaceView.h in Copy Headers */,
- 6431E8B01F9A316E00BA05C9 /* ARTTextFrame.h in Copy Headers */,
- 6431E8B11F9A316E00BA05C9 /* RCTConvert+ART.h in Copy Headers */,
- );
- name = "Copy Headers";
- runOnlyForDeploymentPostprocessing = 0;
- };
- 323A12851E5F266B004975B8 /* Copy Headers */ = {
- isa = PBXCopyFilesBuildPhase;
- buildActionMask = 2147483647;
- dstPath = include/ART;
- dstSubfolderSpec = 16;
- files = (
- 6431E8A61F9A312000BA05C9 /* ARTBrush.h in Copy Headers */,
- 6431E8A71F9A312000BA05C9 /* ARTCGFloatArray.h in Copy Headers */,
- 6431E8A81F9A312000BA05C9 /* ARTContainer.h in Copy Headers */,
- 6431E8A91F9A312000BA05C9 /* ARTSurfaceView.h in Copy Headers */,
- 6431E8AA1F9A312000BA05C9 /* ARTTextFrame.h in Copy Headers */,
- 6431E8AB1F9A312000BA05C9 /* RCTConvert+ART.h in Copy Headers */,
- );
- name = "Copy Headers";
- runOnlyForDeploymentPostprocessing = 0;
- };
- 647647761F0BC33500C2D89B /* Copy Headers */ = {
- isa = PBXCopyFilesBuildPhase;
- buildActionMask = 2147483647;
- dstPath = include/ART;
- dstSubfolderSpec = 16;
- files = (
- 6431E8A01F9A30AD00BA05C9 /* ARTTextFrame.h in Copy Headers */,
- 6431E8A11F9A30AD00BA05C9 /* RCTConvert+ART.h in Copy Headers */,
- 6431E8A21F9A30B300BA05C9 /* ARTSurfaceView.h in Copy Headers */,
- 6431E8A51F9A30BD00BA05C9 /* ARTBrush.h in Copy Headers */,
- 6431E8A41F9A30BA00BA05C9 /* ARTCGFloatArray.h in Copy Headers */,
- 6431E8A31F9A30B700BA05C9 /* ARTContainer.h in Copy Headers */,
- );
- name = "Copy Headers";
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXCopyFilesBuildPhase section */
-
-/* Begin PBXFileReference section */
- 0CF68AC11AF0540F00FF9E5C /* libART.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libART.a; sourceTree = BUILT_PRODUCTS_DIR; };
- 0CF68ADB1AF0549300FF9E5C /* ARTCGFloatArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARTCGFloatArray.h; sourceTree = ""; };
- 0CF68ADC1AF0549300FF9E5C /* ARTContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARTContainer.h; sourceTree = ""; };
- 0CF68ADD1AF0549300FF9E5C /* ARTGroup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARTGroup.h; sourceTree = ""; };
- 0CF68ADE1AF0549300FF9E5C /* ARTGroup.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARTGroup.m; sourceTree = ""; };
- 0CF68ADF1AF0549300FF9E5C /* ARTNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARTNode.h; sourceTree = ""; };
- 0CF68AE01AF0549300FF9E5C /* ARTNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARTNode.m; sourceTree = ""; };
- 0CF68AE11AF0549300FF9E5C /* ARTRenderable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARTRenderable.h; sourceTree = ""; };
- 0CF68AE21AF0549300FF9E5C /* ARTRenderable.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARTRenderable.m; sourceTree = ""; };
- 0CF68AE31AF0549300FF9E5C /* ARTShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARTShape.h; sourceTree = ""; };
- 0CF68AE41AF0549300FF9E5C /* ARTShape.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARTShape.m; sourceTree = ""; };
- 0CF68AE51AF0549300FF9E5C /* ARTSurfaceView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARTSurfaceView.h; sourceTree = ""; };
- 0CF68AE61AF0549300FF9E5C /* ARTSurfaceView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARTSurfaceView.m; sourceTree = ""; };
- 0CF68AE71AF0549300FF9E5C /* ARTText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARTText.h; sourceTree = ""; };
- 0CF68AE81AF0549300FF9E5C /* ARTText.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARTText.m; sourceTree = ""; };
- 0CF68AE91AF0549300FF9E5C /* ARTTextFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARTTextFrame.h; sourceTree = ""; };
- 0CF68AEB1AF0549300FF9E5C /* ARTBrush.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARTBrush.h; sourceTree = ""; };
- 0CF68AEC1AF0549300FF9E5C /* ARTBrush.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARTBrush.m; sourceTree = ""; };
- 0CF68AED1AF0549300FF9E5C /* ARTLinearGradient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARTLinearGradient.h; sourceTree = ""; };
- 0CF68AEE1AF0549300FF9E5C /* ARTLinearGradient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARTLinearGradient.m; sourceTree = ""; };
- 0CF68AEF1AF0549300FF9E5C /* ARTPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARTPattern.h; sourceTree = ""; };
- 0CF68AF01AF0549300FF9E5C /* ARTPattern.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARTPattern.m; sourceTree = ""; };
- 0CF68AF11AF0549300FF9E5C /* ARTRadialGradient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARTRadialGradient.h; sourceTree = ""; };
- 0CF68AF21AF0549300FF9E5C /* ARTRadialGradient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARTRadialGradient.m; sourceTree = ""; };
- 0CF68AF31AF0549300FF9E5C /* ARTSolidColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARTSolidColor.h; sourceTree = ""; };
- 0CF68AF41AF0549300FF9E5C /* ARTSolidColor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARTSolidColor.m; sourceTree = ""; };
- 0CF68AF61AF0549300FF9E5C /* RCTConvert+ART.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "RCTConvert+ART.h"; sourceTree = ""; };
- 0CF68AF71AF0549300FF9E5C /* RCTConvert+ART.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "RCTConvert+ART.m"; sourceTree = ""; };
- 0CF68AF91AF0549300FF9E5C /* ARTGroupManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARTGroupManager.h; sourceTree = ""; };
- 0CF68AFA1AF0549300FF9E5C /* ARTGroupManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARTGroupManager.m; sourceTree = ""; };
- 0CF68AFB1AF0549300FF9E5C /* ARTNodeManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARTNodeManager.h; sourceTree = ""; };
- 0CF68AFC1AF0549300FF9E5C /* ARTNodeManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARTNodeManager.m; sourceTree = ""; };
- 0CF68AFD1AF0549300FF9E5C /* ARTRenderableManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARTRenderableManager.h; sourceTree = ""; };
- 0CF68AFE1AF0549300FF9E5C /* ARTRenderableManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARTRenderableManager.m; sourceTree = ""; };
- 0CF68AFF1AF0549300FF9E5C /* ARTShapeManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARTShapeManager.h; sourceTree = ""; };
- 0CF68B001AF0549300FF9E5C /* ARTShapeManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARTShapeManager.m; sourceTree = ""; };
- 0CF68B011AF0549300FF9E5C /* ARTSurfaceViewManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARTSurfaceViewManager.h; sourceTree = ""; };
- 0CF68B021AF0549300FF9E5C /* ARTSurfaceViewManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARTSurfaceViewManager.m; sourceTree = ""; };
- 0CF68B031AF0549300FF9E5C /* ARTTextManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARTTextManager.h; sourceTree = ""; };
- 0CF68B041AF0549300FF9E5C /* ARTTextManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARTTextManager.m; sourceTree = ""; };
- 323A12871E5F266B004975B8 /* libART-tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libART-tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; };
- 6476477A1F0BC33500C2D89B /* libART-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libART-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- 0CF68ABE1AF0540F00FF9E5C /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 323A12841E5F266B004975B8 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 647647751F0BC33500C2D89B /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- 0CF68AB81AF0540F00FF9E5C = {
- isa = PBXGroup;
- children = (
- 0CF68AEA1AF0549300FF9E5C /* Brushes */,
- 0CF68AF81AF0549300FF9E5C /* ViewManagers */,
- 0CF68ADB1AF0549300FF9E5C /* ARTCGFloatArray.h */,
- 0CF68ADC1AF0549300FF9E5C /* ARTContainer.h */,
- 0CF68ADD1AF0549300FF9E5C /* ARTGroup.h */,
- 0CF68ADE1AF0549300FF9E5C /* ARTGroup.m */,
- 0CF68ADF1AF0549300FF9E5C /* ARTNode.h */,
- 0CF68AE01AF0549300FF9E5C /* ARTNode.m */,
- 0CF68AE11AF0549300FF9E5C /* ARTRenderable.h */,
- 0CF68AE21AF0549300FF9E5C /* ARTRenderable.m */,
- 0CF68AE31AF0549300FF9E5C /* ARTShape.h */,
- 0CF68AE41AF0549300FF9E5C /* ARTShape.m */,
- 0CF68AE51AF0549300FF9E5C /* ARTSurfaceView.h */,
- 0CF68AE61AF0549300FF9E5C /* ARTSurfaceView.m */,
- 0CF68AE71AF0549300FF9E5C /* ARTText.h */,
- 0CF68AE81AF0549300FF9E5C /* ARTText.m */,
- 0CF68AE91AF0549300FF9E5C /* ARTTextFrame.h */,
- 0CF68AF61AF0549300FF9E5C /* RCTConvert+ART.h */,
- 0CF68AF71AF0549300FF9E5C /* RCTConvert+ART.m */,
- 0CF68AC21AF0540F00FF9E5C /* Products */,
- );
- indentWidth = 2;
- sourceTree = "";
- tabWidth = 2;
- usesTabs = 0;
- };
- 0CF68AC21AF0540F00FF9E5C /* Products */ = {
- isa = PBXGroup;
- children = (
- 0CF68AC11AF0540F00FF9E5C /* libART.a */,
- 323A12871E5F266B004975B8 /* libART-tvOS.a */,
- 6476477A1F0BC33500C2D89B /* libART-macOS.a */,
- );
- name = Products;
- sourceTree = "";
- };
- 0CF68AEA1AF0549300FF9E5C /* Brushes */ = {
- isa = PBXGroup;
- children = (
- 0CF68AEB1AF0549300FF9E5C /* ARTBrush.h */,
- 0CF68AEC1AF0549300FF9E5C /* ARTBrush.m */,
- 0CF68AED1AF0549300FF9E5C /* ARTLinearGradient.h */,
- 0CF68AEE1AF0549300FF9E5C /* ARTLinearGradient.m */,
- 0CF68AEF1AF0549300FF9E5C /* ARTPattern.h */,
- 0CF68AF01AF0549300FF9E5C /* ARTPattern.m */,
- 0CF68AF11AF0549300FF9E5C /* ARTRadialGradient.h */,
- 0CF68AF21AF0549300FF9E5C /* ARTRadialGradient.m */,
- 0CF68AF31AF0549300FF9E5C /* ARTSolidColor.h */,
- 0CF68AF41AF0549300FF9E5C /* ARTSolidColor.m */,
- );
- path = Brushes;
- sourceTree = "";
- };
- 0CF68AF81AF0549300FF9E5C /* ViewManagers */ = {
- isa = PBXGroup;
- children = (
- 0CF68AF91AF0549300FF9E5C /* ARTGroupManager.h */,
- 0CF68AFA1AF0549300FF9E5C /* ARTGroupManager.m */,
- 0CF68AFB1AF0549300FF9E5C /* ARTNodeManager.h */,
- 0CF68AFC1AF0549300FF9E5C /* ARTNodeManager.m */,
- 0CF68AFD1AF0549300FF9E5C /* ARTRenderableManager.h */,
- 0CF68AFE1AF0549300FF9E5C /* ARTRenderableManager.m */,
- 0CF68AFF1AF0549300FF9E5C /* ARTShapeManager.h */,
- 0CF68B001AF0549300FF9E5C /* ARTShapeManager.m */,
- 0CF68B011AF0549300FF9E5C /* ARTSurfaceViewManager.h */,
- 0CF68B021AF0549300FF9E5C /* ARTSurfaceViewManager.m */,
- 0CF68B031AF0549300FF9E5C /* ARTTextManager.h */,
- 0CF68B041AF0549300FF9E5C /* ARTTextManager.m */,
- );
- path = ViewManagers;
- sourceTree = "";
- };
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
- 0CF68AC01AF0540F00FF9E5C /* ART */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 0CF68AD51AF0540F00FF9E5C /* Build configuration list for PBXNativeTarget "ART" */;
- buildPhases = (
- 0CF68ABD1AF0540F00FF9E5C /* Sources */,
- 0CF68ABE1AF0540F00FF9E5C /* Frameworks */,
- 0CF68ABF1AF0540F00FF9E5C /* Copy Headers */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = ART;
- productName = ART;
- productReference = 0CF68AC11AF0540F00FF9E5C /* libART.a */;
- productType = "com.apple.product-type.library.static";
- };
- 323A12861E5F266B004975B8 /* ART-tvOS */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 323A128D1E5F266B004975B8 /* Build configuration list for PBXNativeTarget "ART-tvOS" */;
- buildPhases = (
- 323A12831E5F266B004975B8 /* Sources */,
- 323A12841E5F266B004975B8 /* Frameworks */,
- 323A12851E5F266B004975B8 /* Copy Headers */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = "ART-tvOS";
- productName = "ART-tvOS";
- productReference = 323A12871E5F266B004975B8 /* libART-tvOS.a */;
- productType = "com.apple.product-type.library.static";
- };
- 647647611F0BC33500C2D89B /* ART-macOS */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 647647771F0BC33500C2D89B /* Build configuration list for PBXNativeTarget "ART-macOS" */;
- buildPhases = (
- 647647621F0BC33500C2D89B /* Sources */,
- 647647751F0BC33500C2D89B /* Frameworks */,
- 647647761F0BC33500C2D89B /* Copy Headers */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = "ART-macOS";
- productName = ART;
- productReference = 6476477A1F0BC33500C2D89B /* libART-macOS.a */;
- productType = "com.apple.product-type.library.static";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- 0CF68AB91AF0540F00FF9E5C /* Project object */ = {
- isa = PBXProject;
- attributes = {
- LastUpgradeCheck = 0940;
- TargetAttributes = {
- 0CF68AC01AF0540F00FF9E5C = {
- CreatedOnToolsVersion = 6.2;
- };
- 323A12861E5F266B004975B8 = {
- CreatedOnToolsVersion = 6.2;
- ProvisioningStyle = Automatic;
- };
- };
- };
- buildConfigurationList = 0CF68ABC1AF0540F00FF9E5C /* Build configuration list for PBXProject "ART" */;
- compatibilityVersion = "Xcode 3.2";
- developmentRegion = English;
- hasScannedForEncodings = 0;
- knownRegions = (
- en,
- );
- mainGroup = 0CF68AB81AF0540F00FF9E5C;
- productRefGroup = 0CF68AC21AF0540F00FF9E5C /* Products */;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- 0CF68AC01AF0540F00FF9E5C /* ART */,
- 323A12861E5F266B004975B8 /* ART-tvOS */,
- 647647611F0BC33500C2D89B /* ART-macOS */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXSourcesBuildPhase section */
- 0CF68ABD1AF0540F00FF9E5C /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 0CF68B161AF0549300FF9E5C /* ARTTextManager.m in Sources */,
- 0CF68B111AF0549300FF9E5C /* ARTGroupManager.m in Sources */,
- 0CF68B0D1AF0549300FF9E5C /* ARTPattern.m in Sources */,
- 0CF68B0A1AF0549300FF9E5C /* ARTText.m in Sources */,
- 0CF68B121AF0549300FF9E5C /* ARTNodeManager.m in Sources */,
- 0CF68B051AF0549300FF9E5C /* ARTGroup.m in Sources */,
- 0CF68B131AF0549300FF9E5C /* ARTRenderableManager.m in Sources */,
- 0CF68B091AF0549300FF9E5C /* ARTSurfaceView.m in Sources */,
- 0CF68B0E1AF0549300FF9E5C /* ARTRadialGradient.m in Sources */,
- 0CF68B151AF0549300FF9E5C /* ARTSurfaceViewManager.m in Sources */,
- 0CF68B081AF0549300FF9E5C /* ARTShape.m in Sources */,
- 0CF68B071AF0549300FF9E5C /* ARTRenderable.m in Sources */,
- 0CF68B101AF0549300FF9E5C /* RCTConvert+ART.m in Sources */,
- 0CF68B061AF0549300FF9E5C /* ARTNode.m in Sources */,
- 0CF68B0F1AF0549300FF9E5C /* ARTSolidColor.m in Sources */,
- 0CF68B0C1AF0549300FF9E5C /* ARTLinearGradient.m in Sources */,
- 0CF68B0B1AF0549300FF9E5C /* ARTBrush.m in Sources */,
- 0CF68B141AF0549300FF9E5C /* ARTShapeManager.m in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 323A12831E5F266B004975B8 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 325CF7B71E5F2ABA00AC9606 /* ARTTextManager.m in Sources */,
- 325CF7B21E5F2ABA00AC9606 /* ARTGroupManager.m in Sources */,
- 325CF7AF1E5F2ABA00AC9606 /* ARTPattern.m in Sources */,
- 325CF7BD1E5F2ABA00AC9606 /* ARTText.m in Sources */,
- 325CF7B31E5F2ABA00AC9606 /* ARTNodeManager.m in Sources */,
- 325CF7B81E5F2ABA00AC9606 /* ARTGroup.m in Sources */,
- 325CF7B41E5F2ABA00AC9606 /* ARTRenderableManager.m in Sources */,
- 325CF7BC1E5F2ABA00AC9606 /* ARTSurfaceView.m in Sources */,
- 325CF7B01E5F2ABA00AC9606 /* ARTRadialGradient.m in Sources */,
- 325CF7B61E5F2ABA00AC9606 /* ARTSurfaceViewManager.m in Sources */,
- 325CF7BB1E5F2ABA00AC9606 /* ARTShape.m in Sources */,
- 325CF7BA1E5F2ABA00AC9606 /* ARTRenderable.m in Sources */,
- 325CF7BE1E5F2ABA00AC9606 /* RCTConvert+ART.m in Sources */,
- 325CF7B91E5F2ABA00AC9606 /* ARTNode.m in Sources */,
- 325CF7B11E5F2ABA00AC9606 /* ARTSolidColor.m in Sources */,
- 325CF7AE1E5F2ABA00AC9606 /* ARTLinearGradient.m in Sources */,
- 325CF7AD1E5F2ABA00AC9606 /* ARTBrush.m in Sources */,
- 325CF7B51E5F2ABA00AC9606 /* ARTShapeManager.m in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 647647621F0BC33500C2D89B /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 647647631F0BC33500C2D89B /* ARTTextManager.m in Sources */,
- 647647641F0BC33500C2D89B /* ARTGroupManager.m in Sources */,
- 647647651F0BC33500C2D89B /* ARTPattern.m in Sources */,
- 647647661F0BC33500C2D89B /* ARTText.m in Sources */,
- 647647671F0BC33500C2D89B /* ARTNodeManager.m in Sources */,
- 647647681F0BC33500C2D89B /* ARTGroup.m in Sources */,
- 647647691F0BC33500C2D89B /* ARTRenderableManager.m in Sources */,
- 6476476A1F0BC33500C2D89B /* ARTSurfaceView.m in Sources */,
- 6476476B1F0BC33500C2D89B /* ARTRadialGradient.m in Sources */,
- 6476476C1F0BC33500C2D89B /* ARTSurfaceViewManager.m in Sources */,
- 6476476D1F0BC33500C2D89B /* ARTShape.m in Sources */,
- 6476476E1F0BC33500C2D89B /* ARTRenderable.m in Sources */,
- 6476476F1F0BC33500C2D89B /* RCTConvert+ART.m in Sources */,
- 647647701F0BC33500C2D89B /* ARTNode.m in Sources */,
- 647647711F0BC33500C2D89B /* ARTSolidColor.m in Sources */,
- 647647721F0BC33500C2D89B /* ARTLinearGradient.m in Sources */,
- 647647731F0BC33500C2D89B /* ARTBrush.m in Sources */,
- 647647741F0BC33500C2D89B /* ARTShapeManager.m in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin XCBuildConfiguration section */
- 0CF68AD31AF0540F00FF9E5C /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- COPY_PHASE_STRIP = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- ENABLE_TESTABILITY = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "DEBUG=1",
- "$(inherited)",
- );
- GCC_SYMBOLS_PRIVATE_EXTERN = NO;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 9.0;
- MACOSX_DEPLOYMENT_TARGET = 10.10;
- MTL_ENABLE_DEBUG_INFO = YES;
- ONLY_ACTIVE_ARCH = YES;
- SDKROOT = iphoneos;
- SKIP_INSTALL = YES;
- };
- name = Debug;
- };
- 0CF68AD41AF0540F00FF9E5C /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- COPY_PHASE_STRIP = NO;
- ENABLE_NS_ASSERTIONS = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 9.0;
- MACOSX_DEPLOYMENT_TARGET = 10.10;
- MTL_ENABLE_DEBUG_INFO = NO;
- SDKROOT = iphoneos;
- SKIP_INSTALL = YES;
- VALIDATE_PRODUCT = YES;
- };
- name = Release;
- };
- 0CF68AD61AF0540F00FF9E5C /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ARCHS = (
- "$(ARCHS_STANDARD)",
- arm64e,
- );
- OTHER_LDFLAGS = "-ObjC";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- };
- 0CF68AD71AF0540F00FF9E5C /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ARCHS = (
- "$(ARCHS_STANDARD)",
- arm64e,
- );
- OTHER_LDFLAGS = "-ObjC";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- };
- 323A128E1E5F266B004975B8 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- DEBUG_INFORMATION_FORMAT = dwarf;
- ENABLE_TESTABILITY = YES;
- GCC_NO_COMMON_BLOCKS = YES;
- OTHER_LDFLAGS = "-ObjC";
- PRODUCT_NAME = "$(TARGET_NAME)";
- SDKROOT = appletvos;
- SKIP_INSTALL = YES;
- TVOS_DEPLOYMENT_TARGET = 9.2;
- };
- name = Debug;
- };
- 323A128F1E5F266B004975B8 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- GCC_NO_COMMON_BLOCKS = YES;
- OTHER_LDFLAGS = "-ObjC";
- PRODUCT_NAME = "$(TARGET_NAME)";
- SDKROOT = appletvos;
- SKIP_INSTALL = YES;
- TVOS_DEPLOYMENT_TARGET = 9.2;
- };
- name = Release;
- };
- 647647781F0BC33500C2D89B /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- OTHER_LDFLAGS = "-ObjC";
- PRODUCT_NAME = "$(TARGET_NAME)";
- SDKROOT = macosx;
- };
- name = Debug;
- };
- 647647791F0BC33500C2D89B /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- OTHER_LDFLAGS = "-ObjC";
- PRODUCT_NAME = "$(TARGET_NAME)";
- SDKROOT = macosx;
- };
- name = Release;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- 0CF68ABC1AF0540F00FF9E5C /* Build configuration list for PBXProject "ART" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 0CF68AD31AF0540F00FF9E5C /* Debug */,
- 0CF68AD41AF0540F00FF9E5C /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 0CF68AD51AF0540F00FF9E5C /* Build configuration list for PBXNativeTarget "ART" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 0CF68AD61AF0540F00FF9E5C /* Debug */,
- 0CF68AD71AF0540F00FF9E5C /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 323A128D1E5F266B004975B8 /* Build configuration list for PBXNativeTarget "ART-tvOS" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 323A128E1E5F266B004975B8 /* Debug */,
- 323A128F1E5F266B004975B8 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 647647771F0BC33500C2D89B /* Build configuration list for PBXNativeTarget "ART-macOS" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 647647781F0BC33500C2D89B /* Debug */,
- 647647791F0BC33500C2D89B /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
-/* End XCConfigurationList section */
- };
- rootObject = 0CF68AB91AF0540F00FF9E5C /* Project object */;
-}
diff --git a/Libraries/ART/ARTGroup.m b/Libraries/ART/ARTGroup.m
index 56699114f4a3f2..da4a77141f27ff 100644
--- a/Libraries/ART/ARTGroup.m
+++ b/Libraries/ART/ARTGroup.m
@@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/
-#import "ARTGroup.h"
+#import
@implementation ARTGroup
diff --git a/Libraries/ART/ARTNode.m b/Libraries/ART/ARTNode.m
index be09b6400c1a05..1fdbf5176199cc 100644
--- a/Libraries/ART/ARTNode.m
+++ b/Libraries/ART/ARTNode.m
@@ -5,9 +5,9 @@
* LICENSE file in the root directory of this source tree.
*/
-#import "ARTNode.h"
+#import
-#import "ARTContainer.h"
+#import
@implementation ARTNode
diff --git a/Libraries/ART/ARTRenderable.m b/Libraries/ART/ARTRenderable.m
index 88349f8296e7b0..0d3ce7c3e48218 100644
--- a/Libraries/ART/ARTRenderable.m
+++ b/Libraries/ART/ARTRenderable.m
@@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/
-#import "ARTRenderable.h"
+#import
@implementation ARTRenderable
diff --git a/Libraries/ART/ARTShape.m b/Libraries/ART/ARTShape.m
index 8a1a7d6979f3e9..6b2d983ec7c4d8 100644
--- a/Libraries/ART/ARTShape.m
+++ b/Libraries/ART/ARTShape.m
@@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/
-#import "ARTShape.h"
+#import
@implementation ARTShape
diff --git a/Libraries/ART/ARTSurfaceView.m b/Libraries/ART/ARTSurfaceView.m
index 8fbbda8ace58ab..0311a1146500cc 100644
--- a/Libraries/ART/ARTSurfaceView.m
+++ b/Libraries/ART/ARTSurfaceView.m
@@ -5,11 +5,11 @@
* LICENSE file in the root directory of this source tree.
*/
-#import "ARTSurfaceView.h"
+#import
#import
-#import "ARTNode.h"
+#import
@implementation ARTSurfaceView
diff --git a/Libraries/ART/ARTText.m b/Libraries/ART/ARTText.m
index 5bcebdf5559942..924257cabea819 100644
--- a/Libraries/ART/ARTText.m
+++ b/Libraries/ART/ARTText.m
@@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/
-#import "ARTText.h"
+#import
#import
diff --git a/Libraries/ART/Brushes/ARTBrush.m b/Libraries/ART/Brushes/ARTBrush.m
index 969ad5d7edb363..9743ac57e133db 100644
--- a/Libraries/ART/Brushes/ARTBrush.m
+++ b/Libraries/ART/Brushes/ARTBrush.m
@@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/
-#import "ARTBrush.h"
+#import
#import
diff --git a/Libraries/ART/Brushes/ARTLinearGradient.m b/Libraries/ART/Brushes/ARTLinearGradient.m
index 20bd1af6233b4e..da98ac007877d7 100644
--- a/Libraries/ART/Brushes/ARTLinearGradient.m
+++ b/Libraries/ART/Brushes/ARTLinearGradient.m
@@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/
-#import "ARTLinearGradient.h"
+#import
#import
diff --git a/Libraries/ART/Brushes/ARTPattern.m b/Libraries/ART/Brushes/ARTPattern.m
index 70e0bd25f367b7..bb4a3844c07946 100644
--- a/Libraries/ART/Brushes/ARTPattern.m
+++ b/Libraries/ART/Brushes/ARTPattern.m
@@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/
-#import "ARTPattern.h"
+#import
#import
diff --git a/Libraries/ART/Brushes/ARTRadialGradient.m b/Libraries/ART/Brushes/ARTRadialGradient.m
index c36f6ce57fc1fc..309667115e2003 100644
--- a/Libraries/ART/Brushes/ARTRadialGradient.m
+++ b/Libraries/ART/Brushes/ARTRadialGradient.m
@@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/
-#import "ARTRadialGradient.h"
+#import
#import
diff --git a/Libraries/ART/Brushes/ARTSolidColor.m b/Libraries/ART/Brushes/ARTSolidColor.m
index 2ef02d43d98592..24d1d7ae70cb78 100644
--- a/Libraries/ART/Brushes/ARTSolidColor.m
+++ b/Libraries/ART/Brushes/ARTSolidColor.m
@@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/
-#import "ARTSolidColor.h"
+#import
#import
diff --git a/Libraries/ART/RCTConvert+ART.m b/Libraries/ART/RCTConvert+ART.m
index 3312e319436369..c1207e60210e36 100644
--- a/Libraries/ART/RCTConvert+ART.m
+++ b/Libraries/ART/RCTConvert+ART.m
@@ -10,10 +10,10 @@
#import
#import
-#import "ARTLinearGradient.h"
-#import "ARTPattern.h"
-#import "ARTRadialGradient.h"
-#import "ARTSolidColor.h"
+#import
+#import
+#import
+#import
@implementation RCTConvert (ART)
diff --git a/Libraries/ART/React-ART.podspec b/Libraries/ART/React-ART.podspec
index 8cf20a6e1199a8..09b53374abfa32 100644
--- a/Libraries/ART/React-ART.podspec
+++ b/Libraries/ART/React-ART.podspec
@@ -26,9 +26,9 @@ Pod::Spec.new do |s|
s.author = "Facebook, Inc. and its affiliates"
s.platforms = { :ios => "9.0", :tvos => "9.2", :osx => "10.14" } # TODO(macOS GH#214)
s.source = source
- s.source_files = "**/*.{h,m}"
+ s.source_files = "**/*.{m}"
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
- s.header_dir = "React"
+ s.header_dir = "ART"
- s.dependency "React-Core", version
+ s.dependency "React-Core/ARTHeaders", version
end
diff --git a/Libraries/ART/ViewManagers/ARTGroupManager.m b/Libraries/ART/ViewManagers/ARTGroupManager.m
index 9fb45d71bbdf4d..da035d0257aab8 100644
--- a/Libraries/ART/ViewManagers/ARTGroupManager.m
+++ b/Libraries/ART/ViewManagers/ARTGroupManager.m
@@ -5,9 +5,9 @@
* LICENSE file in the root directory of this source tree.
*/
-#import "ARTGroupManager.h"
+#import
-#import "ARTGroup.h"
+#import
#import "RCTConvert+ART.h"
@implementation ARTGroupManager
diff --git a/Libraries/ART/ViewManagers/ARTNodeManager.m b/Libraries/ART/ViewManagers/ARTNodeManager.m
index 52bbb86c6102e6..e5d08136ee4e64 100644
--- a/Libraries/ART/ViewManagers/ARTNodeManager.m
+++ b/Libraries/ART/ViewManagers/ARTNodeManager.m
@@ -5,9 +5,9 @@
* LICENSE file in the root directory of this source tree.
*/
-#import "ARTNodeManager.h"
+#import
-#import "ARTNode.h"
+#import
@implementation ARTNodeManager
diff --git a/Libraries/ART/ViewManagers/ARTRenderableManager.m b/Libraries/ART/ViewManagers/ARTRenderableManager.m
index ad0264965391e5..4d0e224c49312f 100644
--- a/Libraries/ART/ViewManagers/ARTRenderableManager.m
+++ b/Libraries/ART/ViewManagers/ARTRenderableManager.m
@@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/
-#import "ARTRenderableManager.h"
+#import
#import "RCTConvert+ART.h"
diff --git a/Libraries/ART/ViewManagers/ARTShapeManager.m b/Libraries/ART/ViewManagers/ARTShapeManager.m
index cb056e5d268877..c5e5a919adeee0 100644
--- a/Libraries/ART/ViewManagers/ARTShapeManager.m
+++ b/Libraries/ART/ViewManagers/ARTShapeManager.m
@@ -5,9 +5,9 @@
* LICENSE file in the root directory of this source tree.
*/
-#import "ARTShapeManager.h"
+#import
-#import "ARTShape.h"
+#import
#import "RCTConvert+ART.h"
@implementation ARTShapeManager
diff --git a/Libraries/ART/ViewManagers/ARTSurfaceViewManager.m b/Libraries/ART/ViewManagers/ARTSurfaceViewManager.m
index dd734a377955d3..1d8b155559381f 100644
--- a/Libraries/ART/ViewManagers/ARTSurfaceViewManager.m
+++ b/Libraries/ART/ViewManagers/ARTSurfaceViewManager.m
@@ -5,9 +5,9 @@
* LICENSE file in the root directory of this source tree.
*/
-#import "ARTSurfaceViewManager.h"
+#import
-#import "ARTSurfaceView.h"
+#import
@implementation ARTSurfaceViewManager
diff --git a/Libraries/ART/ViewManagers/ARTTextManager.m b/Libraries/ART/ViewManagers/ARTTextManager.m
index 35c53811fd9509..9ded7cd6772352 100644
--- a/Libraries/ART/ViewManagers/ARTTextManager.m
+++ b/Libraries/ART/ViewManagers/ARTTextManager.m
@@ -5,9 +5,9 @@
* LICENSE file in the root directory of this source tree.
*/
-#import "ARTTextManager.h"
+#import
-#import "ARTText.h"
+#import
#import "RCTConvert+ART.h"
@implementation ARTTextManager
diff --git a/Libraries/ActionSheetIOS/ActionSheetIOS.js b/Libraries/ActionSheetIOS/ActionSheetIOS.js
index f8dfab12dd3d34..5484f47b0fe8dd 100644
--- a/Libraries/ActionSheetIOS/ActionSheetIOS.js
+++ b/Libraries/ActionSheetIOS/ActionSheetIOS.js
@@ -9,11 +9,11 @@
*/
'use strict';
-const RCTActionSheetManager = require('../BatchedBridge/NativeModules')
- .ActionSheetManager;
+import RCTActionSheetManager from './NativeActionSheetManager';
const invariant = require('invariant');
const processColor = require('../StyleSheet/processColor');
+import type {NativeOrDynamicColorType} from '../Color/NativeOrDynamicColorType'; // TODO(macOS ISS#2323203)
/**
* Display action sheets and share sheets on iOS.
@@ -45,7 +45,7 @@ const ActionSheetIOS = {
+destructiveButtonIndex?: ?number,
+cancelButtonIndex?: ?number,
+anchor?: ?number,
- +tintColor?: number | string,
+ +tintColor?: number | string | NativeOrDynamicColorType, // TODO(macOS ISS#2323203)
|},
callback: (buttonIndex: number) => void,
) {
@@ -54,9 +54,12 @@ const ActionSheetIOS = {
'Options must be a valid object',
);
invariant(typeof callback === 'function', 'Must provide a valid callback');
+ invariant(RCTActionSheetManager, "ActionSheetManager does't exist");
+
+ const {tintColor, ...remainingOptions} = options;
RCTActionSheetManager.showActionSheetWithOptions(
- {...options, tintColor: processColor(options.tintColor)},
+ {...remainingOptions, tintColor: processColor(tintColor)},
callback,
);
},
@@ -101,6 +104,7 @@ const ActionSheetIOS = {
typeof successCallback === 'function',
'Must provide a valid successCallback',
);
+ invariant(RCTActionSheetManager, "ActionSheetManager does't exist");
RCTActionSheetManager.showShareActionSheetWithOptions(
{...options, tintColor: processColor(options.tintColor)},
failureCallback,
diff --git a/Libraries/ActionSheetIOS/NativeActionSheetManager.js b/Libraries/ActionSheetIOS/NativeActionSheetManager.js
new file mode 100644
index 00000000000000..d4514083807e6e
--- /dev/null
+++ b/Libraries/ActionSheetIOS/NativeActionSheetManager.js
@@ -0,0 +1,51 @@
+/**
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ * @flow
+ * @format
+ */
+
+'use strict';
+
+import type {TurboModule} from '../TurboModule/RCTExport';
+import * as TurboModuleRegistry from '../TurboModule/TurboModuleRegistry';
+import type {NativeOrDynamicColorType} from '../Color/NativeOrDynamicColorType'; // TODO(macOS ISS#2323203)
+
+export interface Spec extends TurboModule {
+ +getConstants: () => {||};
+ +showActionSheetWithOptions: (
+ options: {|
+ +title?: ?string,
+ +message?: ?string,
+ +options: ?Array,
+ // Supports Array as well.
+ +destructiveButtonIndex?: ?number,
+ +cancelButtonIndex?: ?number,
+ +anchor?: ?number,
+ +tintColor?: ?(number | NativeOrDynamicColorType), // TODO(macOS ISS#2323203)
+ |},
+ callback: (buttonIndex: number) => void,
+ ) => void;
+ +showShareActionSheetWithOptions: (
+ options: {|
+ +message?: ?string,
+ +url?: ?string,
+ +subject?: ?string,
+ +anchor?: ?number,
+ +tintColor?: ?(number | NativeOrDynamicColorType), // TODO(macOS ISS#2323203)
+ +excludedActivityTypes?: ?Array,
+ |},
+ failureCallback: (error: {|
+ +domain: string,
+ +code: string,
+ +userInfo?: ?Object,
+ +message: string,
+ |}) => void,
+ successCallback: (completed: boolean, activityType: ?string) => void,
+ ) => void;
+}
+
+export default (TurboModuleRegistry.get('ActionSheetManager'): ?Spec);
diff --git a/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj/project.pbxproj b/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj/project.pbxproj
deleted file mode 100644
index a810665841af7e..00000000000000
--- a/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,328 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 46;
- objects = {
-
-/* Begin PBXBuildFile section */
- 14C644C41AB0DFC900DE3C65 /* RCTActionSheetManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 14C644C21AB0DFC900DE3C65 /* RCTActionSheetManager.m */; };
- 649D87CE1F69D9BC0005AF18 /* RCTActionSheetManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 14C644C21AB0DFC900DE3C65 /* RCTActionSheetManager.m */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXFileReference section */
- 134814201AA4EA6300B7C361 /* libRCTActionSheet.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRCTActionSheet.a; sourceTree = BUILT_PRODUCTS_DIR; };
- 14C644C11AB0DFC900DE3C65 /* RCTActionSheetManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = RCTActionSheetManager.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
- 14C644C21AB0DFC900DE3C65 /* RCTActionSheetManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTActionSheetManager.m; sourceTree = ""; };
- 649D87D21F69D9BC0005AF18 /* libRCTActionSheet.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRCTActionSheet.a; sourceTree = BUILT_PRODUCTS_DIR; };
-/* End PBXFileReference section */
-
-/* Begin PBXGroup section */
- 134814211AA4EA7D00B7C361 /* Products */ = {
- isa = PBXGroup;
- children = (
- 134814201AA4EA6300B7C361 /* libRCTActionSheet.a */,
- );
- name = Products;
- sourceTree = "";
- };
- 58B511D21A9E6C8500147676 = {
- isa = PBXGroup;
- children = (
- 14C644C11AB0DFC900DE3C65 /* RCTActionSheetManager.h */,
- 14C644C21AB0DFC900DE3C65 /* RCTActionSheetManager.m */,
- 134814211AA4EA7D00B7C361 /* Products */,
- 649D87D21F69D9BC0005AF18 /* libRCTActionSheet.a */,
- );
- indentWidth = 2;
- sourceTree = "";
- tabWidth = 2;
- usesTabs = 0;
- };
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
- 58B511DA1A9E6C8500147676 /* RCTActionSheet */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RCTActionSheet" */;
- buildPhases = (
- 58B511D71A9E6C8500147676 /* Sources */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = RCTActionSheet;
- productName = RCTDataManager;
- productReference = 134814201AA4EA6300B7C361 /* libRCTActionSheet.a */;
- productType = "com.apple.product-type.library.static";
- };
- 649D87CC1F69D9BC0005AF18 /* RCTActionSheet-macOS */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 649D87CF1F69D9BC0005AF18 /* Build configuration list for PBXNativeTarget "RCTActionSheet-macOS" */;
- buildPhases = (
- 649D87CD1F69D9BC0005AF18 /* Sources */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = "RCTActionSheet-macOS";
- productName = RCTDataManager;
- productReference = 649D87D21F69D9BC0005AF18 /* libRCTActionSheet.a */;
- productType = "com.apple.product-type.library.static";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- 58B511D31A9E6C8500147676 /* Project object */ = {
- isa = PBXProject;
- attributes = {
- LastUpgradeCheck = 0940;
- ORGANIZATIONNAME = Facebook;
- TargetAttributes = {
- 58B511DA1A9E6C8500147676 = {
- CreatedOnToolsVersion = 6.1.1;
- };
- };
- };
- buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RCTActionSheet" */;
- compatibilityVersion = "Xcode 3.2";
- developmentRegion = English;
- hasScannedForEncodings = 0;
- knownRegions = (
- en,
- );
- mainGroup = 58B511D21A9E6C8500147676;
- productRefGroup = 58B511D21A9E6C8500147676;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- 58B511DA1A9E6C8500147676 /* RCTActionSheet */,
- 649D87CC1F69D9BC0005AF18 /* RCTActionSheet-macOS */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXSourcesBuildPhase section */
- 58B511D71A9E6C8500147676 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 14C644C41AB0DFC900DE3C65 /* RCTActionSheetManager.m in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 649D87CD1F69D9BC0005AF18 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 649D87CE1F69D9BC0005AF18 /* RCTActionSheetManager.m in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin XCBuildConfiguration section */
- 58B511ED1A9E6C8500147676 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- COPY_PHASE_STRIP = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- ENABLE_TESTABILITY = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "DEBUG=1",
- "$(inherited)",
- );
- GCC_SYMBOLS_PRIVATE_EXTERN = NO;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
- GCC_WARN_SHADOW = YES;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 9.0;
- MACOSX_DEPLOYMENT_TARGET = 10.10;
- MTL_ENABLE_DEBUG_INFO = YES;
- ONLY_ACTIVE_ARCH = YES;
- SDKROOT = iphoneos;
- SKIP_INSTALL = YES;
- WARNING_CFLAGS = (
- "-Werror",
- "-Wall",
- );
- };
- name = Debug;
- };
- 58B511EE1A9E6C8500147676 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- COPY_PHASE_STRIP = YES;
- ENABLE_NS_ASSERTIONS = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
- GCC_WARN_SHADOW = YES;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 9.0;
- MACOSX_DEPLOYMENT_TARGET = 10.10;
- MTL_ENABLE_DEBUG_INFO = NO;
- SDKROOT = iphoneos;
- SKIP_INSTALL = YES;
- VALIDATE_PRODUCT = YES;
- WARNING_CFLAGS = (
- "-Werror",
- "-Wall",
- );
- };
- name = Release;
- };
- 58B511F01A9E6C8500147676 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ARCHS = (
- "$(ARCHS_STANDARD)",
- arm64e,
- );
- CLANG_STATIC_ANALYZER_MODE = deep;
- LIBRARY_SEARCH_PATHS = "$(inherited)";
- OTHER_LDFLAGS = "-ObjC";
- PRODUCT_NAME = RCTActionSheet;
- RUN_CLANG_STATIC_ANALYZER = YES;
- };
- name = Debug;
- };
- 58B511F11A9E6C8500147676 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ARCHS = (
- "$(ARCHS_STANDARD)",
- arm64e,
- );
- CLANG_STATIC_ANALYZER_MODE = deep;
- LIBRARY_SEARCH_PATHS = "$(inherited)";
- OTHER_LDFLAGS = "-ObjC";
- PRODUCT_NAME = RCTActionSheet;
- RUN_CLANG_STATIC_ANALYZER = NO;
- };
- name = Release;
- };
- 649D87D01F69D9BC0005AF18 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_STATIC_ANALYZER_MODE = deep;
- LIBRARY_SEARCH_PATHS = "$(inherited)";
- OTHER_LDFLAGS = "-ObjC";
- PRODUCT_NAME = RCTActionSheet;
- RUN_CLANG_STATIC_ANALYZER = YES;
- SDKROOT = macosx;
- };
- name = Debug;
- };
- 649D87D11F69D9BC0005AF18 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_STATIC_ANALYZER_MODE = deep;
- LIBRARY_SEARCH_PATHS = "$(inherited)";
- OTHER_LDFLAGS = "-ObjC";
- PRODUCT_NAME = RCTActionSheet;
- RUN_CLANG_STATIC_ANALYZER = NO;
- SDKROOT = macosx;
- };
- name = Release;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RCTActionSheet" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 58B511ED1A9E6C8500147676 /* Debug */,
- 58B511EE1A9E6C8500147676 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RCTActionSheet" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 58B511F01A9E6C8500147676 /* Debug */,
- 58B511F11A9E6C8500147676 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 649D87CF1F69D9BC0005AF18 /* Build configuration list for PBXNativeTarget "RCTActionSheet-macOS" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 649D87D01F69D9BC0005AF18 /* Debug */,
- 649D87D11F69D9BC0005AF18 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
-/* End XCConfigurationList section */
- };
- rootObject = 58B511D31A9E6C8500147676 /* Project object */;
-}
diff --git a/Libraries/ActionSheetIOS/RCTActionSheetManager.m b/Libraries/ActionSheetIOS/RCTActionSheetManager.m
index e0e3a033807b90..88683524020142 100644
--- a/Libraries/ActionSheetIOS/RCTActionSheetManager.m
+++ b/Libraries/ActionSheetIOS/RCTActionSheetManager.m
@@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/
-#import "RCTActionSheetManager.h"
+#import
#import
#import
@@ -233,7 +233,7 @@ - (void)presentViewController:(UIViewController *)alertController
shareController.completionWithItemsHandler = ^(NSString *activityType, BOOL completed, __unused NSArray *returnedItems, NSError *activityError) {
if (activityError) {
failureCallback(activityError);
- } else {
+ } else if (completed) {
successCallback(@[@(completed), RCTNullIfNil(activityType)]);
}
};
diff --git a/Libraries/ActionSheetIOS/React-RCTActionSheet.podspec b/Libraries/ActionSheetIOS/React-RCTActionSheet.podspec
index aff1f81e67b454..75c9e8c455fa95 100644
--- a/Libraries/ActionSheetIOS/React-RCTActionSheet.podspec
+++ b/Libraries/ActionSheetIOS/React-RCTActionSheet.podspec
@@ -27,9 +27,9 @@ Pod::Spec.new do |s|
s.author = "Facebook, Inc. and its affiliates"
s.platforms = { :ios => "9.0", :tvos => "9.2", :osx => "10.14" } # TODO(macOS GH#214)
s.source = source
- s.source_files = "*.{h,m}"
+ s.source_files = "*.{m}"
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
- s.header_dir = "React"
+ s.header_dir = "RCTActionSheet"
- s.dependency "React-Core", version
+ s.dependency "React-Core/RCTActionSheetHeaders", version
end
diff --git a/Libraries/Alert/Alert.js b/Libraries/Alert/Alert.js
index 6d91d6901f1113..57d07fb542393f 100644
--- a/Libraries/Alert/Alert.js
+++ b/Libraries/Alert/Alert.js
@@ -10,11 +10,19 @@
'use strict';
-const AlertMacOS = require('AlertMacOS'); // TODO(macOS ISS#2323203)
-const NativeModules = require('../BatchedBridge/NativeModules');
-const RCTAlertManager = NativeModules.AlertManager;
-const Platform = require('../Utilities/Platform');
+import AlertMacOS from './AlertMacOS'; // TODO(macOS ISS#2323203)
+import Platform from '../Utilities/Platform';
+import NativeDialogManagerAndroid, {
+ type DialogOptions,
+} from '../NativeModules/specs/NativeDialogManagerAndroid';
+import RCTAlertManager from './RCTAlertManager';
+export type AlertType =
+ | 'default'
+ | 'plain-text'
+ | 'secure-text'
+ | 'login-password';
+export type AlertButtonStyle = 'default' | 'cancel' | 'destructive';
export type Buttons = Array<{
text?: string,
onPress?: ?Function,
@@ -23,22 +31,9 @@ export type Buttons = Array<{
type Options = {
cancelable?: ?boolean,
- onDismiss?: ?Function,
+ onDismiss?: ?() => void,
};
-export type AlertType = $Keys<{
- default: string,
- 'plain-text': string,
- 'secure-text': string,
- 'login-password': string,
-}>; // added export TODO(macOS ISS#2323203)
-
-export type AlertButtonStyle = $Keys<{
- default: string,
- cancel: string,
- destructive: string,
-}>;
-
/**
* Launches an alert dialog with the specified title and message.
*
@@ -56,55 +51,55 @@ class Alert {
} else if (Platform.OS === 'macos' /* TODO[(macOS ISS#2323203) */) {
AlertMacOS.prompt(title, message, buttons); // TODO](macOS ISS#2323203)
} else if (Platform.OS === 'android') {
- let config = {
+ if (!NativeDialogManagerAndroid) {
+ return;
+ }
+ const constants = NativeDialogManagerAndroid.getConstants();
+
+ const config: DialogOptions = {
title: title || '',
message: message || '',
cancelable: false,
};
- if (options) {
- config = {...config, cancelable: options.cancelable};
+ if (options && options.cancelable) {
+ config.cancelable = options.cancelable;
}
// At most three buttons (neutral, negative, positive). Ignore rest.
// The text 'OK' should be probably localized. iOS Alert does that in native.
+ const defaultPositiveText = 'OK';
const validButtons: Buttons = buttons
? buttons.slice(0, 3)
- : [{text: 'OK'}];
+ : [{text: defaultPositiveText}];
const buttonPositive = validButtons.pop();
const buttonNegative = validButtons.pop();
const buttonNeutral = validButtons.pop();
+
if (buttonNeutral) {
- config = {...config, buttonNeutral: buttonNeutral.text || ''};
+ config.buttonNeutral = buttonNeutral.text || '';
}
if (buttonNegative) {
- config = {...config, buttonNegative: buttonNegative.text || ''};
+ config.buttonNegative = buttonNegative.text || '';
}
if (buttonPositive) {
- config = {...config, buttonPositive: buttonPositive.text || ''};
+ config.buttonPositive = buttonPositive.text || defaultPositiveText;
}
- NativeModules.DialogManagerAndroid.showAlert(
- config,
- errorMessage => console.warn(errorMessage),
- (action, buttonKey) => {
- if (action === NativeModules.DialogManagerAndroid.buttonClicked) {
- if (
- buttonKey === NativeModules.DialogManagerAndroid.buttonNeutral
- ) {
- buttonNeutral.onPress && buttonNeutral.onPress();
- } else if (
- buttonKey === NativeModules.DialogManagerAndroid.buttonNegative
- ) {
- buttonNegative.onPress && buttonNegative.onPress();
- } else if (
- buttonKey === NativeModules.DialogManagerAndroid.buttonPositive
- ) {
- buttonPositive.onPress && buttonPositive.onPress();
- }
- } else if (action === NativeModules.DialogManagerAndroid.dismissed) {
- options && options.onDismiss && options.onDismiss();
+
+ const onAction = (action, buttonKey) => {
+ if (action === constants.buttonClicked) {
+ if (buttonKey === constants.buttonNeutral) {
+ buttonNeutral.onPress && buttonNeutral.onPress();
+ } else if (buttonKey === constants.buttonNegative) {
+ buttonNegative.onPress && buttonNegative.onPress();
+ } else if (buttonKey === constants.buttonPositive) {
+ buttonPositive.onPress && buttonPositive.onPress();
}
- },
- );
+ } else if (action === constants.dismissed) {
+ options && options.onDismiss && options.onDismiss();
+ }
+ };
+ const onError = errorMessage => console.warn(errorMessage);
+ NativeDialogManagerAndroid.showAlert(config, onError, onAction);
}
}
@@ -130,7 +125,7 @@ class Alert {
{
title: title || '',
type: 'plain-text',
- defaultValue: message,
+ defaultValue: message || '',
},
(id, value) => {
callback(value);
diff --git a/Libraries/Alert/AlertMacOS.js b/Libraries/Alert/AlertMacOS.js
index 97b5ff5f989f79..2535c7f52bb534 100644
--- a/Libraries/Alert/AlertMacOS.js
+++ b/Libraries/Alert/AlertMacOS.js
@@ -13,9 +13,9 @@
'use strict';
-import type {AlertType, AlertButtonStyle} from 'Alert';
+import type {AlertType, AlertButtonStyle} from './Alert';
-var RCTAlertManager = require('NativeModules').AlertManager;
+var RCTAlertManager = require('../BatchedBridge/NativeModules').AlertManager;
/**
* Array or buttons
diff --git a/Libraries/Alert/NativeAlertManager.js b/Libraries/Alert/NativeAlertManager.js
new file mode 100644
index 00000000000000..345fd08c6e65a2
--- /dev/null
+++ b/Libraries/Alert/NativeAlertManager.js
@@ -0,0 +1,34 @@
+/**
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ * @flow
+ * @format
+ */
+
+'use strict';
+
+import type {TurboModule} from '../TurboModule/RCTExport';
+import * as TurboModuleRegistry from '../TurboModule/TurboModuleRegistry';
+
+export type Args = {|
+ title?: string,
+ message?: string,
+ buttons?: Object, // TODO: have a better type
+ type?: string,
+ defaultValue?: string,
+ cancelButtonKey?: string,
+ destructiveButtonKey?: string,
+ keyboardType?: string,
+|};
+
+export interface Spec extends TurboModule {
+ +alertWithArgs: (
+ args: Args,
+ callback: (id: number, value: string) => void,
+ ) => void;
+}
+
+export default (TurboModuleRegistry.get('AlertManager'): ?Spec);
diff --git a/Libraries/Alert/RCTAlertManager.android.js b/Libraries/Alert/RCTAlertManager.android.js
index 843dec92fe47cb..43f49a94e50bb1 100644
--- a/Libraries/Alert/RCTAlertManager.android.js
+++ b/Libraries/Alert/RCTAlertManager.android.js
@@ -9,14 +9,18 @@
'use strict';
-const NativeModules = require('../BatchedBridge/NativeModules');
+import NativeDialogManagerAndroid from '../NativeModules/specs/NativeDialogManagerAndroid';
function emptyCallback() {}
module.exports = {
alertWithArgs: function(args, callback) {
// TODO(5998984): Polyfill it correctly with DialogManagerAndroid
- NativeModules.DialogManagerAndroid.showAlert(
+ if (!NativeDialogManagerAndroid) {
+ return;
+ }
+
+ NativeDialogManagerAndroid.showAlert(
args,
emptyCallback,
callback || emptyCallback,
diff --git a/Libraries/Alert/RCTAlertManager.ios.js b/Libraries/Alert/RCTAlertManager.ios.js
index 246967358982b9..8ededddf4b463c 100644
--- a/Libraries/Alert/RCTAlertManager.ios.js
+++ b/Libraries/Alert/RCTAlertManager.ios.js
@@ -10,6 +10,17 @@
'use strict';
-const RCTAlertManager = require('../BatchedBridge/NativeModules').AlertManager;
+import NativeAlertManager from './NativeAlertManager';
+import type {Args} from './NativeAlertManager';
-module.exports = RCTAlertManager;
+module.exports = {
+ alertWithArgs(
+ args: Args,
+ callback: (id: number, value: string) => void,
+ ): void {
+ if (NativeAlertManager == null) {
+ return;
+ }
+ NativeAlertManager.alertWithArgs(args, callback);
+ },
+};
diff --git a/Libraries/Alert/RCTAlertManager.macos.js b/Libraries/Alert/RCTAlertManager.macos.js
index 9e620057f70bac..c59417d2bb3b7f 100644
--- a/Libraries/Alert/RCTAlertManager.macos.js
+++ b/Libraries/Alert/RCTAlertManager.macos.js
@@ -12,6 +12,6 @@
'use strict';
-var RCTAlertManager = require('NativeModules').AlertManager;
+var RCTAlertManager = require('../BatchedBridge/NativeModules').AlertManager;
module.exports = RCTAlertManager;
diff --git a/Libraries/Animated/release/.gitignore b/Libraries/Animated/release/.gitignore
index 4c422f3bc92283..3d2bc62692c4b0 100644
--- a/Libraries/Animated/release/.gitignore
+++ b/Libraries/Animated/release/.gitignore
@@ -1,3 +1,2 @@
-/lib/
/dist/
/node_modules/
diff --git a/Libraries/Animated/release/package.json b/Libraries/Animated/release/package.json
index ec7fec05fd599f..0541b32e6d1cb0 100644
--- a/Libraries/Animated/release/package.json
+++ b/Libraries/Animated/release/package.json
@@ -30,5 +30,8 @@
"run-sequence": "^1.1.2",
"webpack": "1.11.0",
"webpack-stream": "^2.1.0"
- }
+ },
+ "beachball": {
+ "shouldPublish": false
+ }
}
diff --git a/Libraries/Animated/src/Animated.js b/Libraries/Animated/src/Animated.js
index 594a1b82fc1451..a14bf98f4c9e44 100644
--- a/Libraries/Animated/src/Animated.js
+++ b/Libraries/Animated/src/Animated.js
@@ -12,28 +12,31 @@
import Platform from '../../Utilities/Platform';
-const AnimatedImplementation = Platform.isTesting
- ? require('./AnimatedMock')
- : require('./AnimatedImplementation');
+const AnimatedMock = require('./AnimatedMock');
+const AnimatedImplementation = require('./AnimatedImplementation');
+
+const Animated = ((Platform.isTesting
+ ? AnimatedMock
+ : AnimatedImplementation): typeof AnimatedMock);
module.exports = {
- get FlatList() {
+ get FlatList(): any {
return require('./components/AnimatedFlatList');
},
- get Image() {
+ get Image(): any {
return require('./components/AnimatedImage');
},
- get ScrollView() {
+ get ScrollView(): any {
return require('./components/AnimatedScrollView');
},
- get SectionList() {
+ get SectionList(): any {
return require('./components/AnimatedSectionList');
},
- get Text() {
+ get Text(): any {
return require('./components/AnimatedText');
},
- get View() {
+ get View(): any {
return require('./components/AnimatedView');
},
- ...AnimatedImplementation,
+ ...Animated,
};
diff --git a/Libraries/Animated/src/AnimatedEvent.js b/Libraries/Animated/src/AnimatedEvent.js
index e06918ce5262e9..8e8c9c24068ce9 100644
--- a/Libraries/Animated/src/AnimatedEvent.js
+++ b/Libraries/Animated/src/AnimatedEvent.js
@@ -14,6 +14,7 @@ const NativeAnimatedHelper = require('./NativeAnimatedHelper');
const ReactNative = require('../../Renderer/shims/ReactNative');
const invariant = require('invariant');
+
const {shouldUseNativeDriver} = require('./NativeAnimatedHelper');
export type Mapping = {[key: string]: Mapping} | AnimatedValue;
@@ -26,7 +27,7 @@ function attachNativeEvent(
viewRef: any,
eventName: string,
argMapping: Array,
-) {
+): $TEMPORARY$object<{|detach: () => void|}> {
// Find animated values in `argMapping` and create an array representing their
// key path inside the `nativeEvent` object. Ex.: ['contentOffset', 'x'].
const eventMappings = [];
@@ -130,7 +131,7 @@ class AnimatedEvent {
this._attachedEvent && this._attachedEvent.detach();
}
- __getHandler() {
+ __getHandler(): any | ((...args: any) => void) {
if (this.__isNative) {
return this._callListeners;
}
diff --git a/Libraries/Animated/src/AnimatedImplementation.js b/Libraries/Animated/src/AnimatedImplementation.js
index 6195d9be811546..5ab98a5ce89ad6 100644
--- a/Libraries/Animated/src/AnimatedImplementation.js
+++ b/Libraries/Animated/src/AnimatedImplementation.js
@@ -403,7 +403,12 @@ const parallel = function(
const delay = function(time: number): CompositeAnimation {
// Would be nice to make a specialized implementation
- return timing(new AnimatedValue(0), {toValue: 0, delay: time, duration: 0});
+ return timing(new AnimatedValue(0), {
+ toValue: 0,
+ delay: time,
+ duration: 0,
+ useNativeDriver: false,
+ });
};
const stagger = function(
diff --git a/Libraries/Animated/src/AnimatedMock.js b/Libraries/Animated/src/AnimatedMock.js
index 2800560f5926b7..aed90a5ad05c19 100644
--- a/Libraries/Animated/src/AnimatedMock.js
+++ b/Libraries/Animated/src/AnimatedMock.js
@@ -110,7 +110,7 @@ const stagger = function(
return emptyAnimation;
};
-type LoopAnimationConfig = {iterations: number};
+type LoopAnimationConfig = {iterations: number, resetBeforeIteration?: boolean};
const loop = function(
animation: CompositeAnimation,
diff --git a/Libraries/Animated/src/AnimatedWeb.js b/Libraries/Animated/src/AnimatedWeb.js
index 995db03f67b2b6..648c8a0bcccf64 100644
--- a/Libraries/Animated/src/AnimatedWeb.js
+++ b/Libraries/Animated/src/AnimatedWeb.js
@@ -14,7 +14,7 @@ const AnimatedImplementation = require('./AnimatedImplementation');
module.exports = {
...AnimatedImplementation,
- div: AnimatedImplementation.createAnimatedComponent('div'),
- span: AnimatedImplementation.createAnimatedComponent('span'),
- img: AnimatedImplementation.createAnimatedComponent('img'),
+ div: (AnimatedImplementation.createAnimatedComponent('div'): $FlowFixMe),
+ span: (AnimatedImplementation.createAnimatedComponent('span'): $FlowFixMe),
+ img: (AnimatedImplementation.createAnimatedComponent('img'): $FlowFixMe),
};
diff --git a/Libraries/Animated/src/Easing.js b/Libraries/Animated/src/Easing.js
index 423c250fab4935..253a3e785aaa8a 100644
--- a/Libraries/Animated/src/Easing.js
+++ b/Libraries/Animated/src/Easing.js
@@ -61,14 +61,14 @@ class Easing {
/**
* A stepping function, returns 1 for any positive value of `n`.
*/
- static step0(n: number) {
+ static step0(n: number): number {
return n > 0 ? 1 : 0;
}
/**
* A stepping function, returns 1 if `n` is greater than or equal to 1.
*/
- static step1(n: number) {
+ static step1(n: number): number {
return n >= 1 ? 1 : 0;
}
@@ -78,7 +78,7 @@ class Easing {
*
* http://cubic-bezier.com/#0,0,1,1
*/
- static linear(t: number) {
+ static linear(t: number): number {
return t;
}
@@ -101,7 +101,7 @@ class Easing {
*
* http://easings.net/#easeInQuad
*/
- static quad(t: number) {
+ static quad(t: number): number {
return t * t;
}
@@ -111,7 +111,7 @@ class Easing {
*
* http://easings.net/#easeInCubic
*/
- static cubic(t: number) {
+ static cubic(t: number): number {
return t * t * t;
}
@@ -121,7 +121,7 @@ class Easing {
* n = 4: http://easings.net/#easeInQuart
* n = 5: http://easings.net/#easeInQuint
*/
- static poly(n: number) {
+ static poly(n: number): (t: number) => number {
return (t: number) => Math.pow(t, n);
}
@@ -130,7 +130,7 @@ class Easing {
*
* http://easings.net/#easeInSine
*/
- static sin(t: number) {
+ static sin(t: number): number {
return 1 - Math.cos((t * Math.PI) / 2);
}
@@ -139,7 +139,7 @@ class Easing {
*
* http://easings.net/#easeInCirc
*/
- static circle(t: number) {
+ static circle(t: number): number {
return 1 - Math.sqrt(1 - t * t);
}
@@ -148,7 +148,7 @@ class Easing {
*
* http://easings.net/#easeInExpo
*/
- static exp(t: number) {
+ static exp(t: number): number {
return Math.pow(2, 10 * (t - 1));
}
diff --git a/Libraries/Animated/src/NativeAnimatedHelper.js b/Libraries/Animated/src/NativeAnimatedHelper.js
index 05bd6e37a8a4d2..238a8fd2ba9d71 100644
--- a/Libraries/Animated/src/NativeAnimatedHelper.js
+++ b/Libraries/Animated/src/NativeAnimatedHelper.js
@@ -4,67 +4,82 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
- * @flow
+ * @flow strict-local
* @format
*/
'use strict';
-const NativeAnimatedModule = require('../../BatchedBridge/NativeModules')
- .NativeAnimatedModule;
-const NativeEventEmitter = require('../../EventEmitter/NativeEventEmitter');
-
-const invariant = require('invariant');
-
-import type {AnimationConfig} from './animations/Animation';
+import NativeEventEmitter from '../../EventEmitter/NativeEventEmitter';
import type {EventConfig} from './AnimatedEvent';
+import NativeAnimatedModule from './NativeAnimatedModule';
+import type {
+ EventMapping,
+ AnimatedNodeConfig,
+ AnimatingNodeConfig,
+} from './NativeAnimatedModule';
+import type {AnimationConfig, EndCallback} from './animations/Animation';
+import type {InterpolationConfigType} from './nodes/AnimatedInterpolation';
+import invariant from 'invariant';
let __nativeAnimatedNodeTagCount = 1; /* used for animated nodes */
let __nativeAnimationIdCount = 1; /* used for started animations */
-type EndResult = {finished: boolean};
-type EndCallback = (result: EndResult) => void;
-type EventMapping = {
- nativeEventPath: Array,
- animatedValueTag: ?number,
-};
-
let nativeEventEmitter;
+let queueConnections = false;
+let queue = [];
+
/**
- * Simple wrappers around NativeAnimatedModule to provide flow and autocmplete support for
+ * Simple wrappers around NativeAnimatedModule to provide flow and autocomplete support for
* the native module methods
*/
const API = {
- createAnimatedNode: function(tag: ?number, config: Object): void {
- assertNativeAnimatedModule();
+ enableQueue: function(): void {
+ queueConnections = true;
+ },
+ disableQueue: function(): void {
+ invariant(NativeAnimatedModule, 'Native animated module is not available');
+ queueConnections = false;
+ for (let q = 0, l = queue.length; q < l; q++) {
+ const args = queue[q];
+ NativeAnimatedModule.connectAnimatedNodes(args[0], args[1]);
+ }
+ queue.length = 0;
+ },
+ createAnimatedNode: function(tag: ?number, config: AnimatedNodeConfig): void {
+ invariant(NativeAnimatedModule, 'Native animated module is not available');
NativeAnimatedModule.createAnimatedNode(tag, config);
},
startListeningToAnimatedNodeValue: function(tag: ?number) {
- assertNativeAnimatedModule();
+ invariant(NativeAnimatedModule, 'Native animated module is not available');
NativeAnimatedModule.startListeningToAnimatedNodeValue(tag);
},
stopListeningToAnimatedNodeValue: function(tag: ?number) {
- assertNativeAnimatedModule();
+ invariant(NativeAnimatedModule, 'Native animated module is not available');
NativeAnimatedModule.stopListeningToAnimatedNodeValue(tag);
},
connectAnimatedNodes: function(parentTag: ?number, childTag: ?number): void {
- assertNativeAnimatedModule();
+ invariant(NativeAnimatedModule, 'Native animated module is not available');
+ if (queueConnections) {
+ queue.push([parentTag, childTag]);
+ return;
+ }
NativeAnimatedModule.connectAnimatedNodes(parentTag, childTag);
},
disconnectAnimatedNodes: function(
parentTag: ?number,
childTag: ?number,
): void {
- assertNativeAnimatedModule();
+ invariant(NativeAnimatedModule, 'Native animated module is not available');
NativeAnimatedModule.disconnectAnimatedNodes(parentTag, childTag);
},
startAnimatingNode: function(
animationId: ?number,
nodeTag: ?number,
- config: Object,
+ config: AnimatingNodeConfig,
endCallback: EndCallback,
): void {
- assertNativeAnimatedModule();
+ invariant(NativeAnimatedModule, 'Native animated module is not available');
NativeAnimatedModule.startAnimatingNode(
animationId,
nodeTag,
@@ -73,41 +88,41 @@ const API = {
);
},
stopAnimation: function(animationId: ?number) {
- assertNativeAnimatedModule();
+ invariant(NativeAnimatedModule, 'Native animated module is not available');
NativeAnimatedModule.stopAnimation(animationId);
},
setAnimatedNodeValue: function(nodeTag: ?number, value: ?number): void {
- assertNativeAnimatedModule();
+ invariant(NativeAnimatedModule, 'Native animated module is not available');
NativeAnimatedModule.setAnimatedNodeValue(nodeTag, value);
},
setAnimatedNodeOffset: function(nodeTag: ?number, offset: ?number): void {
- assertNativeAnimatedModule();
+ invariant(NativeAnimatedModule, 'Native animated module is not available');
NativeAnimatedModule.setAnimatedNodeOffset(nodeTag, offset);
},
flattenAnimatedNodeOffset: function(nodeTag: ?number): void {
- assertNativeAnimatedModule();
+ invariant(NativeAnimatedModule, 'Native animated module is not available');
NativeAnimatedModule.flattenAnimatedNodeOffset(nodeTag);
},
extractAnimatedNodeOffset: function(nodeTag: ?number): void {
- assertNativeAnimatedModule();
+ invariant(NativeAnimatedModule, 'Native animated module is not available');
NativeAnimatedModule.extractAnimatedNodeOffset(nodeTag);
},
connectAnimatedNodeToView: function(
nodeTag: ?number,
viewTag: ?number,
): void {
- assertNativeAnimatedModule();
+ invariant(NativeAnimatedModule, 'Native animated module is not available');
NativeAnimatedModule.connectAnimatedNodeToView(nodeTag, viewTag);
},
disconnectAnimatedNodeFromView: function(
nodeTag: ?number,
viewTag: ?number,
): void {
- assertNativeAnimatedModule();
+ invariant(NativeAnimatedModule, 'Native animated module is not available');
NativeAnimatedModule.disconnectAnimatedNodeFromView(nodeTag, viewTag);
},
dropAnimatedNode: function(tag: ?number): void {
- assertNativeAnimatedModule();
+ invariant(NativeAnimatedModule, 'Native animated module is not available');
NativeAnimatedModule.dropAnimatedNode(tag);
},
addAnimatedEventToView: function(
@@ -115,7 +130,7 @@ const API = {
eventName: string,
eventMapping: EventMapping,
) {
- assertNativeAnimatedModule();
+ invariant(NativeAnimatedModule, 'Native animated module is not available');
NativeAnimatedModule.addAnimatedEventToView(
viewTag,
eventName,
@@ -127,7 +142,7 @@ const API = {
eventName: string,
animatedNodeTag: ?number,
) {
- assertNativeAnimatedModule();
+ invariant(NativeAnimatedModule, 'Native animated module is not available');
NativeAnimatedModule.removeAnimatedEventFromView(
viewTag,
eventName,
@@ -174,6 +189,7 @@ const TRANSFORM_WHITELIST = {
rotate: true,
rotateX: true,
rotateY: true,
+ rotateZ: true,
perspective: true,
};
@@ -197,7 +213,12 @@ function addWhitelistedInterpolationParam(param: string): void {
SUPPORTED_INTERPOLATION_PARAMS[param] = true;
}
-function validateTransform(configs: Array