Skip to content

Commit 5a133ea

Browse files
build: ⬆️ upgrade react native to 0.80.1
1 parent 27eecd3 commit 5a133ea

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+997
-955
lines changed

.prettierrc.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
module.exports = {
22
arrowParens: 'avoid',
3-
bracketSameLine: true,
4-
bracketSpacing: false,
53
singleQuote: true,
64
trailingComma: 'all',
75
};

android/app/src/main/java/com/rnstartermedusa/MainApplication.kt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import android.app.Application
44
import com.facebook.react.PackageList
55
import com.facebook.react.ReactApplication
66
import com.facebook.react.ReactHost
7+
import com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative
78
import com.facebook.react.ReactNativeHost
89
import com.facebook.react.ReactPackage
910
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
@@ -35,10 +36,6 @@ class MainApplication : Application(), ReactApplication {
3536

3637
override fun onCreate() {
3738
super.onCreate()
38-
SoLoader.init(this, OpenSourceMergedSoMapping)
39-
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
40-
// If you opted-in for the New Architecture, we load the native entry point for this app.
41-
load()
42-
}
39+
loadReactNative(this)
4340
}
4441
}

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
compileSdkVersion = 35
66
targetSdkVersion = 35
77
ndkVersion = "27.1.12297006"
8-
kotlinVersion = "2.0.21"
8+
kotlinVersion = "2.1.20"
99
}
1010
repositories {
1111
google()
181 Bytes
Binary file not shown.

android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

android/gradlew

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ case "$( uname )" in #(
114114
NONSTOP* ) nonstop=true ;;
115115
esac
116116

117-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
117+
CLASSPATH="\\\"\\\""
118118

119119

120120
# Determine the Java command to use to start the JVM.
@@ -213,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
213213
set -- \
214214
"-Dorg.gradle.appname=$APP_BASE_NAME" \
215215
-classpath "$CLASSPATH" \
216-
org.gradle.wrapper.GradleWrapperMain \
216+
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
217217
"$@"
218218

219219
# Stop when "xargs" is not available.

android/gradlew.bat

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
@REM Copyright (c) Meta Platforms, Inc. and affiliates.
2+
@REM
3+
@REM This source code is licensed under the MIT license found in the
4+
@REM LICENSE file in the root directory of this source tree.
5+
16
@rem
27
@rem Copyright 2015 the original author or authors.
38
@rem
@@ -74,7 +79,7 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
7479

7580

7681
@rem Execute Gradle
77-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
82+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
7883

7984
:end
8085
@rem End local scope for the variables with windows NT shell

app/api/client.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Medusa from '@medusajs/js-sdk';
2-
import {MEDUSA_BACKEND_URL, PUBLISHABLE_API_KEY} from '@env';
2+
import { MEDUSA_BACKEND_URL, PUBLISHABLE_API_KEY } from '@env';
33
import AsyncStorage from '@react-native-async-storage/async-storage';
44

55
export const apiUrl = MEDUSA_BACKEND_URL || 'http://localhost:9000';

app/app.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import {
33
createStaticNavigation,
44
StaticParamList,
55
} from '@react-navigation/native';
6-
import {createNativeStackNavigator} from '@react-navigation/native-stack';
7-
import {createBottomTabNavigator} from '@react-navigation/bottom-tabs';
6+
import { createNativeStackNavigator } from '@react-navigation/native-stack';
7+
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
88
import ThemeProvider from '@styles/theme-provider';
9-
import {QueryClient, QueryClientProvider} from '@tanstack/react-query';
10-
import {GestureHandlerRootView} from 'react-native-gesture-handler';
9+
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
10+
import { GestureHandlerRootView } from 'react-native-gesture-handler';
1111
import TabBar from '@components/common/tab-bar';
1212
import Splash from '@screens/splash';
1313
import Home from '@screens/home';
@@ -24,17 +24,17 @@ import Register from '@screens/auth/register';
2424
import Orders from '@screens/order/orders';
2525
import OrderDetail from '@screens/order/order-detail';
2626
import ProfileDetail from '@screens/profile/profile-detail';
27-
import {CartProvider} from '@data/cart-context';
28-
import {RegionProvider} from '@data/region-context';
29-
import {CustomerProvider} from '@data/customer-context';
30-
import {LocaleProvider} from '@data/locale-context';
27+
import { CartProvider } from '@data/cart-context';
28+
import { RegionProvider } from '@data/region-context';
29+
import { CustomerProvider } from '@data/customer-context';
30+
import { LocaleProvider } from '@data/locale-context';
3131
import AddressForm from '@screens/address/address-form';
3232
import AddressList from '@screens/address/address-list';
3333
import RegionSelect from '@screens/region-select';
3434
import Settings from '@screens/settings';
3535

3636
import '@styles/global.css';
37-
import {SafeAreaProvider} from 'react-native-safe-area-context';
37+
import { SafeAreaProvider } from 'react-native-safe-area-context';
3838

3939
export type RootStackParamList = StaticParamList<typeof RootStack>;
4040

app/components/cart/animated-cart-button.tsx

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
import Button from '@components/common/button';
22
import Text from '@components/common/text';
3-
import React, {useEffect, useRef} from 'react';
3+
import React, { useEffect, useRef } from 'react';
44
import Icon from '@react-native-vector-icons/ant-design';
5-
import {View} from 'react-native';
5+
import { View } from 'react-native';
66
import Animated, {
77
useAnimatedStyle,
88
useSharedValue,
99
withTiming,
1010
withSpring,
1111
withSequence,
1212
} from 'react-native-reanimated';
13-
import {useLocalization} from '@fluent/react';
14-
import {useColors} from '@styles/hooks';
15-
import {useCart} from '@data/cart-context';
16-
import {useProductQuantity} from '@data/hooks';
17-
import {useNavigation} from '@react-navigation/native';
13+
import { useLocalization } from '@fluent/react';
14+
import { useColors } from '@styles/hooks';
15+
import { useCart } from '@data/cart-context';
16+
import { useProductQuantity } from '@data/hooks';
17+
import { useNavigation } from '@react-navigation/native';
1818
import Badge from '@components/common/badge';
1919

2020
type AnimatedCartButtonProps = {
@@ -32,8 +32,8 @@ const AnimatedCartButton = ({
3232
inStock,
3333
hasSelectedAllOptions = false,
3434
}: AnimatedCartButtonProps) => {
35-
const {l10n} = useLocalization();
36-
const {addToCart} = useCart();
35+
const { l10n } = useLocalization();
36+
const { addToCart } = useCart();
3737
const [adding, setAdding] = React.useState(false);
3838
const productQuantityInCart = useProductQuantity(productId);
3939
const showViewCart = useSharedValue(productQuantityInCart > 0);
@@ -90,8 +90,8 @@ const AnimatedCartButton = ({
9090
);
9191
};
9292

93-
const ViewCart = ({quantity}: {quantity: number}) => {
94-
const {l10n} = useLocalization();
93+
const ViewCart = ({ quantity }: { quantity: number }) => {
94+
const { l10n } = useLocalization();
9595
const colors = useColors();
9696
const navigation = useNavigation();
9797
const scale = useSharedValue(1);
@@ -101,16 +101,16 @@ const ViewCart = ({quantity}: {quantity: number}) => {
101101
// Only animate when quantity increases
102102
if (prevQuantity.current && quantity > prevQuantity.current) {
103103
scale.value = withSequence(
104-
withSpring(1.3, {damping: 8}),
105-
withSpring(1, {damping: 8}),
104+
withSpring(1.3, { damping: 8 }),
105+
withSpring(1, { damping: 8 }),
106106
);
107107
}
108108
prevQuantity.current = quantity;
109109
}, [quantity, scale]);
110110

111111
const badgeAnimatedStyle = useAnimatedStyle(() => {
112112
return {
113-
transform: [{scale: scale.value}],
113+
transform: [{ scale: scale.value }],
114114
};
115115
});
116116

@@ -122,20 +122,23 @@ const ViewCart = ({quantity}: {quantity: number}) => {
122122
<Button
123123
variant="secondary"
124124
disabled={quantity === 0}
125-
onPress={navigateToCart}>
125+
onPress={navigateToCart}
126+
>
126127
<View>
127128
<View className="flex-row gap-1 items-center">
128129
<View>
129130
<Icon name="shopping-cart" size={18} color={colors.content} />
130131
<Animated.View
131132
className="absolute -top-[8] -right-[8]"
132-
style={badgeAnimatedStyle}>
133+
style={badgeAnimatedStyle}
134+
>
133135
<Badge quantity={quantity} />
134136
</Animated.View>
135137
</View>
136138
<Text
137139
className="ml-2 text-content font-content-bold"
138-
numberOfLines={1}>
140+
numberOfLines={1}
141+
>
139142
{l10n.getString('view-cart')}
140143
</Text>
141144
</View>

0 commit comments

Comments
 (0)