Skip to content

Commit 52bd5e2

Browse files
Update dependencies (#49)
1 parent d7b8314 commit 52bd5e2

File tree

5 files changed

+1817
-1997
lines changed

5 files changed

+1817
-1997
lines changed

template/ios/Podfile.lock

+26-56
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ PODS:
7474
- hermes-engine/Pre-built (= 0.72.5)
7575
- hermes-engine/Pre-built (0.72.5)
7676
- libevent (2.1.12)
77-
- lottie-ios (3.4.4)
78-
- lottie-react-native (5.1.6):
79-
- lottie-ios (~> 3.4.0)
77+
- lottie-ios (4.3.4)
78+
- lottie-react-native (6.4.1):
79+
- lottie-ios (~> 4.3.3)
8080
- React-Core
8181
- MMKV (1.3.1):
8282
- MMKVCore (~> 1.3.1)
@@ -388,18 +388,18 @@ PODS:
388388
- React-Core
389389
- react-native-geolocation (3.1.0):
390390
- React-Core
391-
- react-native-get-random-values (1.9.0):
391+
- react-native-get-random-values (1.10.0):
392392
- React-Core
393-
- react-native-keyboard-controller (1.7.0):
393+
- react-native-keyboard-controller (1.9.5):
394394
- React-Core
395-
- react-native-mmkv (2.10.2):
395+
- react-native-mmkv (2.11.0):
396396
- MMKV (>= 1.2.13)
397397
- React-Core
398-
- react-native-netinfo (9.4.1):
398+
- react-native-netinfo (11.2.0):
399399
- React-Core
400400
- react-native-restart (0.0.27):
401401
- React-Core
402-
- react-native-safe-area-context (4.7.2):
402+
- react-native-safe-area-context (4.7.4):
403403
- React-Core
404404
- react-native-splash-screen (3.3.0):
405405
- React-Core
@@ -513,45 +513,19 @@ PODS:
513513
- React-jsi (= 0.72.5)
514514
- React-logger (= 0.72.5)
515515
- React-perflogger (= 0.72.5)
516-
- RNDeviceInfo (10.9.0):
516+
- RNDeviceInfo (10.12.0):
517517
- React-Core
518-
- RNGestureHandler (2.13.1):
518+
- RNGestureHandler (2.14.0):
519+
- RCT-Folly (= 2021.07.22.00)
519520
- React-Core
520521
- RNReactNativeHapticFeedback (2.2.0):
521522
- React-Core
522-
- RNReanimated (3.5.1):
523-
- DoubleConversion
524-
- FBLazyVector
525-
- glog
526-
- hermes-engine
527-
- RCT-Folly
528-
- RCTRequired
529-
- RCTTypeSafety
530-
- React-callinvoker
523+
- RNReanimated (3.6.1):
524+
- RCT-Folly (= 2021.07.22.00)
531525
- React-Core
532-
- React-Core/DevSupport
533-
- React-Core/RCTWebSocket
534-
- React-CoreModules
535-
- React-cxxreact
536-
- React-hermes
537-
- React-jsi
538-
- React-jsiexecutor
539-
- React-jsinspector
540-
- React-RCTActionSheet
541-
- React-RCTAnimation
542-
- React-RCTAppDelegate
543-
- React-RCTBlob
544-
- React-RCTImage
545-
- React-RCTLinking
546-
- React-RCTNetwork
547-
- React-RCTSettings
548-
- React-RCTText
549526
- ReactCommon/turbomodule/core
550-
- Yoga
551-
- RNScreens (3.25.0):
552-
- React-Core
553-
- React-RCTImage
554-
- RNSVG (13.14.0):
527+
- RNScreens (3.27.0):
528+
- RCT-Folly (= 2021.07.22.00)
555529
- React-Core
556530
- SocketRocket (0.6.1)
557531
- Yoga (1.14.0)
@@ -636,7 +610,6 @@ DEPENDENCIES:
636610
- RNReactNativeHapticFeedback (from `../node_modules/react-native-haptic-feedback`)
637611
- RNReanimated (from `../node_modules/react-native-reanimated`)
638612
- RNScreens (from `../node_modules/react-native-screens`)
639-
- RNSVG (from `../node_modules/react-native-svg`)
640613
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
641614

642615
SPEC REPOS:
@@ -767,8 +740,6 @@ EXTERNAL SOURCES:
767740
:path: "../node_modules/react-native-reanimated"
768741
RNScreens:
769742
:path: "../node_modules/react-native-screens"
770-
RNSVG:
771-
:path: "../node_modules/react-native-svg"
772743
Yoga:
773744
:path: "../node_modules/react-native/ReactCommon/yoga"
774745

@@ -790,8 +761,8 @@ SPEC CHECKSUMS:
790761
glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
791762
hermes-engine: f6cf92a471053245614d9d8097736f6337d5b86c
792763
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
793-
lottie-ios: 8f97d3271e155c2d688875c29cd3c74908aef5f8
794-
lottie-react-native: 8f9d4be452e23f6e5ca0fdc11669dc99ab52be81
764+
lottie-ios: 3d98679b41fa6fd6aff2352b3953dbd3df8a397e
765+
lottie-react-native: a2ae9c27c273b060b2affff2957bc0ff7fdca353
795766
MMKV: 5a07930c70c70b86cd87761a42c8f3836fb681d7
796767
MMKVCore: e50135dbd33235b6ab390635991bab437ab873c0
797768
OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
@@ -812,12 +783,12 @@ SPEC CHECKSUMS:
812783
React-logger: 2e4aee3e11b3ec4fa6cfd8004610bbb3b8d6cca4
813784
react-native-config: 86038147314e2e6d10ea9972022aa171e6b1d4d8
814785
react-native-geolocation: ef66fb798d96284c6043f0b16c15d9d1d4955db4
815-
react-native-get-random-values: dee677497c6a740b71e5612e8dbd83e7539ed5bb
816-
react-native-keyboard-controller: 3a9328bd05ce52bb1c2680160b51b1a24dd50d59
817-
react-native-mmkv: 9ae7ca3977e8ef48dbf7f066974eb844c20b5fd7
818-
react-native-netinfo: fefd4e98d75cbdd6e85fc530f7111a8afdf2b0c5
786+
react-native-get-random-values: 384787fd76976f5aec9465aff6fa9e9129af1e74
787+
react-native-keyboard-controller: b0d78d3a1576aa57bb62a295ff42150e1f25ee7d
788+
react-native-mmkv: e97c0c79403fb94577e5d902ab1ebd42b0715b43
789+
react-native-netinfo: 25c87e28495d955b30aeca9c22594691668c907a
819790
react-native-restart: 7595693413fe3ca15893702f2c8306c62a708162
820-
react-native-safe-area-context: 7aa8e6d9d0f3100a820efb1a98af68aa747f9284
791+
react-native-safe-area-context: 2cd91d532de12acdb0a9cbc8d43ac72a8e4c897c
821792
react-native-splash-screen: 4312f786b13a81b5169ef346d76d33bc0c6dc457
822793
React-NativeModulesApple: 797bc6078d566eef3fb3f74127e6e1d2e945a15f
823794
React-perflogger: cd8886513f68e1c135a1e79d20575c6489641597
@@ -836,12 +807,11 @@ SPEC CHECKSUMS:
836807
React-runtimescheduler: cc32add98c45c5df18436a6a52a7e1f6edec102c
837808
React-utils: 7a9918a1ffdd39aba67835d42386f592ea3f8e76
838809
ReactCommon: 91ece8350ebb3dd2be9cef662abd78b6948233c0
839-
RNDeviceInfo: 02ea8b23e2280fa18e00a06d7e62804d74028579
840-
RNGestureHandler: 38aa38413896620338948fbb5c90579a7b1c3fde
810+
RNDeviceInfo: db5c64a060e66e5db3102d041ebe3ef307a85120
811+
RNGestureHandler: 32a01c29ecc9bb0b5bf7bc0a33547f61b4dc2741
841812
RNReactNativeHapticFeedback: ec56a5f81c3941206fd85625fa669ffc7b4545f9
842-
RNReanimated: 99aa8c96151abbc2d7e737a56ec62aca709f0c92
843-
RNScreens: 85d3880b52d34db7b8eeebe2f1a0e807c05e69fa
844-
RNSVG: d00c8f91c3cbf6d476451313a18f04d220d4f396
813+
RNReanimated: fdbaa9c964bbab7fac50c90862b6cc5f041679b9
814+
RNScreens: 3c2d122f5e08c192e254c510b212306da97d2581
845815
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
846816
Yoga: 86fed2e4d425ee4c6eab3813ba1791101ee153c6
847817
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

template/package.json

+19-20
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@
1111
"version": "react-native-version"
1212
},
1313
"dependencies": {
14-
"@formatjs/intl-getcanonicallocales": "^2.2.0",
15-
"@formatjs/intl-locale": "^3.3.0",
16-
"@formatjs/intl-numberformat": "^8.5.0",
17-
"@formatjs/intl-pluralrules": "^5.2.2",
18-
"@klarna/react-native-vector-drawable": "^0.4.0",
14+
"@formatjs/intl-getcanonicallocales": "^2.3.0",
15+
"@formatjs/intl-locale": "^3.4.3",
16+
"@formatjs/intl-numberformat": "^8.9.0",
17+
"@formatjs/intl-pluralrules": "^5.2.10",
18+
"@klarna/react-native-vector-drawable": "^0.5.0",
1919
"@react-native-community/geolocation": "^3.1.0",
20-
"@react-native-community/netinfo": "^9.3.10",
21-
"@react-navigation/native": "^6.1.6",
22-
"@react-navigation/native-stack": "^6.9.12",
23-
"@tanstack/react-query": "^4.29.12",
24-
"axios": "^1.4.0",
20+
"@react-native-community/netinfo": "^11.2.0",
21+
"@react-navigation/native": "^6.1.9",
22+
"@react-navigation/native-stack": "^6.9.17",
23+
"@tanstack/react-query": "^5.12.2",
24+
"axios": "^1.6.2",
2525
"babel-plugin-module-resolver": "^5.0.0",
26-
"i18next": "^23.5.1",
27-
"lottie-react-native": "^5.1.6",
28-
"nanoid": "^4.0.2",
26+
"i18next": "^23.7.7",
27+
"lottie-react-native": "^6.4.1",
28+
"nanoid": "^5.0.4",
2929
"react": "18.2.0",
3030
"react-error-boundary": "^4.0.8",
3131
"react-freeze": "^1.0.3",
@@ -45,8 +45,7 @@
4545
"react-native-safe-area-context": "^4.5.3",
4646
"react-native-screens": "^3.20.0",
4747
"react-native-splash-screen": "^3.3.0",
48-
"react-native-svg": "^13.14.0",
49-
"react-query-kit": "^1.4.5",
48+
"react-query-kit": "^2.0.10",
5049
"reflect-metadata": "^0.1.13",
5150
"tsyringe": "^4.8.0"
5251
},
@@ -56,10 +55,10 @@
5655
"@babel/plugin-transform-class-static-block": "^7.22.11",
5756
"@babel/preset-env": "^7.22.20",
5857
"@babel/runtime": "^7.22.0",
59-
"@react-native/eslint-config": "^0.72.2",
60-
"@react-native/metro-config": "^0.73.1",
58+
"@react-native/eslint-config": "^0.74.0",
59+
"@react-native/metro-config": "^0.73.2",
6160
"@testing-library/jest-native": "^5.4.3",
62-
"@testing-library/react-native": "^12.1.2",
61+
"@testing-library/react-native": "^12.4.1",
6362
"@tsconfig/react-native": "^3.0.2",
6463
"@types/jest": "^29.5.5",
6564
"@types/react": "^18.2.22",
@@ -69,8 +68,8 @@
6968
"accent-cli": "^0.14.1",
7069
"babel-jest": "^29.7.0",
7170
"babel-plugin-transform-typescript-metadata": "^0.3.2",
72-
"eslint": "^8.41.0",
73-
"eslint-plugin-import": "^2.27.5",
71+
"eslint": "^8.55.0",
72+
"eslint-plugin-import": "^2.29.0",
7473
"eslint-plugin-unused-imports": "^3.0.0",
7574
"jest": "^29.7.0",
7675
"metro-react-native-babel-preset": "0.77.0",
+51-54
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,61 @@
1-
import AnimatedLottieView, {
2-
AnimatedLottieViewProps,
3-
} from 'lottie-react-native';
1+
import AnimatedLottieView, { LottieViewProps } from 'lottie-react-native';
42
import React, { useEffect, useRef } from 'react';
53
import { AppState } from 'react-native';
64

7-
export const Lottie = React.forwardRef<
8-
AnimatedLottieView,
9-
AnimatedLottieViewProps
10-
>(({ autoPlay = false, ...props }, forwardedRef) => {
11-
const internalRef = useRef<AnimatedLottieView | null>(null);
12-
const previousAutoplay = useRef(autoPlay ?? false);
5+
export const Lottie = React.forwardRef<AnimatedLottieView, LottieViewProps>(
6+
({ autoPlay = false, ...props }, forwardedRef) => {
7+
const internalRef = useRef<AnimatedLottieView | null>(null);
8+
const previousAutoplay = useRef(autoPlay ?? false);
139

14-
useEffect(() => {
15-
// If we init LottieAnimatedView with autoPlay=false (which is the default)
16-
// then set autoPlay=true, it won't start automatically like we expected, so we fix this behaviour.
17-
if (!previousAutoplay.current && autoPlay) {
18-
internalRef.current?.play();
19-
}
20-
21-
// If the animation was playing and then stopped, we wan't to reset it.
22-
// This might not cover every usecases, but it's what we need right now.
23-
// If this doesn't cover your usecase, you might want to use AnimatedLottieView directly
24-
// or dont use the autoPlay property. If you use AnimatedLottieView directly,
25-
// keep in mind the other fixed behaviours here, you might need to reproduce those fixes too.
26-
if (previousAutoplay.current && !autoPlay) {
27-
internalRef.current?.reset();
28-
}
29-
30-
previousAutoplay.current = autoPlay;
31-
}, [autoPlay]);
32-
33-
useEffect(() => {
34-
// When the app comes back from background, the animation reset to its first frame
35-
// but then it will not play, so if autoPlay is still true, we play it.
36-
const subscription = AppState.addEventListener('change', (state) => {
37-
if (state === 'active' && autoPlay) {
10+
useEffect(() => {
11+
// If we init LottieAnimatedView with autoPlay=false (which is the default)
12+
// then set autoPlay=true, it won't start automatically like we expected, so we fix this behaviour.
13+
if (!previousAutoplay.current && autoPlay) {
3814
internalRef.current?.play();
3915
}
40-
});
4116

42-
return () => subscription.remove();
43-
}, [autoPlay]);
44-
45-
return (
46-
<AnimatedLottieView
47-
ref={(lottie) => {
48-
internalRef.current = lottie;
17+
// If the animation was playing and then stopped, we wan't to reset it.
18+
// This might not cover every usecases, but it's what we need right now.
19+
// If this doesn't cover your usecase, you might want to use AnimatedLottieView directly
20+
// or dont use the autoPlay property. If you use AnimatedLottieView directly,
21+
// keep in mind the other fixed behaviours here, you might need to reproduce those fixes too.
22+
if (previousAutoplay.current && !autoPlay) {
23+
internalRef.current?.reset();
24+
}
4925

50-
if (!forwardedRef) {
51-
return;
52-
}
26+
previousAutoplay.current = autoPlay;
27+
}, [autoPlay]);
5328

54-
if (typeof forwardedRef === 'function') {
55-
forwardedRef(lottie);
56-
} else if (typeof forwardedRef === 'object') {
57-
forwardedRef.current = lottie;
29+
useEffect(() => {
30+
// When the app comes back from background, the animation reset to its first frame
31+
// but then it will not play, so if autoPlay is still true, we play it.
32+
const subscription = AppState.addEventListener('change', (state) => {
33+
if (state === 'active' && autoPlay) {
34+
internalRef.current?.play();
5835
}
59-
}}
60-
autoPlay={autoPlay}
61-
{...props}
62-
/>
63-
);
64-
});
36+
});
37+
38+
return () => subscription.remove();
39+
}, [autoPlay]);
40+
41+
return (
42+
<AnimatedLottieView
43+
ref={(lottie) => {
44+
internalRef.current = lottie;
45+
46+
if (!forwardedRef) {
47+
return;
48+
}
49+
50+
if (typeof forwardedRef === 'function') {
51+
forwardedRef(lottie);
52+
} else if (typeof forwardedRef === 'object') {
53+
forwardedRef.current = lottie;
54+
}
55+
}}
56+
autoPlay={autoPlay}
57+
{...props}
58+
/>
59+
);
60+
}
61+
);

template/src/services/query-client.ts

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
11
import { QueryClient } from '@tanstack/react-query';
22

3-
export default new QueryClient({
4-
defaultOptions: {
5-
queries: {
6-
suspense: true,
7-
},
8-
},
9-
});
3+
export default new QueryClient();

0 commit comments

Comments
 (0)