From 0aaa396315316b7f58ff419b99040242fc7c71f5 Mon Sep 17 00:00:00 2001 From: vikneshwar Date: Sun, 19 Feb 2023 18:38:53 +0530 Subject: [PATCH] Mobile: Fixes #7675: Fix camera attachment (#7775) --- ...t-native-camera-npm-4.2.1-24b2600a7e.patch | 20 +++++++ package.json | 5 +- packages/app-mobile/package.json | 1 + yarn.lock | 52 ++++++++++++++----- 4 files changed, 65 insertions(+), 13 deletions(-) create mode 100644 .yarn/patches/react-native-camera-npm-4.2.1-24b2600a7e.patch diff --git a/.yarn/patches/react-native-camera-npm-4.2.1-24b2600a7e.patch b/.yarn/patches/react-native-camera-npm-4.2.1-24b2600a7e.patch new file mode 100644 index 000000000..5e2174fc9 --- /dev/null +++ b/.yarn/patches/react-native-camera-npm-4.2.1-24b2600a7e.patch @@ -0,0 +1,20 @@ +diff --git a/src/RNCamera.js b/src/RNCamera.js +index b7a271ad64771c0f654dbd5fe3c0d9e0d2e2c4ef..1182a40ace081a32fbaefe2bc4a499b79c2e7dac 100644 +--- a/src/RNCamera.js ++++ b/src/RNCamera.js +@@ -5,7 +5,6 @@ import { + findNodeHandle, + Platform, + NativeModules, +- ViewPropTypes, + requireNativeComponent, + View, + ActivityIndicator, +@@ -14,6 +13,7 @@ import { + PermissionsAndroid, + } from 'react-native'; + ++import ViewPropTypes from 'deprecated-react-native-prop-types'; + import type { FaceFeature } from './FaceDetector'; + + const Rationale = PropTypes.shape({ diff --git a/package.json b/package.json index 4399091b7..27d1dc8ba 100644 --- a/package.json +++ b/package.json @@ -90,5 +90,8 @@ "node-gyp": "9.3.1", "nodemon": "2.0.20" }, - "packageManager": "yarn@3.3.1" + "packageManager": "yarn@3.3.1", + "resolutions": { + "react-native-camera@4.2.1": "patch:react-native-camera@npm%3A4.2.1#./.yarn/patches/react-native-camera-npm-4.2.1-24b2600a7e.patch" + } } diff --git a/packages/app-mobile/package.json b/packages/app-mobile/package.json index 5c0f8b646..9af3d3ae8 100644 --- a/packages/app-mobile/package.json +++ b/packages/app-mobile/package.json @@ -32,6 +32,7 @@ "buffer": "6.0.3", "constants-browserify": "1.0.0", "crypto-browserify": "3.12.0", + "deprecated-react-native-prop-types": "4.0.0", "events": "3.3.0", "jsc-android": "241213.1.0", "lodash": "4.17.21", diff --git a/yarn.lock b/yarn.lock index a7aee22f4..8792a1091 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4981,6 +4981,7 @@ __metadata: buffer: 6.0.3 constants-browserify: 1.0.0 crypto-browserify: 3.12.0 + deprecated-react-native-prop-types: 4.0.0 events: 3.3.0 execa: 4.1.0 fs-extra: 11.1.0 @@ -7049,6 +7050,13 @@ __metadata: languageName: node linkType: hard +"@react-native/normalize-colors@npm:*": + version: 0.72.0 + resolution: "@react-native/normalize-colors@npm:0.72.0" + checksum: c8ec577663394a3390eb34c3cd531350521172bcfad7de309ab111e5f9e3d27c966d4a4387f00972302107be3d8cad584c5794ccfa30939aecc56162e4ddbe25 + languageName: node + linkType: hard + "@react-native/polyfills@npm:2.0.0": version: 2.0.0 resolution: "@react-native/polyfills@npm:2.0.0" @@ -13895,6 +13903,17 @@ __metadata: languageName: node linkType: hard +"deprecated-react-native-prop-types@npm:4.0.0": + version: 4.0.0 + resolution: "deprecated-react-native-prop-types@npm:4.0.0" + dependencies: + "@react-native/normalize-colors": "*" + invariant: "*" + prop-types: "*" + checksum: 3542c70d0379153c946bc2e23202405df4337be3dc2a96601b6696247097e13405091efa7640841f8c920d3239145d8c024e13758c65a884a207b88ec2c826aa + languageName: node + linkType: hard + "deprecation@npm:^2.0.0, deprecation@npm:^2.3.1": version: 2.3.1 resolution: "deprecation@npm:2.3.1" @@ -18859,7 +18878,7 @@ __metadata: languageName: node linkType: hard -"invariant@npm:2.2.4, invariant@npm:^2.2.4": +"invariant@npm:*, invariant@npm:2.2.4, invariant@npm:^2.2.4": version: 2.2.4 resolution: "invariant@npm:2.2.4" dependencies: @@ -26425,17 +26444,7 @@ __metadata: languageName: node linkType: hard -"prop-types@npm:15.5.10": - version: 15.5.10 - resolution: "prop-types@npm:15.5.10" - dependencies: - fbjs: ^0.8.9 - loose-envify: ^1.3.1 - checksum: 3e928ad5afa5124d52a341a706170628e7b0caa9340515782be6a767261e6eb0e473116188bb8efbe9d9b62cb3c9501c71bf4ab7d34f2507294ee34c90de6964 - languageName: node - linkType: hard - -"prop-types@npm:15.8.1, prop-types@npm:^15.8.1": +"prop-types@npm:*, prop-types@npm:15.8.1, prop-types@npm:^15.8.1": version: 15.8.1 resolution: "prop-types@npm:15.8.1" dependencies: @@ -26446,6 +26455,16 @@ __metadata: languageName: node linkType: hard +"prop-types@npm:15.5.10": + version: 15.5.10 + resolution: "prop-types@npm:15.5.10" + dependencies: + fbjs: ^0.8.9 + loose-envify: ^1.3.1 + checksum: 3e928ad5afa5124d52a341a706170628e7b0caa9340515782be6a767261e6eb0e473116188bb8efbe9d9b62cb3c9501c71bf4ab7d34f2507294ee34c90de6964 + languageName: node + linkType: hard + "prop-types@npm:^15.5.10, prop-types@npm:^15.5.7, prop-types@npm:^15.5.8, prop-types@npm:^15.6.0, prop-types@npm:^15.6.2, prop-types@npm:^15.7.2": version: 15.7.2 resolution: "prop-types@npm:15.7.2" @@ -26913,6 +26932,15 @@ __metadata: languageName: node linkType: hard +"react-native-camera@patch:react-native-camera@npm%3A4.2.1#./.yarn/patches/react-native-camera-npm-4.2.1-24b2600a7e.patch::locator=root%40workspace%3A.": + version: 4.2.1 + resolution: "react-native-camera@patch:react-native-camera@npm%3A4.2.1#./.yarn/patches/react-native-camera-npm-4.2.1-24b2600a7e.patch::version=4.2.1&hash=e9c70e&locator=root%40workspace%3A." + dependencies: + prop-types: ^15.6.2 + checksum: 09a95a91cf3669c86083980f9dc1b4270d1d7f53d29ae3f3f69a44c99abf5380d5bcc816006826a888bef8b17cce1d75aff09779c288bcabe22671ab8dae5f37 + languageName: node + linkType: hard + "react-native-codegen@npm:^0.70.6": version: 0.70.6 resolution: "react-native-codegen@npm:0.70.6"