From bb0e056fba49c0fde2b427161d8b666921db66d3 Mon Sep 17 00:00:00 2001 From: Mattermost Build Date: Tue, 6 Apr 2021 17:27:26 +0200 Subject: [PATCH] Update dependencies (#5266) (#5283) * Update dependencies * Fix lint, use npm@6 * Fix unit tests * Dowgrade Fastlane * Fix Fastlane script * use android:api-29-node ci image * Infer gradle json file from apk output folder * Fastlane to Parse new version of gradle output-metadata.json (cherry picked from commit f8a0f29237e6a2c329e0a16e89b75dded5799478) Co-authored-by: Elias Nahum --- .circleci/config.yml | 6 +- .eslintrc.json | 4 +- .flowconfig | 13 +- .gitattributes | 7 +- .husky/.gitignore | 1 + .husky/pre-commit | 4 + android/app/build.gradle | 4 + android/app/src/debug/AndroidManifest.xml | 7 +- android/app/src/main/AndroidManifest.xml | 1 - android/app/src/main/res/values/styles.xml | 2 +- android/build.gradle | 5 +- android/gradle.properties | 2 +- android/gradle/wrapper/gradle-wrapper.jar | Bin 58695 -> 59203 bytes .../gradle/wrapper/gradle-wrapper.properties | 2 +- android/gradlew.bat | 22 +- .../slash_suggestion/slash_suggestion.tsx | 2 +- .../__snapshots__/avatars.test.tsx.snap | 116 + app/components/avatars/avatars.tsx | 1 + app/components/channel_link/channel_link.js | 8 +- app/components/conditional_touchable.js | 4 +- app/components/emoji/emoji.js | 2 +- app/components/error_text/error_text.js | 2 +- app/components/formatted_markdown_text.js | 2 +- app/components/formatted_time.js | 2 +- .../layout/keyboard_layout/keyboard_layout.js | 2 +- app/components/markdown/hashtag/index.js | 4 +- app/components/markdown/markdown.js | 10 +- .../markdown/markdown_block_quote.js | 2 +- .../markdown_code_block.js | 2 +- .../markdown/markdown_emoji/markdown_emoji.js | 2 +- .../markdown/markdown_link/markdown_link.js | 2 +- app/components/markdown/markdown_list_item.js | 4 +- .../message_attachments/attachment_fields.js | 4 +- .../message_attachments/attachment_pretext.js | 4 +- .../message_attachments/attachment_text.js | 4 +- app/components/message_attachments/index.js | 2 +- .../message_attachments/message_attachment.js | 2 +- .../network_indicator/network_indicator.js | 8 +- .../__snapshots__/index.test.js.snap | 4 +- .../post_add_channel_member.js | 2 +- .../profile_picture/profile_picture.js | 5 +- .../touchable_with_feedback.android.js | 2 +- .../touchable_with_feedback.ios.js | 2 +- app/constants/custom_prop_types.js | 17 - app/constants/custom_prop_types.ts | 12 + app/mm-redux/actions/channels.ts | 2 +- app/mm-redux/actions/gifs.ts | 2 +- app/mm-redux/actions/integrations.ts | 2 +- app/mm-redux/actions/posts.ts | 2 +- app/mm-redux/actions/search.ts | 2 +- app/mm-redux/actions/users.ts | 2 +- app/mm-redux/client/client4.ts | 2 +- .../forgot_password.test.js.snap | 4 +- app/screens/gallery/footer/index.tsx | 2 +- .../gallery/gallery_file/gallery_file.tsx | 4 +- app/screens/gallery/gallery_viewer.tsx | 15 +- .../more_channels/more_channels.test.js | 4 + app/screens/notification/index.tsx | 2 +- ...cation_settings_email.android.test.js.snap | 4 +- .../select_timezone/select_timezone.test.js | 4 + app/store/mmkv_adapter.ts | 34 +- app/utils/images.js | 6 +- detox/package-lock.json | 2747 +- detox/package.json | 12 +- fastlane/Fastfile | 14 +- ios/Gemfile | 2 +- ios/Gemfile.lock | 18 +- ios/Mattermost.xcodeproj/project.pbxproj | 3 + ios/Podfile | 19 +- ios/Podfile.lock | 602 +- jest.config.js | 2 +- metro.config.js | 2 +- package-lock.json | 20718 ++++++---------- package.json | 141 +- patches/react-native+0.63.4.patch | 265 - patches/react-native+0.64.0.patch | 74 + ...h => react-native-device-info+8.0.8.patch} | 0 patches/react-native-elements+2.3.2.patch | 51 - patches/react-native-elements+3.3.2.patch | 69 + patches/react-native-mmkv-storage+0.4.3.patch | 19 - patches/react-native-mmkv-storage+0.5.3.patch | 22 + ...h => react-native-navigation+7.12.0.patch} | 0 ... => react-native-vector-icons+8.1.0.patch} | 0 test/setup.js | 2 +- types/screens/gallery.d.ts | 2 +- 85 files changed, 8934 insertions(+), 16258 deletions(-) create mode 100644 .husky/.gitignore create mode 100755 .husky/pre-commit delete mode 100644 app/constants/custom_prop_types.js create mode 100644 app/constants/custom_prop_types.ts delete mode 100644 patches/react-native+0.63.4.patch create mode 100644 patches/react-native+0.64.0.patch rename patches/{react-native-device-info+8.0.0.patch => react-native-device-info+8.0.8.patch} (100%) delete mode 100644 patches/react-native-elements+2.3.2.patch create mode 100644 patches/react-native-elements+3.3.2.patch delete mode 100644 patches/react-native-mmkv-storage+0.4.3.patch create mode 100644 patches/react-native-mmkv-storage+0.5.3.patch rename patches/{react-native-navigation+7.8.1.patch => react-native-navigation+7.12.0.patch} (100%) rename patches/{react-native-vector-icons+7.1.0.patch => react-native-vector-icons+8.1.0.patch} (100%) diff --git a/.circleci/config.yml b/.circleci/config.yml index a87377288..0b6315e66 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -23,7 +23,7 @@ executors: NODE_ENV: production BABEL_ENV: production macos: - xcode: "12.0.0" + xcode: "12.1.0" working_directory: ~/mattermost-mobile shell: /bin/bash --login -o pipefail @@ -550,14 +550,14 @@ workflows: - test filters: branches: - only: /^build-pr-.*/ + only: /^(build|android)-pr-.*/ - build-ios-pr: context: mattermost-mobile-ios-pr requires: - test filters: branches: - only: /^build-pr-.*/ + only: /^(build|ios)-pr-.*/ - build-android-unsigned: context: mattermost-mobile-unsigned diff --git a/.eslintrc.json b/.eslintrc.json index a02682364..f95474148 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -6,8 +6,8 @@ ], "parser": "@typescript-eslint/parser", "plugins": [ - "mattermost", - "@typescript-eslint" + "@typescript-eslint", + "mattermost" ], "settings": { "react": { diff --git a/.flowconfig b/.flowconfig index 757564ae8..9034f7727 100644 --- a/.flowconfig +++ b/.flowconfig @@ -8,10 +8,6 @@ ; Ignore polyfills node_modules/react-native/Libraries/polyfills/.* -; These should not be required directly -; require from fbjs/lib instead: require('fbjs/lib/warning') -node_modules/warning/.* - ; Flow doesn't support platforms .*/Libraries/Utilities/LoadingView.js @@ -30,6 +26,8 @@ emoji=true esproposal.optional_chaining=enable esproposal.nullish_coalescing=enable +exact_by_default=true + module.file_ext=.js module.file_ext=.json module.file_ext=.ios.js @@ -44,10 +42,6 @@ suppress_type=$FlowFixMe suppress_type=$FlowFixMeProps suppress_type=$FlowFixMeState -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]+ -suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError - [lints] sketchy-null-number=warn sketchy-null-mixed=warn @@ -59,7 +53,6 @@ unsafe-getters-setters=warn inexact-spread=warn unnecessary-invariant=warn signature-verification-failure=warn -deprecated-utility=error [strict] deprecated-type @@ -71,4 +64,4 @@ untyped-import untyped-type-import [version] -^0.122.0 +^0.137.0 diff --git a/.gitattributes b/.gitattributes index 5b8397637..59b845bf9 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,3 @@ -*.pbxproj -text - -# specific for windows script files -*.bat text eol=crlf +# Windows files should use crlf line endings +# https://help.github.com/articles/dealing-with-line-endings/ +*.bat text eol=crlf \ No newline at end of file diff --git a/.husky/.gitignore b/.husky/.gitignore new file mode 100644 index 000000000..31354ec13 --- /dev/null +++ b/.husky/.gitignore @@ -0,0 +1 @@ +_ diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 000000000..ac95b74a5 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +sh ./scripts/pre-commit.sh diff --git a/android/app/build.gradle b/android/app/build.gradle index df5a46219..b4c640e19 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -191,6 +191,10 @@ android { targetCompatibility 1.8 } + packagingOptions { + pickFirst '**/*.so' + } + } repositories { diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index 85bf18b6f..0063cf4f3 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -4,5 +4,10 @@ - + + + diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 20d5c1cd8..f5796bb53 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -50,7 +50,6 @@ - diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml index 8918ad4c7..53ffe603c 100644 --- a/android/app/src/main/res/values/styles.xml +++ b/android/app/src/main/res/values/styles.xml @@ -1,7 +1,7 @@ -