From 6f74fd4206903d6fa03dae6e29809a9c69fe6435 Mon Sep 17 00:00:00 2001 From: pr-daaif Date: Sun, 2 Aug 2026 13:12:44 +0100 Subject: [PATCH] =?UTF-8?q?fix(mobile):=20expo-file-system=20deleteAsync?= =?UTF-8?q?=20=E2=80=94=20import=20legacy=20subpath?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SDK 57 deprecates the module-level functions (deleteAsync included) in favor of the File/Directory classes, and now throws at runtime in dev instead of just warning — surfaced as a red-box crash on the Assistant screen right after transcription (found in recette, 02/08). The dictée purge in cloture.tsx uses the exact same call and was silently affected too. Fix: import from 'expo-file-system/legacy' in both — same function signature, no behavior change, just the non-deprecated entry point. Co-Authored-By: Claude Sonnet 5 --- apps/mobile/app/assistant/index.tsx | 5 ++++- apps/mobile/app/ot/[id]/cloture.tsx | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/mobile/app/assistant/index.tsx b/apps/mobile/app/assistant/index.tsx index 00d572b..5f2787c 100644 --- a/apps/mobile/app/assistant/index.tsx +++ b/apps/mobile/app/assistant/index.tsx @@ -1,4 +1,7 @@ -import * as FileSystem from 'expo-file-system'; +// SDK 57 : les fonctions module-level (dont deleteAsync) sont dépréciées au +// profit des classes File/Directory et lèvent désormais en développement — +// import explicite du sous-chemin legacy, comportement inchangé sinon. +import * as FileSystem from 'expo-file-system/legacy'; import { router } from 'expo-router'; import { useRef, useState } from 'react'; import { Pressable, ScrollView, Text, TextInput, View } from 'react-native'; diff --git a/apps/mobile/app/ot/[id]/cloture.tsx b/apps/mobile/app/ot/[id]/cloture.tsx index d808638..d3f08a7 100644 --- a/apps/mobile/app/ot/[id]/cloture.tsx +++ b/apps/mobile/app/ot/[id]/cloture.tsx @@ -1,4 +1,7 @@ -import * as FileSystem from 'expo-file-system'; +// SDK 57 : les fonctions module-level (dont deleteAsync) sont dépréciées au +// profit des classes File/Directory et lèvent désormais en développement — +// import explicite du sous-chemin legacy, comportement inchangé sinon. +import * as FileSystem from 'expo-file-system/legacy'; import { router, useLocalSearchParams } from 'expo-router'; import { useState } from 'react'; import { Pressable, ScrollView, Text, TextInput, View } from 'react-native';