diff --git a/.circleci/config.yml b/.circleci/config.yml index ef64995a7c11d..d6d8e8832304e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,5 +1,28 @@ version: 2.1 +parameters: + release: + type: boolean + default: false + release_google: + type: boolean + default: false + release_apk: + type: boolean + default: false + release_simulator: + type: boolean + default: false + shell_ios: + type: boolean + default: false + shell_android: + type: boolean + default: false + expo_client: + type: boolean + default: false + orbs: job-status-change: expo/job-status-change@1.0.11 slack-job-status-notification: expo/slack-job-status-notification@1.0.6 @@ -130,17 +153,6 @@ commands: - run: name: Update submodules command: git submodule update --init - install_puppeteer_dependencies: - steps: - - run: - name: Install Puppeteer dependencies - command: | - sudo apt-get install -yq \ - gconf-service libasound2 libatk1.0-0 libatk-bridge2.0-0 libc6 libcairo2 libcups2 libdbus-1-3 \ - libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 \ - libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 \ - libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates \ - fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget libgbm-dev fetch_cocoapods_specs: steps: - run: @@ -228,19 +240,12 @@ commands: executors: android: docker: - - image: circleci/android:api-28-ndk-r17b + - image: circleci/android:api-29-ndk resource_class: xlarge js: docker: - image: circleci/node:lts-buster resource_class: small - web: - docker: - - image: circleci/node:13.8.0-buster-browsers - working_directory: /home/circleci/expo - resource_class: small - environment: - USER: circleci mac: macos: # https://circleci.com/docs/2.0/testing-ios/#supported-xcode-versions xcode: '11.4.0' @@ -260,266 +265,57 @@ executors: GIT_LFS_SKIP_SMUDGE: 1 workflows: - docs: - jobs: - - docs - - docs_deploy: - requires: - - docs - filters: - branches: - only: - - master - # JavaScript packages that make up the SDK - sdk: - jobs: - - expo_sdk - # E2E SDK testing - - web_test_suite - - ios_test_suite - # Android and iOS clients client: + unless: << pipeline.parameters.release >> jobs: - - home - - expotools - - client_android: - filters: # run for ALL branches, and android tags - tags: - only: - - /^android-google-v*/ - - /^android-apk-v*/ + - client_android # Disabled until further notice # See https://exponent-internal.slack.com/archives/C1QNF5L3C/p1576852692010900 # - test_suite_publish # - android_test_suite: # requires: # - test_suite_publish - - android_unit_tests + - client_ios + + release_simulator: + when: << pipeline.parameters.release_simulator >> + jobs: + - client_ios + - client_ios_simulator_release: + requires: + - client_ios + + release_google: + when: << pipeline.parameters.release_google >> + jobs: + - client_android - client_android_release_google_play: requires: - client_android - filters: # run for NO branches, and android-google-v* tags - branches: - ignore: /.*/ - tags: - only: /^android-google-v*/ + release_apk: + when: << pipeline.parameters.release_apk >> + jobs: + - client_android - client_android_apk_release: requires: - client_android - filters: # run for NO branches, and android-apk-v* tags - branches: - ignore: /.*/ - tags: - only: /^android-apk-v*/ - - client_ios: - filters: # run for ALL branches, and ios-simulator-v* tags - tags: - only: /^ios-simulator-v*/ - - client_ios_simulator_release: - requires: - - client_ios - filters: # run for NO branches, and ios-simulator-v* tags - branches: - ignore: /.*/ - tags: - only: /^ios-simulator-v*/ - shell_app: + shell_app_ios: + when: << pipeline.parameters.shell_ios >> jobs: - - shell_app_ios_approve_build: - type: approval - filters: - branches: - only: - - /sdk-\d+/ - - /.*all-ci.*/ - shell_app_ios_build: upload: true - requires: - - shell_app_ios_approve_build - - shell_app_android_approve_build: - type: approval - filters: - branches: - only: - - /sdk-\d+/ - - /.*all-ci.*/ - - shell_app_android_build: - requires: - - shell_app_android_approve_build - client_shell_app: + shell_app_android: + when: << pipeline.parameters.shell_android >> jobs: - - expo_client_approve_build: - type: approval - filters: - branches: - only: - - /sdk-\d+/ - - /.*all-ci.*/ - - expo_client_build: - requires: - - expo_client_approve_build - shell_app_nightly: - triggers: - - schedule: - cron: '20 5 * * 2,4,6' - filters: - branches: - only: - - master + - shell_app_android_build + expo_client_build: + when: << pipeline.parameters.expo_client >> jobs: - - shell_app_ios_build: - upload: false + - expo_client_build jobs: - expo_sdk: - executor: js - steps: - - setup - - skip_unless_changed: - workflow_name: sdk - paths: package.json yarn.lock packages tools/expotools - - update_submodules - - restore_yarn_cache - - yarn_install: - working_directory: ~/project - - save_yarn_cache - - run: - name: Check packages - command: expotools check-packages - - run: - name: Run Danger - working_directory: ~/project - command: yarn danger ci - - job-status-change/status - - slack-job-status-notification/notify: - only_for_branches: master sdk-* - slack_webhook: $SLACK_API_WEBHOOK - - web_test_suite: - executor: web - steps: - - setup - - skip_unless_changed: - workflow_name: sdk - paths: apps/bare-expo apps/test-suite package.json yarn.lock packages - - update_submodules - - restore_yarn_cache - - yarn_install: - working_directory: ~/expo - - save_yarn_cache - - yarn: - command: test:web - working_directory: ~/expo/apps/bare-expo - - job-status-change/status - - slack-job-status-notification/notify: - only_for_branches: master sdk-* - slack_webhook: $SLACK_WEB_WEBHOOK - - home: - executor: js - steps: - - setup - - skip_unless_changed: - workflow_name: client - paths: home package.json yarn.lock - - update_submodules - - restore_yarn_cache - - yarn_install: - working_directory: ~/project - - save_yarn_cache - - yarn: - command: jest --maxWorkers 1 - working_directory: ~/project/home - - yarn: - command: lint - working_directory: ~/project/home - - job-status-change/status - - slack-job-status-notification/notify: - only_for_branches: master sdk-* - slack_webhook: $SLACK_API_WEBHOOK - - expotools: - executor: js - steps: - - setup - - skip_unless_changed: - workflow_name: client - paths: tools/expotools - # We can't use yarn_restore_and_install since it - # triggers the postinstall script which we don't - # want to do here. - - restore_yarn_cache: - working_directory: ~/project/tools/expotools - - yarn: - command: install --ignore-scripts - working_directory: ~/project/tools/expotools - - save_yarn_cache: - working_directory: ~/project/tools/expotools - - yarn: - command: tsc - working_directory: ~/project/tools/expotools - - ios_test_suite: - executor: mac - #parallelism: 8 - steps: - - setup - - skip_unless_changed: - workflow_name: sdk - paths: apps/bare-expo apps/test-suite package.json yarn.lock packages Gemfile .ruby-version - - bundle_install - - update_submodules - - # Simulators are more likely to fail. Try them first - - run: - name: Pull Detox - working_directory: ~/project/apps/bare-expo - command: brew tap wix/brew - - run: - name: Install iOS simulators - working_directory: ~/project/apps/bare-expo - command: brew install applesimutils - - run: - name: Install Watchman - working_directory: ~/project/apps/bare-expo - command: brew install watchman - - ## Yarn takes a while to run - - restore_yarn_cache - - yarn_install: - working_directory: ~/project - - save_yarn_cache - - ## Detox - - run: - name: Clean Detox - working_directory: ~/project/apps/bare-expo - command: yarn detox:clean - - run: - name: Build iOS project for Detox - working_directory: ~/project/apps/bare-expo - no_output_timeout: 30m - command: yarn ios:detox:build:release - - run: - name: Run tests - working_directory: ~/project/apps/bare-expo - command: yarn ios:detox:test:release - # Store images of build failures - - store_artifacts: - path: ~/project/apps/bare-expo/artifacts - # command: circleci tests glob "__e2e__/*.test.js" | circleci tests split --split-by=timings | xargs -n 1 yarn ci:detox-test-release --cleanup -f --workers=8 - # environment: - # JEST_JUNIT_OUTPUT: ./__e2e__/results/jest/results.xml - # - store_test_results: - # path: ~/project/apps/bare-expo/__e2e__/results - - - job-status-change/status - - slack-job-status-notification/notify: - only_for_branches: master sdk-* - slack_webhook: $SLACK_IOS_WEBHOOK - client_ios: executor: mac steps: @@ -721,36 +517,6 @@ jobs: only_for_branches: master sdk-* slack_webhook: $SLACK_ANDROID_WEBHOOK - android_unit_tests: - executor: android - steps: - - setup - - skip_unless_changed: - workflow_name: client - paths: android fastlane tools/expotools Gemfile .ruby-version package.json yarn.lock - - install_yarn - - update_submodules - - restore_yarn_cache - - yarn_install: - working_directory: ~/project - - save_yarn_cache - - restore_gradle_cache - - run: - name: Android Unit tests - command: expotools android-unit-tests - working_directory: ~/project - - save_gradle_cache - - run: - name: Save test results - command: | - mkdir -p ~/test-results/junit/ - find . -type f -regex ".*/packages/.*/build/test-results/.*xml" -exec cp {} ~/test-results/junit/ \; - when: always - - store_test_results: - path: ~/test-results - - store_artifacts: - path: ~/test-results/junit - client_android_apk_release: executor: js steps: @@ -778,60 +544,6 @@ jobs: working_directory: ~/project command: fastlane android prod_release - docs: - executor: js - resource_class: xlarge # TODO: Use less than 8Gib of ram to build a static site - steps: - - setup - - skip_unless_changed: - workflow_name: docs - paths: docs - - update_submodules - - install_puppeteer_dependencies - - yarn_install: - working_directory: docs - - run: - name: Run Danger - working_directory: docs - command: yarn danger ci - - yarn: - command: export - working_directory: docs - - run: - name: Export server - working_directory: docs - command: yarn run export-server - background: true - - run: - name: Test links - working_directory: docs - command: yarn run test-links http://127.0.0.1:8000 - - run: mkdir -p /tmp/workspace/ - - run: - working_directory: docs - command: mv out /tmp/workspace/site - - persist_to_workspace: - root: /tmp/workspace - paths: - - site - - job-status-change/status - - slack-job-status-notification/notify: - only_for_branches: master - slack_webhook: $SLACK_DOCS_WEBHOOK - - docs_deploy: - executor: js - steps: - - setup - - skip_unless_changed: - workflow_name: docs - paths: docs - - run: sudo apt-get install awscli - - attach_workspace: - at: /tmp/workspace - - deploy: - command: docs/deploy.sh /tmp/workspace/site - # Disabled until further notice # See https://exponent-internal.slack.com/archives/C1QNF5L3C/p1576852692010900 # test_suite_publish: diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index d75b5d3f7a048..347c733cc57d4 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,3 +1,6 @@ +# Ignore CHANGELOG.md files to prevent Danger.js from triggering code owner reviews +/packages/**/CHANGELOG.md @ghost + /packages/@unimodules/core @sjchmiela @tsapeta /packages/@unimodules/react-native-adapter @sjchmiela @tsapeta /packages/babel-preset-expo @brentvatne @@ -66,6 +69,8 @@ /packages/expo-sharing @sjchmiela @bbarthec /packages/expo-sms @bbarthec /packages/expo-speech @sjchmiela @mczernek +/packages/expo-splash-screen @bbarthec +/packages/expo-splash-screen-command @bbarthec /packages/expo-sqlite @sjchmiela @mczernek /packages/expo-store-review @EvanBacon @tsapeta /packages/expo-task-manager @tsapeta @mczernek diff --git a/.github/PULL_REQUEST_TEMPLATE b/.github/PULL_REQUEST_TEMPLATE index ed8fd55d371c1..81ae9a1d3e33d 100644 --- a/.github/PULL_REQUEST_TEMPLATE +++ b/.github/PULL_REQUEST_TEMPLATE @@ -1,12 +1,17 @@ # Why -Please describe the motivation for this PR, and link to relevant GitHub issues, forums posts, or feature requests. + # How -How did you build this feature or fix this bug and why? + # Test Plan -Please describe how you tested this change and how a reviewer could reproduce your test, especially if this PR does not include automated tests! If possible, please also provide terminal output and/or screenshots demonstrating your test/reproduction. - + diff --git a/.github/workflows/android-unit-tests.yml b/.github/workflows/android-unit-tests.yml new file mode 100644 index 0000000000000..6166ccb546c25 --- /dev/null +++ b/.github/workflows/android-unit-tests.yml @@ -0,0 +1,52 @@ +name: Android Unit Tests + +on: + push: + branches: [ master ] + paths: + - .github/workflows/android-unit-tests.yml + - 'android/**' + - 'fastlane/**' + - 'tools/expotools/**' + - yarn.lock + pull_request: + branches: [ master ] + paths: + - .github/workflows/android-unit-tests.yml + - 'android/**' + - 'fastlane/**' + - 'tools/expotools/**' + - yarn.lock + +jobs: + test: + runs-on: ubuntu-18.04 + steps: + - name: Check out repository + uses: actions/checkout@v2 + with: + submodules: true + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + - uses: actions/cache@v1 + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - run: yarn install --frozen-lockfile + - uses: actions/cache@v1 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('android/*.gradle*') }} + restore-keys: | + ${{ runner.os }}-gradle- + - run: echo "::add-path::$(pwd)/bin" + - run: expotools android-unit-tests + - name: Save test results + if: always() + uses: actions/upload-artifact@v2 + with: + name: test-results + path: packages/**/build/test-results/*xml diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml new file mode 100644 index 0000000000000..0987725506879 --- /dev/null +++ b/.github/workflows/danger.yml @@ -0,0 +1,31 @@ +name: Danger + +on: + pull_request: + branches: [ master ] + paths: + - .github/workflows/danger.yml + - packages/** + - yarn.lock + - dangerfile.ts + +jobs: + run: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + - uses: actions/cache@v1 + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - run: yarn install --frozen-lockfile + - run: yarn danger ci + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000000000..7d11e914f4e97 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,66 @@ +name: docs + +defaults: + run: + shell: bash + working-directory: docs + +on: + push: + branches: [ master ] + paths: + - 'docs/**' + - '.github/workflows/docs.yml' + pull_request: + branches: [ master ] + paths: + - 'docs/**' + - '.github/workflows/docs.yml' + +jobs: + docs: + runs-on: ubuntu-18.04 + steps: + - name: Check out repository + uses: actions/checkout@v2 + with: + submodules: true + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + - uses: actions/cache@v1 + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('docs/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - run: yarn install --frozen-lockfile + - run: yarn danger ci + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - run: yarn export + timeout-minutes: 15 + - name: test links + run: | + yarn export-server & + while ! nc -z localhost 8000; do + sleep 1 + done + yarn test-links http://127.0.0.1:8000 + timeout-minutes: 1 + - run: sudo apt-get install awscli + - run: ./deploy.sh + if: ${{ github.event.ref == 'refs/heads/master' }} + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + - uses: 8398a7/action-slack@v3 + if: failure() && github.event.ref == 'refs/heads/master' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SLACK_WEBHOOK_URL: ${{ secrets.slack_webhook_docs }} + with: + channel: '#docs' + status: ${{ job.status }} + fields: commit,author,action,message + author_name: docs build diff --git a/.github/workflows/expotools.yml b/.github/workflows/expotools.yml new file mode 100644 index 0000000000000..9bc337f701ba9 --- /dev/null +++ b/.github/workflows/expotools.yml @@ -0,0 +1,32 @@ +name: Expotools + +on: + push: + branches: [ master, 'sdk-*' ] + paths: + - .github/workflows/expotools.yml + - tools/expotools/** + pull_request: + branches: [ master ] + paths: + - .github/workflows/expotools.yml + - tools/expotools/** + +jobs: + build: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + - uses: actions/cache@v1 + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('tools/expotools/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - run: yarn install --ignore-scripts --frozen-lockfile + working-directory: tools/expotools + - run: yarn tsc + working-directory: tools/expotools diff --git a/.github/workflows/home.yml b/.github/workflows/home.yml new file mode 100644 index 0000000000000..d625d0d20cb4a --- /dev/null +++ b/.github/workflows/home.yml @@ -0,0 +1,50 @@ +name: Home app + +on: + pull_request: + branches: [ master ] + paths: + - .github/workflows/home.yml + - home/** + - yarn.lock + push: + branches: [ master, 'sdk-*' ] + paths: + - .github/workflows/home.yml + - home/** + - yarn.lock + +jobs: + build: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - uses: actions/setup-node@v2-beta + with: + node-version: '12' + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + - uses: actions/cache@v1 + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - run: yarn install --frozen-lockfile + - run: yarn jest --maxWorkers 1 + working-directory: home + - run: yarn lint + working-directory: home + - uses: 8398a7/action-slack@v3 + if: failure() && (github.event.ref == 'refs/heads/master' || startsWith(github.event.ref, 'refs/heads/sdk-')) + with: + channel: '#api' + status: ${{ job.status }} + author_name: home/build + fields: commit,author,action,message + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SLACK_WEBHOOK_URL: ${{ secrets.slack_webhook_api }} diff --git a/.github/workflows/sdk.yml b/.github/workflows/sdk.yml new file mode 100644 index 0000000000000..3d33d6fe6ce13 --- /dev/null +++ b/.github/workflows/sdk.yml @@ -0,0 +1,46 @@ +name: SDK + +on: + push: + branches: [ master, 'sdk-*' ] + paths: + - .github/workflows/sdk.yml + - tools/expotools/** + - packages/** + - yarn.lock + pull_request: + branches: [ master ] + paths: + - .github/workflows/sdk.yml + - tools/expotools/** + - packages/** + - yarn.lock + +jobs: + check-packages: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + - uses: actions/cache@v1 + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - run: yarn install --frozen-lockfile + - run: bin/expotools check-packages + - uses: 8398a7/action-slack@v3 + if: failure() && (github.event.ref == 'refs/heads/master' || startsWith(github.event.ref, 'refs/heads/sdk-')) + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SLACK_WEBHOOK_URL: ${{ secrets.slack_webhook_api }} + with: + channel: '#api' + status: ${{ job.status }} + fields: commit,author,action,message + author_name: sdk check-packages diff --git a/.github/workflows/shell-app-ios.yml b/.github/workflows/shell-app-ios.yml new file mode 100644 index 0000000000000..e3ec4646e02ee --- /dev/null +++ b/.github/workflows/shell-app-ios.yml @@ -0,0 +1,84 @@ +name: iOS Shell App + +on: + repository_dispatch: + types: [ release-shell-ios ] + schedule: + - cron: '20 5 * * 2,4,6' + +jobs: + build: + runs-on: macos-10.15 + steps: + - uses: actions/checkout@v2 + with: + ref: ${{ github.event.client_payload.ref }} + lfs: true + submodules: true + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + - uses: actions/cache@v1 + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('tools-public/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - name: Install tools-public dependencies + run: yarn install --frozen-lockfile + working-directory: tools-public + - run: echo "::add-path::$(pwd)/bin" + - run: echo "::set-env name=EXPO_ROOT_DIR::$(pwd)" + - run: expotools ios-generate-dynamic-macros + - uses: ruby/setup-ruby@v1 + - run: echo "::set-env name=BUNDLE_BIN::$(pwd)/.direnv/bin" + - run: echo "::add-path::$BUNDLE_BIN" + - name: bundler cache + uses: actions/cache@v1 + with: + path: vendor/bundle + key: ${{ runner.os }}-gems-${{ hashFiles('.ruby-version') }}-${{ hashFiles('Gemfile.lock') }} + restore-keys: | + ${{ runner.os }}-gems- + - name: install fastlane + run: | + bundle config path vendor/bundle + bundle install --jobs 4 --retry 3 + - run: echo "--run.cwd project/tools-public" >> ~/.yarnrc + - run: npm install gulp-cli -g + - uses: actions/cache@v1 + with: + path: ios/Pods + key: ${{ runner.os }}-pods-${{ hashFiles('ios/Podfile.lock') }} + restore-keys: | + ${{ runner.os }}-pods- + - name: Build iOS shell app for real devices + working-directory: tools-public + timeout-minutes: 30 + run: gulp ios-shell-app --action build --type archive --verbose true --skipRepoUpdate --shellAppSdkVersion UNVERSIONED + - name: Build iOS shell app for simulators + working-directory: tools-public + timeout-minutes: 30 + run: gulp ios-shell-app --action build --type archive --verbose true --skipRepoUpdate --shellAppSdkVersion UNVERSIONED + - run: brew install awscli + - name: set tarball name + id: tarball + run: echo "::set-output name=filename::ios-shell-builder-sdk-latest-${{ github.sha }}" + - name: Package release tarball + if: ${{ github.event.action == 'release-shell-ios' }} + run: | + tar \ + -zcf "/tmp/${{ steps.tarball.outputs.filename }}" \ + package.json \ + exponent-view-template \ + shellAppBase-builds \ + shellAppWorkspaces \ + ios + - name: upload tarball trigger + if: ${{ github.event.action == 'release-shell-ios' }} + timeout-minutes: 40 + run: | + aws s3 cp --acl public-read "/tmp/${{ steps.tarball.outputs.filename }}" s3://exp-artifacts + echo "Release tarball uploaded to s3://exp-artifacts/${{ steps.tarball.outputs.filename }}" + echo "You can deploy this by updating or creating a new file in https://github.com/expo/turtle/tree/master/shellTarballs/ios" + echo "Then follow the deployment instructions: https://github.com/expo/turtle-deploy" diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml new file mode 100644 index 0000000000000..25577ea87cb05 --- /dev/null +++ b/.github/workflows/test-suite.yml @@ -0,0 +1,99 @@ +name: Test Suite + +on: + push: + branches: [ master, 'sdk-*' ] + paths: + - .github/workflows/test-suite.yml + - apps/bare-expo/** + - apps/test-suite/** + - packages/** + - yarn.lock + pull_request: + branches: [ master ] + paths: + - .github/workflows/test-suite.yml + - apps/bare-expo/** + - apps/test-suite/** + - packages/** + - yarn.lock + +jobs: + web: + runs-on: ubuntu-18.04 + steps: + - uses: actions/setup-node@v2-beta + with: + node-version: '13.8.0' + - uses: actions/checkout@v2 + with: + submodules: true + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + - uses: actions/cache@v1 + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - run: yarn install --frozen-lockfile + - run: yarn global add expo-cli + - run: yarn test:web + working-directory: apps/bare-expo + - uses: 8398a7/action-slack@v3 + if: failure() && (github.event.ref == 'refs/heads/master' || startsWith(github.event.ref, 'refs/heads/sdk-')) + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SLACK_WEBHOOK_URL: ${{ secrets.slack_webhook_web }} + with: + channel: '#platform-web' + status: ${{ job.status }} + fields: commit,author,action,message + author_name: test suite web + + ios: + runs-on: macos-10.15 + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - run: brew tap wix/brew + - run: brew install applesimutils + - run: brew install watchman + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + - uses: actions/cache@v1 + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - run: yarn install --frozen-lockfile + - name: Clean Detox + run: yarn detox:clean + working-directory: apps/bare-expo + - name: Build iOS project for Detox + run: yarn ios:detox:build:release + working-directory: apps/bare-expo + timeout-minutes: 30 + - name: Run tests + run: yarn ios:detox:test:release + working-directory: apps/bare-expo + - name: Store images of build failures + if: always() + uses: actions/upload-artifact@v2 + with: + name: bare-expo-artifacts + path: apps/bare-expo/artifacts + - uses: 8398a7/action-slack@v3 + if: failure() && (github.event.ref == 'refs/heads/master' || startsWith(github.event.ref, 'refs/heads/sdk-')) + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SLACK_WEBHOOK_URL: ${{ secrets.slack_webhook_ios }} + with: + channel: '#platform-ios' + status: ${{ job.status }} + fields: commit,author,action,message + author_name: test suite ios diff --git a/.github/workflows/web.yml b/.github/workflows/web.yml index 6d356aaa06235..1a190217150c9 100644 --- a/.github/workflows/web.yml +++ b/.github/workflows/web.yml @@ -15,6 +15,7 @@ jobs: with: fetch-depth: 1 lfs: true + - run: yarn global add expo-cli - name: Cache Node.js modules uses: actions/cache@v1 with: diff --git a/CHANGELOG.md b/CHANGELOG.md index adc252e43464b..6abe0b88a0323 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,30 +1,139 @@ # Changelog This is the log of notable changes to the Expo client that are developer-facing. +Package-specific changes not released in any SDK will be added here just before the release. Until then, you can find them in changelogs of the individual packages (see [packages](./packages) directory). -## master +## Unpublished ### 📚 3rd party library updates +- Updated `@react-native-community/netinfo` from `5.5.1` to `5.9.0`. ([#8440](https://github.com/expo/expo/pull/8440) by [@sjchmiela](https://github.com/sjchmiela)) +- Updated `react-native-screens` from `2.2.0` to `2.8.0`. ([#8434](https://github.com/expo/expo/pull/8424) by [@sjchmiela](https://github.com/sjchmiela)) +- Updated `react-native-shared-element` from `0.5.6` to `0.7.0`. ([#8427](https://github.com/expo/expo/pull/8427) by [@IjzerenHein](https://github.com/IjzerenHein)) +- Updated `react-native-reanimated` from `1.7.0` to `1.9.0`. ([#8424](https://github.com/expo/expo/pull/8424) by [@sjchmiela](https://github.com/sjchmiela)) +- Updated `react-native-safe-area-context` from `0.7.3` to `2.0.1`. ([#8459](https://github.com/expo/expo/pull/8459) by [@brentvatne](https://github.com/brentvatne) and [#8479](https://github.com/expo/expo/pull/8479) by [@tsapeta](https://github.com/tsapeta)) +- Updated `@react-native-community/datetimepicker` from `2.2.2` to `2.4.0`. ([#8476](https://github.com/expo/expo/pull/8476) by [@tsapeta](https://github.com/tsapeta)) +- Updated `react-native-webview` from `8.1.1` to `9.4.0`. ([#8489](https://github.com/expo/expo/pull/8489) by [@tsapeta](https://github.com/tsapeta)) +- Updated `react-native-svg` from `11.0.1` to `12.1.0`. ([#8491](https://github.com/expo/expo/pull/8491) by [@tsapeta](https://github.com/tsapeta)) +- Updated `react-native-maps` from `0.26.1` to `0.27.1`. ([#8495](https://github.com/expo/expo/pull/8495) by [@esamelson](https://github.com/esamelson)) +- Updated `@react-native-community/netinfo` from `5.9.0` to `5.9.2`. ([#8499](https://github.com/expo/expo/pull/8499) by [@esamelson](https://github.com/esamelson)) +- Updated `@react-native-community/masked-view` from `0.1.6` to `0.1.10`. ([#8499](https://github.com/expo/expo/pull/8499) by [@esamelson](https://github.com/esamelson)) + ### 🛠 Breaking changes - `react-native-view-shot` is no longer installed by default, install it with `expo install react-native-view-shot`. ([#7950](https://github.com/expo/expo/pull/7950) by [@evanbacon](https://github.com/evanbacon)) - -- `FileSystem.getContentUriAsync` now returns a string. ([#7192](https://github.com/expo/expo/pull/7192) by [@lukmccall](https://github.com/lukmccall)) +- The AR module has been removed from the `expo` package. See https://expo.fyi/deprecating-ar for more information. ([#8442](https://github.com/expo/expo/pull/8442) by [@sjchmiela](https://github.com/sjchmiela)) +- **`expo-battery`** + - Removed deprecated `isSupported` method. ([#7206](https://github.com/expo/expo/pull/7206) by [@bbarthec](https://github.com/bbarthec)) +- **`expo-camera`** + - The base64 output will no longer contain newline and special character (`\n`, `\r`) on Android. ([#7841](https://github.com/expo/expo/pull/7841) by [@jarvisluong](https://github.com/jarvisluong)) +- **`expo-file-system`** + - `FileSystem.downloadAsync` and `FileSystem.DownloadResumable` work by default when the app is in background too — they won't reject when the application is backgrounded. ([#7380](https://github.com/expo/expo/pull/7380) by [@lukmccall](https://github.com/lukmccall)) + - `FileSystem.downloadAsync` and `FileSystem.DownloadResumable` will reject when invalid headers dictionary is provided. These methods accept only `Record`. ([#7380](https://github.com/expo/expo/pull/7380) by [@lukmccall](https://github.com/lukmccall)) + - `FileSystem.getContentUriAsync` now returns a string. ([#7192](https://github.com/expo/expo/pull/7192) by [@lukmccall](https://github.com/lukmccall)) +- **`expo-image-manipulator`** + - The base64 output will no longer contain newline and special character (`\n`, `\r`) on Android. ([#7841](https://github.com/expo/expo/pull/7841) by [@jarvisluong](https://github.com/jarvisluong)) +- **`expo-image-picker`** + - The base64 output will no longer contain newline and special character (`\n`, `\r`) on Android. ([#7841](https://github.com/expo/expo/pull/7841) by [@jarvisluong](https://github.com/jarvisluong)) +- **`expo-print`** + - The base64 output will no longer contain newline and special character (`\n`, `\r`) on Android. ([#7841](https://github.com/expo/expo/pull/7841) by [@jarvisluong](https://github.com/jarvisluong)) +- **`expo-secure-store`** + - The base64 output will no longer contain newline and special character (`\n`, `\r`) on Android. ([#7841](https://github.com/expo/expo/pull/7841) by [@jarvisluong](https://github.com/jarvisluong)) +- **`expo-sensors`** + - `DeviceMotion.addListener` emits events with `rotationRate` in degrees instead of radians on all platforms. ([#7876](https://github.com/expo/expo/pull/7876) by [@evanbacon](https://github.com/evanbacon)) + - `DeviceMotion.addListener` emits events with `rotationRate` in the form of alpha = x, beta = y, gamma = z on all platforms. ([#7876](https://github.com/expo/expo/pull/7876) by [@evanbacon](https://github.com/evanbacon)) ### 🎉 New features - `expo-sqlite` now supports encrypted SQLite files ([#8242](https://github.com/expo/expo/pull/8242/) by [Manvir Singh](https://github.com/gurs1kh)) -- Add `readerMode` and `dismissButtonStyle` (iOS) and `enableDefaultShare` (Android) flags for `WebBrowser` ([#7221](https://github.com/expo/expo/pull/7221) by [@LinusU](https://github.com/LinusU)) & [@mczernek](https://github.com/mczernek)) +- Initial release of **`expo-screen-capture`** 🥳 +- Initial release of **`expo-notifications`** 🥳 +- Added `@react-native-community/segmented-control` in version `1.6.1`. ([#8038](https://github.com/expo/expo/pull/8038) by [@marchenk0va](https://github.com/marchenk0va) and [#8441](https://github.com/expo/expo/pull/8441) by [@tsapeta](https://github.com/tsapeta)) +- **`expo-apple-authentication`** + - Add 'Sign up with Apple' option (available as of iOS 13.2). ([#7471](https://github.com/expo/expo/pull/7471) by [@IjzerenHein](https://github.com/IjzerenHein)) +- **`expo-file-system`** + - Add `FileSystem.uploadAsync` method. ([#7380](https://github.com/expo/expo/pull/7380) by [@lukmccall](https://github.com/lukmccall)) + - Add ability to read Android `raw` and `drawable` resources in `FileSystem.getInfoAsync`, `FileSystem.readAsStringAsync`, and `FileSystem.copyAsync`. ([#8104](https://github.com/expo/expo/pull/8104) by [@esamelson](https://github.com/esamelson)) +- **`expo-face-detector`** + - Added support for overriding the iOS Firebase SDK version in the bare workflow. ([#7141](https://github.com/expo/expo/pull/7141) by [@IjzerenHein](https://github.com/IjzerenHein)) +- **`expo-firebase-analytics`** + - Add `setDebugModeEnabled` for enabling DebugView on the Expo client. ([#7796](https://github.com/expo/expo/pull/7796) by [@IjzerenHein](https://github.com/IjzerenHein)) +- **`expo-gl`** + - Improved logging and added some more logging options. ([#7550](https://github.com/expo/expo/pull/7550) by [@tsapeta](https://github.com/tsapeta)) + - Add WebP format as an option when taking GL snapshots (Android only). ([#7490](https://github.com/expo/expo/pull/7490) by [@pacoelayudante](https://github.com/pacoelayudante)) +- **`expo-local-authentication`** + - Added support for `promptMessage`, `cancelLabel` and `disableDeviceFallback` on Android. ([#8219](https://github.com/expo/expo/pull/8219) by [@diegolmello](https://github.com/diegolmello)) + - Added iris local authentication type for Android. ([#8431](https://github.com/expo/expo/pull/8364) by [@bycedric](https://github.com/bycedric)) +- **`expo-sms`** + - Add `attachments` as an optional parameter to `sendSMSAsync`. It can be used to provide an attachment along with the recipients and message arguments. ([#7967](https://github.com/expo/expo/pull/7967) by [@thorbenprimke](https://github.com/thorbenprimke)) +- **`expo-sensors`** + - `DeviceMotion.addListener` emits events with `interval` property. ([#7876](https://github.com/expo/expo/pull/7876) by [@evanbacon](https://github.com/evanbacon)) +- **`expo-web-browser`** + - Add `readerMode` and `dismissButtonStyle` (iOS) and `enableDefaultShare` (Android) flags for `WebBrowser` ([#7221](https://github.com/expo/expo/pull/7221) by [@LinusU](https://github.com/LinusU)) & [@mczernek](https://github.com/mczernek)) +- **`expo-camera`** + - Added exports for TypeScript definitions: CameraType, ImageType, ImageParameters, ImageSize, CaptureOptions, CapturedPicture ([#8457](https://github.com/expo/expo/pull/8457) by [@jarvisluong](https://github.com/jarvisluong)) ### 🐛 Bug fixes -- Fixed multiplied callbacks in `expo-av` after replaying ([#7193](https://github.com/expo/expo/pull/7193) by [@mczernek](https://github.com/mczernek)) -- Fixed `Brightness.requestPermissionsAsync` throwing `permission cannot be null or empty` error on Android. ([#7276](https://github.com/expo/expo/pull/7276) by [@lukmccall](https://github.com/lukmccall)) -- Fixed `KeepAwake.activateKeepAwake` not working with multiple tags on Android. ([#7197](https://github.com/expo/expo/pull/7197) by [@lukmccall](https://github.com/lukmccall)) -- Fix `Contacts.presentFormAsync` pre-filling. ([#7285](https://github.com/expo/expo/pull/7285) by [@abdelilah](https://github.com/abdelilah) & [@lukmccall](https://github.com/lukmccall)) -- Removed unknown CLI options `--android-package` and `--ios-bundle-identifier` from docs. ([#7354](https://github.com/expo/expo/pull/7354) by [@ca057](https://github.com/ca057)) - Fixed `androidNavigationBar.hidden` configuration not remaining applied after backgrounding & foregrounding the app. ([#7770](https://github.com/expo/expo/pull/7770) by [@cruzach](https://github.com/cruzach)) +- **`@unimodules/core`** + - Fixed error when serializing a `Map` containing a `null` ([#8153](https://github.com/expo/expo/pull/8153) by [@sjchmiela](https://github.com/sjchmiela)) + - Fixed a rare undetermined behavior that may have been a result of misuse of `dispatch_once_t` on iOS ([#7576](https://github.com/expo/expo/pull/7576) by [@sjchmiela](https://github.com/sjchmiela)) + - Fixed error when serializing a `Map` containing a `Bundle` ([#8068](https://github.com/expo/expo/pull/8068) by [@sjchmiela](https://github.com/sjchmiela)) + - Fixed _unused variable_ warnings in `UMAppDelegateWrapper` ([#8467](https://github.com/expo/expo/pull/8467) by [@sjchmiela](https://github.com/sjchmiela)) +- **`expo-av`** + - Fix unable to call presentFullScreenPlayer twice. ([#8343](https://github.com/expo/expo/pull/8343) by [@IjzerenHein](https://github.com/IjzerenHein)) + - Fixed multiplied callbacks in `expo-av` after replaying ([#7193](https://github.com/expo/expo/pull/7193) by [@mczernek](https://github.com/mczernek)) + - Fixed `Plaback.loadAsync()` return type. ([#7559](https://github.com/expo/expo/pull/7559) by [@awinograd](https://github.com/awinograd)) + - Fixed the adaptive streaming for exoplayer on android. ([#8380](https://github.com/expo/expo/pull/8363) by [@watchinharrison](https://github.com/watchinharrison)) +- **`expo-auth-session`** + - Fix `AuthSession.getDefaultReturnUrl()` returning wrong URL while using release channels. ([#7687](https://github.com/expo/expo/pull/7687) by [@lukmccall](https://github.com/lukmccall)) +- **`expo-brightness`** + - Fixed `Brightness.requestPermissionsAsync` throwing `permission cannot be null or empty` error on Android. ([#7276](https://github.com/expo/expo/pull/7276) by [@lukmccall](https://github.com/lukmccall)) +- **`expo-calendar`** + - Fixed `Calendar.getCalendarsAsync` requiring not needed permissions on iOS. ([#7928](https://github.com/expo/expo/pull/7928) by [@lukmccall](https://github.com/lukmccall)) + - Fix `recurrence rule` and `event` parsing. ([#7527](https://github.com/expo/expo/pull/7527) by [@lukmccall](https://github.com/lukmccall)) +- **`expo-constants`** + - Fixed `uuid`'s deprecation of deep requiring ([#8114](https://github.com/expo/expo/pull/8114) by [@actuallymentor](https://github.com/actuallymentor)) +- **`expo-contacts`** + - Fix `Contacts.presentFormAsync` pre-filling. ([#7285](https://github.com/expo/expo/pull/7285) by [@abdelilah](https://github.com/abdelilah) & [@lukmccall](https://github.com/lukmccall)) +- **`expo-firebase-analytics`** + - Fix no events recorded on the Expo client when running on certain Android devices. ([#7679](https://github.com/expo/expo/pull/7679) by [@IjzerenHein](https://github.com/IjzerenHein)) + - Fix `setAnalyticsCollectionEnabled` throwing an error. + - Fixes & improvements to the pure JS analytics client. ([#7796](https://github.com/expo/expo/pull/7796) by [@IjzerenHein](https://github.com/IjzerenHein)) + - Fixed logEvent in `expo-firebase-analytics` for Android. logEvent's optional properties parameter was causing a NPE on Android when not provided. ([#7897](https://github.com/expo/expo/pull/7897) by [@thorbenprimke](https://github.com/thorbenprimke)) +- **`expo-font`** + - Fixed timeout on Firefox [#7420](https://github.com/expo/expo/pull/7420) +- **`expo-gl`** + - Fix crash in React Native 0.62 when creating a context. ([#8352](https://github.com/expo/expo/pull/8352) by [@wkozyra95](https://github.com/wkozyra95)) + - Allow createElement & unstable_createElement usage for web. ([#7995](https://github.com/expo/expo/pull/7995) by [@wood1986](https://github.com/wood1986)) + - Fix depth/stencil buffers not working correctly with `three.js`. ([#7543](https://github.com/expo/expo/pull/7543) by [@tsapeta](https://github.com/tsapeta)) +- **`expo-keep-awake`** + - Fixed `KeepAwake.activateKeepAwake` not working with multiple tags on Android. ([#7197](https://github.com/expo/expo/pull/7197) by [@lukmccall](https://github.com/lukmccall)) +- **`expo-image-picker`** + - Fixed exception when calling `ImagePicker.getCameraPermissionsAsync` on Web. ([#7498](https://github.com/expo/expo/pull/7498) by [@IjzerenHein](https://github.com/IjzerenHein)) + - Skip asking for camera permissions on web with `ImagePicker.getCameraPermissionsAsync`. ([#8475](https://github.com/expo/expo/pull/8475) by [@EvanBacon](https://github.com/EvanBacon)) +- **`expo-localization`** + - Fixed `Localization.locale` throwing an exception on the iOS simulator. ([#8193](https://github.com/expo/expo/pull/8193) by [@lukmccall](https://github.com/lukmccall)) +- **`expo-media-library`** + - Added missing image loader for `MediaLibrary` in bare workflow. ([#8304](https://github.com/expo/expo/pull/8304) by [@tsapeta](https://github.com/tsapeta)) + - Fixed `MediaLibrary` not compiling with the `use_frameworks!` option in the bare React Native application. ([#7861](https://github.com/expo/expo/pull/7861) by [@Ashoat](https://github.com/Ashoat)) + - Flip dimensions based on media rotation data on Android to match `` and `