Skip to content

Commit

Permalink
feat: expo 52
Browse files Browse the repository at this point in the history
  • Loading branch information
bpouzet committed Dec 30, 2024
1 parent 7793391 commit 0658521
Show file tree
Hide file tree
Showing 16 changed files with 223 additions and 11,067 deletions.
61 changes: 33 additions & 28 deletions app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,7 @@ export default ({ config }: ConfigContext): MyExpoConfig => ({
foregroundImage: ADAPTIVE_ICON,
monochromeImage: './assets/images/adaptive-monochrome-icon.png'
},
blockedPermissions: [
'android.permission.READ_CALENDAR',
'android.permission.WRITE_CALENDAR',
'android.permission.SYSTEM_ALERT_WINDOW',
'android.permission.READ_EXTERNAL_STORAGE',
'android.permission.WRITE_EXTERNAL_STORAGE',
'android.permission.VIBRATE',
],
blockedPermissions: [],
package: PACKAGE,
permissions: [],
softwareKeyboardLayoutMode: 'pan',
Expand All @@ -45,9 +38,6 @@ export default ({ config }: ConfigContext): MyExpoConfig => ({
barStyle: 'light-content',
translucent: false,
},
assetBundlePatterns: [
'src/assets/**/*',
],
extra: {
api: {
key: process.env.API_KEY,
Expand All @@ -64,8 +54,17 @@ export default ({ config }: ConfigContext): MyExpoConfig => ({
bundleIdentifier: PACKAGE,
infoPlist: {
CFBundleAllowMixedLocalizations: true,
CFBundleLocalizations: ['en', 'fr'],
LSApplicationQueriesSchemes: [ 'itms-apps' ],
},
privacyManifests: {
NSPrivacyAccessedAPITypes: [
{
NSPrivacyAccessedAPIType: 'NSPrivacyAccessedAPICategoryUserDefaults',
NSPrivacyAccessedAPITypeReasons: ['CA92.1'],
},
],
},
supportsTablet: true,
},
jsEngine: 'hermes',
Expand All @@ -74,31 +73,29 @@ export default ({ config }: ConfigContext): MyExpoConfig => ({
fr: './assets/translations/fr.json',
},
name: 'NC Domain Finder' + (IS_STAGING ? ' (staging)' : IS_DEV ? '(dev)' : ''),
newArchEnabled: false,
orientation: 'portrait',
platforms: [
'android',
'ios',
],
plugins: [
[
'@sentry/react-native/expo',
{
organization: process.env.SENTRY_ORG,
project: process.env.SENTRY_PROJECT,
url: 'https://sentry.io/',
},
],
// [
// '@sentry/react-native/expo',
// {
// organization: process.env.SENTRY_ORG,
// project: process.env.SENTRY_PROJECT,
// url: 'https://sentry.io/',
// },
// ],
[
'expo-build-properties', {
android: {
allowBackup: false,
enableShrinkResourcesInReleaseBuilds: true,
enableProguardInReleaseBuilds: true,
//newArchEnabled: true,
},
ios: {
//newArchEnabled: true,
},
ios: {},
},
],
[
Expand All @@ -107,18 +104,26 @@ export default ({ config }: ConfigContext): MyExpoConfig => ({
},
],
'expo-localization',
'expo-router',
[
'expo-splash-screen',
{
backgroundColor: BG_COLOR,
image: SPLASH,
},
],
[
'expo-sqlite',
{}
],
['react-native-edge-to-edge'],
],
primaryColor: BG_COLOR,
runtimeVersion: {
policy: 'sdkVersion',
},
scheme: 'nc-domain-finder',
slug: 'nc-domain-finder',
splash: {
backgroundColor: BG_COLOR,
image: SPLASH,
resizeMode: 'contain',
},
updates: {
fallbackToCacheTimeout: 0,
url: 'https://u.expo.dev/9df8db98-43eb-41f6-a9e8-04873f919754',
Expand Down
Binary file added bun.lockb
Binary file not shown.
3 changes: 3 additions & 0 deletions eas.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
},
"build": {
"development": {
"bun": "1.1.42",
"developmentClient": true,
"distribution": "internal",
"channel": "development",
Expand All @@ -24,6 +25,7 @@
"android": {
"buildType": "apk"
},
"bun": "1.1.42",
"distribution": "internal",
"channel": "staging",
"env": {
Expand All @@ -32,6 +34,7 @@
},
"production": {
"autoIncrement": true,
"bun": "1.1.42",
"channel": "production",
"env": {
"APP_ENV": "production",
Expand Down
166 changes: 88 additions & 78 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
{
"name": "nc-domain-finder",
"version": "1.2.3",
"version": "2.0.0",
"main": "expo-router/entry",
"scripts": {
"start": "npx expo start -c",
"build:dev:android": "cross-env APP_ENV=development npx eas-cli build --profile development --platform android",
"build:dev:ios": "cross-env APP_ENV=development npx eas-cli build --profile development --platform ios",
"build:dev:ios:simulator": "cross-env APP_ENV=development npx eas-cli build --profile development-simulator --platform ios",
"build:staging:android": "cross-env APP_ENV=staging npx eas-cli build --profile staging --platform android",
"update:staging": "cross-env APP_ENV=staging npx eas-cli update --channel staging --auto",
"prebuild": "cross-env APP_ENV=production npx expo prebuild",
"build:dev:android": "cross-env NODE_ENV=development APP_ENV=development npx eas-cli build --profile development --platform android",
"build:dev:ios": "cross-env NODE_ENV=development APP_ENV=development npx eas-cli build --profile development --platform ios",
"build:dev:ios:simulator": "cross-env NODE_ENV=development APP_ENV=development npx eas-cli build --profile development-simulator --platform ios",
"build:staging:android": "cross-env NODE_ENV=production APP_ENV=staging npx eas-cli build --profile staging --platform android",
"update:staging": "cross-env NODE_ENV=production APP_ENV=staging npx eas-cli update --channel staging --auto",
"update:production": "cross-env NODE_ENV=production APP_ENV=production npx eas-cli update --channel production --auto",
"prebuild:staging": "cross-env NODE_ENV=production APP_ENV=staging npx expo prebuild",
"prebuild:production": "cross-env NODE_ENV=production APP_ENV=production npx expo prebuild",
"android": "npx expo run:android --variant release",
"lint": "eslint --ext .tsx --ext .ts src/ app.config.ts babel.config.js index.js",
"test": "jest --watchAll",
Expand All @@ -30,93 +32,101 @@
"url": "https://github.com/bpouzet/nc-domain-finder/issues"
},
"homepage": "https://github.com/bpouzet/nc-domain-finder#readme",
"packageManager": "yarn@1.22.19",
"packageManager": "bun@1.1.42",
"engines": {
"node": ">=18"
"node": ">=20"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"@babel/runtime": "^7.18.9",
"@expo/vector-icons": "^14.0.0",
"@react-native-async-storage/async-storage": "1.21.0",
"@react-native-community/netinfo": "11.1.0",
"@react-navigation/native": "^6.1.17",
"@react-navigation/native-stack": "^6.9.26",
"@sentry/react-native": "5.22.0",
"@shopify/flash-list": "1.6.4",
"@tanstack/query-async-storage-persister": "^5.29.1",
"@tanstack/react-query": "^5.29.2",
"@tanstack/react-query-persist-client": "^5.29.2",
"dayjs": "^1.11.10",
"expo": "~50.0.17",
"expo-application": "~5.8.4",
"expo-build-properties": "~0.11.1",
"expo-calendar": "~12.2.1",
"expo-community-add-event-to-calendar": "^0.10.0",
"expo-constants": "~15.4.6",
"expo-dev-client": "~3.3.11",
"expo-device": "~5.9.4",
"expo-font": "~11.10.3",
"expo-image": "~1.10.6",
"expo-linear-gradient": "~12.7.2",
"expo-linking": "~6.2.2",
"expo-localization": "~14.8.4",
"expo-navigation-bar": "~2.8.1",
"expo-router": "~3.4.8",
"expo-splash-screen": "~0.26.4",
"expo-status-bar": "~1.11.1",
"expo-updates": "~0.24.12",
"i18next": "^23.10.1",
"postinstall-postinstall": "^2.1.0",
"react": "^18.2.0",
"react-dom": "18.2.0",
"react-i18next": "^14.1.0",
"react-native": "0.73.6",
"react-native-dotenv": "^3.4.8",
"react-native-gesture-handler": "~2.14.0",
"react-native-paper": "^5.12.3",
"react-native-reanimated": "~3.6.2",
"react-native-safe-area-context": "4.8.2",
"react-native-screens": "~3.29.0",
"@expo/vector-icons": "^14.0.4",
"@react-native-async-storage/async-storage": "1.23.1",
"@react-native-community/netinfo": "11.4.1",
"@react-navigation/native": "^7.0.14",
"@sentry/react-native": "~6.4.0",
"@shopify/flash-list": "1.7.2",
"@tanstack/query-async-storage-persister": "^5.62.9",
"@tanstack/react-query": "^5.62.11",
"@tanstack/react-query-persist-client": "^5.62.11",
"dayjs": "^1.11.13",
"expo": "~52.0.23",
"expo-application": "~6.0.1",
"expo-build-properties": "~0.13.1",
"expo-calendar": "~14.0.5",
"expo-constants": "~17.0.3",
"expo-dev-client": "~5.0.7",
"expo-device": "~7.0.1",
"expo-font": "~13.0.2",
"expo-image": "~2.0.3",
"expo-linear-gradient": "~14.0.1",
"expo-linking": "~7.0.3",
"expo-localization": "~16.0.0",
"expo-router": "~4.0.15",
"expo-splash-screen": "~0.29.18",
"expo-sqlite": "~15.0.4",
"expo-system-ui": "~4.0.6",
"expo-updates": "~0.26.10",
"i18next": "^24.2.0",
"react": "^18.3.1",
"react-dom": "18.3.1",
"react-i18next": "^15.3.0",
"react-native": "0.76.5",
"react-native-dotenv": "^3.4.11",
"react-native-edge-to-edge": "^1.1.3",
"react-native-gesture-handler": "~2.20.2",
"react-native-keyboard-controller": "^1.15.2",
"react-native-paper": "^5.12.5",
"react-native-reanimated": "~3.16.6",
"react-native-safe-area-context": "4.12.0",
"react-native-screens": "~4.4.0",
"react-native-shimmer-placeholder": "^2.0.9",
"react-native-store-version": "^1.4.1",
"semver": "^7.6.0",
"semver": "^7.6.3",
"sp-react-native-in-app-updates": "^1.4.0",
"zod": "^3.23.0",
"zustand": "^4.5.2"
"zod": "^3.24.1",
"zustand": "^5.0.2"
},
"devDependencies": {
"@babel/core": "^7.20.7",
"@expo/metro-config": "~0.17.3",
"@types/luxon": "^3.2.0",
"@types/node": "^18.13.0",
"@types/react": "~18.2.45",
"@types/webpack-env": "^1.18.0",
"@typescript-eslint/eslint-plugin": "^5.52.0",
"@typescript-eslint/parser": "^5.52.0",
"babel-plugin-formatjs": "^10.5.13",
"babel-plugin-module-resolver": "^4.1.0",
"@babel/core": "^7.26.0",
"@babel/runtime": "^7.26.0",
"@expo/metro-config": "~0.19.8",
"@types/luxon": "^3.4.2",
"@types/node": "^18.19.68",
"@types/react": "~18.3.18",
"@types/webpack-env": "^1.18.5",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"ajv": "^8.17.1",
"babel-plugin-formatjs": "^10.5.29",
"babel-plugin-module-resolver": "^5.0.2",
"cross-env": "^7.0.3",
"eslint": "8.31.0",
"eslint-config-universe": "^11.1.1",
"husky": "^8.0.2",
"jest": "^29.2.1",
"jest-expo": "^50.0.4",
"license-report": "^6.3.0",
"metro-minify-terser": "^0.79.1",
"eslint": "9.3.0",
"eslint-config-universe": "^12.1.0",
"husky": "^8.0.3",
"jest": "^29.7.0",
"jest-expo": "^52.0.2",
"license-report": "^6.7.1",
"metro-minify-terser": "^0.80.12",
"postinstall-postinstall": "^2.1.0",
"react-native-bundle-visualizer": "^3.1.3",
"react-test-renderer": "18.2.0",
"source-map-explorer": "^2.5.3",
"typescript": "^5.3.3",
"validate-branch-name": "^1.3.0"
},
"resolutions": {
"@react-navigation/native": "^6.1.17",
"@react-navigation/native-stack": "^6.9.26"
"typescript": "~5.7.2",
"validate-branch-name": "^1.3.1"
},
"validate-branch-name": {
"pattern": "^(main|develop){1}$|^(chore|feature|feat|fix|hotfix|release)/.+$"
},
"trustedDependencies": ["@sentry/cli"],
"expo": {
"install": {
"exclude": [
"@shopify/flash-list@1.7.1",
"@sentry/react-native@~6.3.0"
]
}
},
"patchedDependencies": {
"react-native-paper@5.12.5": "patches/react-native-paper@5.12.5.patch"
}
}
13 changes: 13 additions & 0 deletions patches/react-native-paper@5.12.5.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/src/components/BottomNavigation/BottomNavigationBar.tsx b/src/components/BottomNavigation/BottomNavigationBar.tsx
index 0bfe303bfb443396ede776726faa0f8ba32752cd..a59ae061dcaa51f026e78de0ccfd536318dd0aee 100644
--- a/src/components/BottomNavigation/BottomNavigationBar.tsx
+++ b/src/components/BottomNavigation/BottomNavigationBar.tsx
@@ -360,7 +360,7 @@ const BottomNavigationBar = <Route extends BaseRoute>({
navigationState,
renderIcon,
renderLabel,
- renderTouchable = (props: TouchableProps<Route>) => <Touchable {...props} />,
+ renderTouchable = ({ key, ...props }: TouchableProps<Route>) => <Touchable key={key} {...props} />,
getLabelText = ({ route }: { route: Route }) => route.title,
getBadge = ({ route }: { route: Route }) => route.badge,
getColor = ({ route }: { route: Route }) => route.color,
3 changes: 1 addition & 2 deletions src/app/(root)/domain.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-na
import { Appbar, FAB, List, Snackbar, useTheme } from 'react-native-paper' ;
import { Platform, ScrollView, StyleSheet, View, useWindowDimensions } from 'react-native' ;
import { useRouter, useLocalSearchParams } from 'expo-router' ;
import { startAddEventToCalendarAsync } from 'expo-community-add-event-to-calendar' ;
import { useSafeAreaInsets } from 'react-native-safe-area-context' ;
import { useState } from 'react' ;
import { useTranslation } from 'react-i18next' ;
Expand Down Expand Up @@ -103,7 +102,7 @@ export default function Domain() {
title: eventTitle,
} ;

await startAddEventToCalendarAsync(event) ;
await Calendar.createEventInCalendarAsync(event) ;

} else if(Platform.OS === 'ios') {
// check if calendar is available
Expand Down
Loading

0 comments on commit 0658521

Please sign in to comment.