From e38cfa61feafd991ab60aa43dd6fcba2c01d11d2 Mon Sep 17 00:00:00 2001 From: Alex Junior Date: Fri, 20 May 2022 00:01:34 -0300 Subject: [PATCH] Chore: Upgrade react-native-document-picker from 5.2.0 to 8.1.0 (#4172) * chore: upgrade `react-native-document-picker` from 5.2.0 to 8.1.0 * change `DocumentPicker.pick` to `DocumentPicker.pickSingle` --- app/containers/MessageBox/index.tsx | 2 +- app/utils/sslPinning.ts | 3 +-- ios/Podfile.lock | 4 ++-- package.json | 2 +- yarn.lock | 10 ++++++---- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/app/containers/MessageBox/index.tsx b/app/containers/MessageBox/index.tsx index b8afdacb6..6b6b1deb7 100644 --- a/app/containers/MessageBox/index.tsx +++ b/app/containers/MessageBox/index.tsx @@ -730,7 +730,7 @@ class MessageBox extends Component { chooseFile = async () => { logEvent(events.ROOM_BOX_ACTION_FILE); try { - const res = await DocumentPicker.pick({ + const res = await DocumentPicker.pickSingle({ type: [DocumentPicker.types.allFiles] }); const file = { diff --git a/app/utils/sslPinning.ts b/app/utils/sslPinning.ts index 3111c7b53..3517ae4af 100644 --- a/app/utils/sslPinning.ts +++ b/app/utils/sslPinning.ts @@ -29,8 +29,7 @@ const RCSSLPinning = Platform.select({ pickCertificate: () => new Promise(async (resolve, reject) => { try { - const res = await DocumentPicker.pick({ - // @ts-ignore + const res = await DocumentPicker.pickSingle({ type: ['com.rsa.pkcs-12'] }); const { uri, name } = res; diff --git a/ios/Podfile.lock b/ios/Podfile.lock index c278a1b81..1bfd66e33 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -405,7 +405,7 @@ PODS: - React-Core - react-native-cookies (6.0.8): - React-Core - - react-native-document-picker (5.2.0): + - react-native-document-picker (8.1.0): - React-Core - react-native-jitsi-meet (3.6.0): - JitsiMeetSDK (= 3.6.0) @@ -1005,7 +1005,7 @@ SPEC CHECKSUMS: react-native-blur: cad4d93b364f91e7b7931b3fa935455487e5c33c react-native-cameraroll: 88f4e62d9ecd0e1f253abe4f685474f2ea14bfa2 react-native-cookies: 2cb6ef472da68610dfcf0eaee68464c244943abd - react-native-document-picker: f1b5398801b332c77bc62ae0eae2116f49bdff26 + react-native-document-picker: 5663fe4bcdb646200683a41790464d2793307ac8 react-native-jitsi-meet: 3e3ac5d0445091154119f94342efd55c8b1124ce react-native-mmkv-storage: 88bcb10bbe85a8122061d17d03abcc64a02fe1c9 react-native-netinfo: e849fc21ca2f4128a5726c801a82fc6f4a6db50d diff --git a/package.json b/package.json index 19602ce4a..d817bfc40 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "react-native-config-reader": "^4.1.1", "react-native-console-time-polyfill": "1.2.3", "react-native-device-info": "8.4.8", - "react-native-document-picker": "5.2.0", + "react-native-document-picker": "8.1.0", "react-native-easy-grid": "^0.2.2", "react-native-easy-toast": "^1.2.0", "react-native-file-viewer": "^2.1.4", diff --git a/yarn.lock b/yarn.lock index ff2fd9533..0712fc367 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14829,10 +14829,12 @@ react-native-device-info@8.4.8: resolved "https://registry.yarnpkg.com/react-native-device-info/-/react-native-device-info-8.4.8.tgz#fc92ae423e47db6cfbf30c30012e09cee63727fa" integrity sha512-92676ZWHZHsPM/EW1ulgb2MuVfjYfMWRTWMbLcrCsipkcMaZ9Traz5mpsnCS7KZpsOksnvUinzDIjsct2XGc6Q== -react-native-document-picker@5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/react-native-document-picker/-/react-native-document-picker-5.2.0.tgz#1fb2185a56ba6b2509acdc418a8a75906c31e58e" - integrity sha512-zXK34hW6fM0gXoo6v7edZZxKvLT7DyjOdBXi7WrxbKqZchDokTEQ/tNTeZxky+7oI8sVz8T3uXBBEW0sp+VfXQ== +react-native-document-picker@8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/react-native-document-picker/-/react-native-document-picker-8.1.0.tgz#e167a98b6fcdd1aee08597793029101d674eab83" + integrity sha512-FdaehvEoqkVkMTkIy09wpgHUHh9SskI1k8ug8Dwkwk7MJ+XxzrphAk/mXZtu5RkM1Iwxmd82QfwiQJxrZ2LSVg== + dependencies: + invariant "^2.2.4" react-native-easy-grid@^0.2.2: version "0.2.2"