Bläddra i källkod

expo 53/rn 0.79

Viktoriia 1 månad sedan
förälder
incheckning
1797a73cbb

+ 5 - 0
app.config.ts

@@ -155,7 +155,12 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
     [
       'expo-build-properties',
       {
+        ios: {
+          // newArchEnabled: false,
+          deploymentTarget: '15.1'
+        },
         android: {
+          // newArchEnabled: false,
           minSdkVersion: 24,
           targetSdkVersion: 35
           // kotlinVersion: '1.7.1'

+ 1 - 0
declarations.d.ts

@@ -4,3 +4,4 @@ declare module '*.svg' {
   const content: React.FC<SvgProps>;
   export default content;
 }
+declare module '@turf/turf';

+ 38 - 9
metro.config.js

@@ -1,20 +1,49 @@
-// const { getDefaultConfig } = require('expo/metro-config');
+// // const { getDefaultConfig } = require('expo/metro-config');
+// const { getSentryExpoConfig } = require('@sentry/react-native/metro');
+
+// module.exports = (() => {
+//   // const config = getDefaultConfig(__dirname);
+//   const config = getSentryExpoConfig(__dirname);
+
+//   const { transformer, resolver } = config;
+
+//   config.transformer = {
+//     ...transformer,
+//     babelTransformerPath: require.resolve('react-native-svg-transformer')
+//   };
+//   config.resolver = {
+//     ...resolver,
+//     assetExts: [...resolver.assetExts.filter((ext) => ext !== 'svg'), 'db'],
+//     sourceExts: [...resolver.sourceExts, 'svg']
+//   };
+
+//   return config;
+// })();
+
+// metro.config.js
+const { getDefaultConfig } = require('@expo/metro-config');
 const { getSentryExpoConfig } = require('@sentry/react-native/metro');
 
 module.exports = (() => {
-  // const config = getDefaultConfig(__dirname);
-  const config = getSentryExpoConfig(__dirname);
+  const baseConfig = getDefaultConfig(__dirname);
 
-  const { transformer, resolver } = config;
+  const config = getSentryExpoConfig(__dirname, baseConfig);
 
   config.transformer = {
-    ...transformer,
-    babelTransformerPath: require.resolve('react-native-svg-transformer')
+    ...config.transformer,
+    babelTransformerPath: require.resolve('react-native-svg-transformer'),
+    minifierConfig: {
+      keep_fnames: true,
+      mangle: {
+        keep_fnames: true
+      }
+    }
   };
+
   config.resolver = {
-    ...resolver,
-    assetExts: [...resolver.assetExts.filter((ext) => ext !== 'svg'), 'db'],
-    sourceExts: [...resolver.sourceExts, 'svg']
+    ...config.resolver,
+    assetExts: config.resolver.assetExts.filter((ext) => ext !== 'svg').concat(['db']),
+    sourceExts: [...config.resolver.sourceExts, 'svg']
   };
 
   return config;

+ 79 - 51
package.json

@@ -2,6 +2,29 @@
   "name": "nomadmania-app",
   "version": "2.0.0",
   "main": "node_modules/expo/AppEntry.js",
+  "expo": {
+    "doctor": {
+      "metroConfig": {
+        "skip": true
+      },
+      "reactNativeDirectoryCheck": {
+        "exclude": [
+          "@expo/config-plugins",
+          "@turf/turf",
+          "better-react-native-image-viewing",
+          "dotenv",
+          "moment",
+          "patch-package",
+          "promise",
+          "react-native-color-matrix-image-filters",
+          "react-native-document-picker",
+          "react-native-searchable-dropdown-kj",
+          "react-native-wheel-pick",
+          "uuid"
+        ]
+      }
+    }
+  },
   "scripts": {
     "start": "expo start --dev-client",
     "android": "expo run:android",
@@ -12,61 +35,63 @@
     "postinstall": "patch-package"
   },
   "dependencies": {
-    "@expo/config-plugins": "^8.0.8",
+    "@expo/config-plugins": "~10.1.1",
     "@maplibre/maplibre-react-native": "^10.2.0",
+    "@react-native-camera-roll/camera-roll": "^7.10.1",
     "@react-native-clipboard/clipboard": "^1.14.2",
-    "@react-native-community/datetimepicker": "8.0.1",
-    "@react-native-community/netinfo": "11.3.1",
-    "@react-native-picker/picker": "2.7.5",
-    "@react-navigation/bottom-tabs": "^6.5.11",
-    "@react-navigation/drawer": "^6.6.15",
-    "@react-navigation/material-top-tabs": "^6.6.5",
-    "@react-navigation/native": "^6.1.9",
-    "@react-navigation/native-stack": "^6.9.17",
-    "@react-navigation/stack": "^6.3.20",
-    "@sentry/react-native": "~5.33.2",
-    "@shopify/flash-list": "1.6.4",
+    "@react-native-community/datetimepicker": "8.4.1",
+    "@react-native-community/netinfo": "11.4.1",
+    "@react-native-picker/picker": "2.11.1",
+    "@react-navigation/bottom-tabs": "^7.4.7",
+    "@react-navigation/drawer": "^7.5.8",
+    "@react-navigation/material-top-tabs": "^7.3.7",
+    "@react-navigation/native": "^7.1.17",
+    "@react-navigation/native-stack": "^7.3.26",
+    "@react-navigation/stack": "^7.4.8",
+    "@sentry/react-native": "~6.14.0",
+    "@shopify/flash-list": "1.7.6",
     "@tanstack/react-query": "latest",
     "@turf/turf": "^6.5.0",
     "axios": "^1.6.1",
     "better-react-native-image-viewing": "^0.2.7",
     "dotenv": "^16.3.1",
-    "expo": "^51.0.9",
-    "expo-asset": "~10.0.10",
-    "expo-av": "^14.0.7",
-    "expo-blur": "~13.0.3",
-    "expo-build-properties": "~0.12.5",
-    "expo-checkbox": "~3.0.0",
-    "expo-constants": "~16.0.2",
-    "expo-dev-client": "~4.0.26",
-    "expo-file-system": "~17.0.1",
-    "expo-font": "~12.0.10",
-    "expo-image": "~1.13.0",
-    "expo-image-picker": "~15.1.0",
-    "expo-location": "~17.0.1",
-    "expo-media-library": "~16.0.5",
-    "expo-notifications": "~0.28.19",
-    "expo-splash-screen": "~0.27.5",
-    "expo-sqlite": "^14.0.6",
-    "expo-status-bar": "~1.12.1",
-    "expo-task-manager": "~11.8.2",
-    "expo-updates": "~0.25.24",
+    "expo": "53.0.22",
+    "expo-asset": "~11.1.7",
+    "expo-av": "~15.1.7",
+    "expo-blur": "~14.1.5",
+    "expo-build-properties": "~0.14.8",
+    "expo-checkbox": "~4.1.4",
+    "expo-constants": "~17.1.7",
+    "expo-dev-client": "~5.2.4",
+    "expo-file-system": "~18.1.11",
+    "expo-font": "~13.3.2",
+    "expo-image": "~2.4.0",
+    "expo-image-picker": "~16.1.4",
+    "expo-location": "~18.1.6",
+    "expo-media-library": "~17.1.7",
+    "expo-notifications": "~0.31.4",
+    "expo-splash-screen": "~0.30.10",
+    "expo-sqlite": "~15.2.14",
+    "expo-status-bar": "~2.2.3",
+    "expo-task-manager": "~13.1.6",
+    "expo-updates": "~0.28.17",
     "formik": "^2.4.5",
     "moment": "^2.29.4",
     "patch-package": "^8.0.0",
     "promise": "^8.3.0",
-    "react": "18.2.0",
-    "react-native": "0.74.5",
+    "react": "19.0.0",
+    "react-native": "0.79.5",
     "react-native-actions-sheet": "^0.9.7",
     "react-native-animated-pagination-dot": "^0.4.0",
     "react-native-calendars": "1.1304.1",
     "react-native-color-matrix-image-filters": "^7.0.1",
     "react-native-device-detection": "^0.2.1",
     "react-native-document-picker": "^9.3.1",
+    "react-native-element-dropdown": "^2.12.4",
     "react-native-emoji-selector": "^0.2.0",
     "react-native-file-viewer": "^2.1.5",
-    "react-native-gesture-handler": "~2.16.1",
-    "react-native-get-random-values": "^1.11.0",
+    "react-native-gesture-handler": "~2.24.0",
+    "react-native-get-random-values": "~1.11.0",
     "react-native-gifted-chat": "~2.6.5",
     "react-native-google-places-autocomplete": "^2.5.7",
     "react-native-haptic-feedback": "^2.3.2",
@@ -74,37 +99,40 @@
     "react-native-keyboard-aware-scroll-view": "^0.9.5",
     "react-native-linear-gradient": "^2.8.3",
     "react-native-map-clustering": "^3.4.2",
-    "react-native-maps": "1.14.0",
-    "react-native-mmkv": "^2.11.0",
-    "react-native-modal": "^13.0.1",
-    "react-native-pager-view": "6.3.0",
+    "react-native-maps": "1.20.1",
+    "react-native-mmkv": "^3.3.0",
+    "react-native-modal": "^14.0.0-rc.1",
+    "react-native-pager-view": "6.7.1",
     "react-native-paper": "^5.12.3",
     "react-native-pell-rich-editor": "^1.10.0",
     "react-native-progress": "^5.0.1",
-    "react-native-reanimated": "~3.10.1",
+    "react-native-reanimated": "^3.19.1",
     "react-native-reanimated-carousel": "^3.5.1",
     "react-native-render-html": "^6.3.4",
-    "react-native-safe-area-context": "4.10.5",
-    "react-native-screens": "3.31.1",
+    "react-native-safe-area-context": "5.4.0",
+    "react-native-screens": "~4.11.1",
     "react-native-searchable-dropdown-kj": "^1.9.1",
-    "react-native-share": "^10.2.1",
-    "react-native-svg": "15.2.0",
-    "react-native-tab-view": "^3.5.2",
+    "react-native-share": "^12.2.0",
+    "react-native-svg": "15.11.2",
+    "react-native-tab-view": "^4.1.3",
     "react-native-url-polyfill": "^2.0.0",
-    "react-native-view-shot": "^3.7.0",
+    "react-native-view-shot": "4.0.3",
     "react-native-walkthrough-tooltip": "^1.6.0",
-    "react-native-webview": "13.8.6",
+    "react-native-webview": "13.13.5",
     "react-native-wheel-pick": "^1.2.2",
     "uuid": "^10.0.0",
     "yup": "^1.3.3",
     "zustand": "^4.4.7"
   },
   "devDependencies": {
-    "@babel/core": "^7.25.2",
-    "@types/react": "~18.2.14",
+    "@babel/core": "^7.26.0",
+    "@types/react": "~19.0.10",
     "prettier": "^3.1.0",
     "react-native-svg-transformer": "^1.5.0",
-    "typescript": "~5.3.3"
+    "typescript": "~5.8.3"
+  },
+  "overrides": {
+    "use-latest-callback": "0.2.4"
   },
   "private": true
 }

+ 1 - 1
src/modules/map/regionData.ts

@@ -1,4 +1,4 @@
-import { SQLiteDatabase } from 'expo-sqlite/legacy';
+import { SQLiteDatabase } from 'expo-sqlite';
 
 export const getData = async (
   db: SQLiteDatabase | null, 

+ 1 - 1
src/screens/InAppScreens/MapScreen/index.tsx

@@ -47,7 +47,7 @@ import {
   refreshDatabases
 } from 'src/db';
 import { fetchUserData, fetchUserDataDare, useGetListRegionsQuery } from '@api/regions';
-import { SQLiteDatabase } from 'expo-sqlite/legacy';
+import { SQLiteDatabase } from 'expo-sqlite';
 import { useFocusEffect } from '@react-navigation/native';
 import { useGetUniversalSearch } from '@api/search';
 import { fetchCountryUserData, useGetListCountriesQuery } from '@api/countries';

+ 1 - 1
src/screens/InAppScreens/TravelsScreen/utils/useRegionData.ts

@@ -3,7 +3,7 @@ import { useState, useEffect } from 'react';
 import { getFirstDatabase, getSecondDatabase, refreshDatabases } from 'src/db';
 import { getData } from 'src/modules/map/regionData';
 import { DbRegion } from './types';
-import { SQLiteDatabase } from 'expo-sqlite/legacy';
+import { SQLiteDatabase } from 'expo-sqlite';
 
 const useRegionData = (regionId: number, dare: boolean = false) => {
   const [regionData, setRegionData] = useState<DbRegion | null>(null);

+ 2 - 1
tsconfig.json

@@ -6,5 +6,6 @@
     "paths": {
       "@api/*": ["src/modules/api/*"]
     }
-  }
+  },
+  "include": ["src", "declarations.d.ts"]
 }