Skip to content

Commit db61782

Browse files
chrisbobbegnprice
authored andcommitted
deps: Upgrade camera-roll to 5.2.4 and constrain to <5.3.0
5.3.0 says in the changelog that it adds support for the new React Native architecture: https://github.com/react-native-cameraroll/react-native-cameraroll/releases/tag/v5.3.0 We're not yet ready to use the new architecture. Possibly the new architecture doesn't also become *required* at the same time, but we've had similar hopes in comparable situations and it doesn't always work out that way. Plus in 5.3.0 the TypeScript types start importing things with names like TurboModule from the React Native types, and so to support that in our Flow types we'd need changes to TsFlower. Leave that work for later.
1 parent 30ed5ea commit db61782

File tree

9 files changed

+42
-10
lines changed

9 files changed

+42
-10
lines changed

ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ PODS:
310310
- React-jsinspector (0.68.5)
311311
- React-logger (0.68.5):
312312
- glog
313-
- react-native-cameraroll (5.0.4):
313+
- react-native-cameraroll (5.2.4):
314314
- React-Core
315315
- react-native-document-picker (8.1.3):
316316
- React-Core
@@ -738,7 +738,7 @@ SPEC CHECKSUMS:
738738
React-jsiexecutor: 45c0496ca8cef6b02d9fa0274c25cf458fe91a56
739739
React-jsinspector: eb202e43b3879aba9a14f3f65788aec85d4e1ea9
740740
React-logger: 98f663b292a60967ebbc6d803ae96c1381183b6d
741-
react-native-cameraroll: 38b40d9033e4077b6c603f92f95c6d05fa7907df
741+
react-native-cameraroll: cb752fda6d5268f1646b4390bd5be1f27706b9a0
742742
react-native-document-picker: 958e2bc82e128be69055be261aeac8d872c8d34c
743743
react-native-image-picker: 60f4246eb5bb7187fc15638a8c1f13abd3820695
744744
react-native-netinfo: e849fc21ca2f4128a5726c801a82fc6f4a6db50d

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"dependencies": {
2525
"@expo/react-native-action-sheet": "^3.8.0",
2626
"@react-native-async-storage/async-storage": "~1.17.3",
27-
"@react-native-camera-roll/camera-roll": "^5.0.4",
27+
"@react-native-camera-roll/camera-roll": "^5.0.4 <5.3.0",
2828
"@react-native-clipboard/clipboard": "^1.11.1",
2929
"@react-native-community/masked-view": "^0.1.10",
3030
"@react-native-community/netinfo": "6.0.0",

types/@react-native-camera-roll/camera-roll/lib/typescript/CameraRoll.js.flow

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@ export type GroupTypes =
99
| 'Library'
1010
| 'PhotoStream'
1111
| 'SavedPhotos';
12-
export type Include = 'filename' | 'fileSize' | 'location' | 'imageSize' | 'playableDuration';
12+
export type Include =
13+
| 'filename'
14+
| 'fileSize'
15+
| 'fileExtension'
16+
| 'location'
17+
| 'imageSize'
18+
| 'playableDuration'
19+
| 'orientation';
1320
export type AssetType = 'All' | 'Videos' | 'Photos';
1421

1522
export type GetPhotosParams = {
@@ -31,11 +38,14 @@ export type PhotoIdentifier = {
3138
group_name: string,
3239
image: {
3340
filename: string | null,
41+
filepath: string | null,
42+
extension: string | null,
3443
uri: string,
3544
height: number,
3645
width: number,
3746
fileSize: number | null,
3847
playableDuration: number,
48+
orientation: number | null,
3949
...
4050
},
4151
timestamp: number,
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/* @flow
2+
* @generated by TsFlower
3+
*/
4+
export {};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* @flow
22
* @generated by TsFlower
33
*/
4+
export * from './useCameraRoll';
45
export * from './CameraRoll';
56
export * from './CameraRollIOSPermission';
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/* @flow
2+
* @generated by TsFlower
3+
*/
4+
import {
5+
type GetPhotosParams,
6+
type PhotoIdentifiersPage,
7+
type SaveToCameraRollOptions,
8+
} from './CameraRoll';
9+
10+
type UseCameraRollResult = [
11+
PhotoIdentifiersPage,
12+
(config?: GetPhotosParams) => Promise<void>,
13+
(tag: string, options?: SaveToCameraRollOptions) => Promise<void>,
14+
];
15+
16+
declare export function useCameraRoll(): UseCameraRollResult;
17+
export {};

types/patches/0041-tsflower-camera-roll-Mark-statics-as-static.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ Should be easy to fix, then.
1010
1 file changed, 12 insertions(+), 9 deletions(-)
1111

1212
diff --git types/@react-native-camera-roll/camera-roll/lib/typescript/CameraRoll.js.flow types/@react-native-camera-roll/camera-roll/lib/typescript/CameraRoll.js.flow
13-
index 525cabed3..707a2fc94 100644
13+
index 77a4779d0..8386689df 100644
1414
--- types/@react-native-camera-roll/camera-roll/lib/typescript/CameraRoll.js.flow
1515
+++ types/@react-native-camera-roll/camera-roll/lib/typescript/CameraRoll.js.flow
16-
@@ -81,27 +81,30 @@ export type Album = {
16+
@@ -91,27 +91,30 @@ export type Album = {
1717
};
1818

1919
declare export class CameraRoll {

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2016,10 +2016,10 @@
20162016
dependencies:
20172017
merge-options "^3.0.4"
20182018

2019-
"@react-native-camera-roll/camera-roll@^5.0.4":
2020-
version "5.0.4"
2021-
resolved "https://registry.yarnpkg.com/@react-native-camera-roll/camera-roll/-/camera-roll-5.0.4.tgz#341b8275363ee496b796fa58cb592697798d39e5"
2022-
integrity sha512-3kBRgW3VfmLQmQm70gPUVDu8rPSZymoPc9vmeiPLMKBqtWaqPNuPX0jQ6mZ8AEtYbBdoWC360Q4YYPalXv37zA==
2019+
"@react-native-camera-roll/camera-roll@^5.0.4 <5.3.0":
2020+
version "5.2.4"
2021+
resolved "https://registry.yarnpkg.com/@react-native-camera-roll/camera-roll/-/camera-roll-5.2.4.tgz#216d0ea4656b6538c10b60f057118c6f5e704c0d"
2022+
integrity sha512-pEQDartgO8Nqy6QDm1efvIPpv4q5W+AtTgS05JGK/9x8VzSj8fJ/cvHmMZBlm/4sFpJyvJZ+1KYxKsvFJLbGuQ==
20232023

20242024
"@react-native-clipboard/clipboard@^1.11.1":
20252025
version "1.11.1"

0 commit comments

Comments
 (0)