Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/build-ios-llm-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ jobs:
with:
path: apps/llm/ios
key: ${{ runner.os }}-expo-ios-${{ hashFiles('apps/llm/app.json', 'apps/llm/package.json') }}
restore-keys: |
${{ runner.os }}-expo-ios-
- name: Generate native iOS project
working-directory: apps/llm
run: |
Expand Down
40 changes: 19 additions & 21 deletions apps/computer-vision/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,38 +10,36 @@
"typecheck": "tsc",
"lint": "eslint . --ext .ts,.tsx --fix"
},
"peerDependencies": {
"react-native": "*"
},
"dependencies": {
"@react-native/metro-config": "^0.76.3",
"@react-navigation/drawer": "^7.4.1",
"@react-navigation/native": "^7.1.10",
"@shopify/react-native-skia": "v2.0.0-next.2",
"expo": "^53.0.0",
"expo-constants": "~17.1.6",
"expo-font": "~13.3.1",
"expo-linking": "~7.1.5",
"expo-router": "~5.0.7",
"expo-status-bar": "~2.2.3",
"@react-navigation/drawer": "^7.3.9",
"@react-navigation/native": "^7.1.6",
"@shopify/react-native-skia": "2.2.12",
"expo": "^54.0.27",
"expo-constants": "~18.0.11",
"expo-font": "~14.0.10",
"expo-linking": "~8.0.10",
"expo-router": "~6.0.17",
"expo-status-bar": "~3.0.9",
"metro-config": "^0.81.0",
"react": "19.0.0",
"react-native": "0.79.2",
"react": "19.1.0",
"react-native": "0.81.5",
"react-native-device-info": "^14.0.4",
"react-native-executorch": "workspace:*",
"react-native-gesture-handler": "~2.24.0",
"react-native-gesture-handler": "~2.28.0",
"react-native-image-picker": "^7.2.2",
"react-native-loading-spinner-overlay": "^3.0.1",
"react-native-reanimated": "~3.17.4",
"react-native-safe-area-context": "5.4.0",
"react-native-screens": "~4.11.1",
"react-native-svg": "15.11.2",
"react-native-svg-transformer": "^1.5.0"
"react-native-reanimated": "~4.1.1",
"react-native-safe-area-context": "~5.6.0",
"react-native-screens": "~4.16.0",
"react-native-svg": "15.12.1",
"react-native-svg-transformer": "^1.5.0",
"react-native-worklets": "0.5.1"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@types/pngjs": "^6.0.5",
"@types/react": "~19.0.10"
"@types/react": "~19.1.10"
},
"private": true
}
42 changes: 20 additions & 22 deletions apps/llm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,37 @@
"typecheck": "tsc",
"lint": "eslint . --ext .ts,.tsx --fix"
},
"peerDependencies": {
"react-native": "*"
},
"dependencies": {
"@react-native/metro-config": "^0.76.3",
"@react-navigation/drawer": "^7.4.1",
"@react-navigation/native": "^7.1.10",
"expo": "~53.0.8",
"expo-brightness": "~13.1.4",
"expo-calendar": "~14.1.4",
"expo-constants": "~17.1.6",
"expo-font": "~13.3.1",
"expo-linking": "~7.1.5",
"expo-router": "~5.0.7",
"expo-status-bar": "~2.2.3",
"@react-navigation/drawer": "^7.3.9",
"@react-navigation/native": "^7.1.6",
"expo": "^54.0.27",
"expo-brightness": "~14.0.8",
"expo-calendar": "~15.0.8",
"expo-constants": "~18.0.11",
"expo-font": "~14.0.10",
"expo-linking": "~8.0.10",
"expo-router": "~6.0.17",
"expo-status-bar": "~3.0.9",
"metro-config": "^0.81.0",
"react": "19.0.0",
"react-native": "0.79.2",
"react": "19.1.0",
"react-native": "0.81.5",
"react-native-audio-api": "^0.8.2",
"react-native-device-info": "^14.0.4",
"react-native-executorch": "workspace:*",
"react-native-gesture-handler": "~2.24.0",
"react-native-gesture-handler": "~2.28.0",
"react-native-loading-spinner-overlay": "^3.0.1",
"react-native-markdown-display": "^7.0.2",
"react-native-reanimated": "~3.17.4",
"react-native-safe-area-context": "5.4.0",
"react-native-screens": "~4.11.1",
"react-native-svg": "15.11.2",
"react-native-svg-transformer": "^1.5.0"
"react-native-reanimated": "~4.1.1",
"react-native-safe-area-context": "~5.6.0",
"react-native-screens": "~4.16.0",
"react-native-svg": "15.12.1",
"react-native-svg-transformer": "^1.5.0",
"react-native-worklets": "0.5.1"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@types/react": "~19.0.10"
"@types/react": "~19.1.10"
},
"private": true
}
24 changes: 11 additions & 13 deletions apps/speech-to-text/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,27 @@
"typecheck": "tsc",
"lint": "eslint . --ext .ts,.tsx --fix"
},
"peerDependencies": {
"react-native": "*"
},
"dependencies": {
"@react-native/metro-config": "^0.76.3",
"buffer": "^6.0.3",
"expo": "^53.0.0",
"expo-font": "~13.3.1",
"expo-status-bar": "~2.2.3",
"expo": "^54.0.27",
"expo-font": "~14.0.10",
"expo-status-bar": "~3.0.9",
"metro-config": "^0.81.0",
"react": "19.0.0",
"react-native": "0.79.2",
"react": "19.1.0",
"react-native": "0.81.5",
"react-native-audio-api": "0.6.5",
"react-native-device-info": "^14.0.4",
"react-native-executorch": "workspace:*",
"react-native-reanimated": "~3.17.4",
"react-native-safe-area-context": "5.4.0",
"react-native-svg": "15.11.2",
"react-native-svg-transformer": "^1.5.0"
"react-native-reanimated": "~4.1.1",
"react-native-safe-area-context": "~5.6.0",
"react-native-svg": "15.12.1",
"react-native-svg-transformer": "^1.5.0",
"react-native-worklets": "0.5.1"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@types/react": "~19.0.10"
"@types/react": "~19.1.10"
},
"private": true
}
2 changes: 1 addition & 1 deletion apps/speech-to-text/screens/SpeechToTextScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
AudioRecorder,
AudioContext,
} from 'react-native-audio-api';
import * as FileSystem from 'expo-file-system';
import * as FileSystem from 'expo-file-system/legacy';
import SWMIcon from '../assets/swm_icon.svg';
import DeviceInfo from 'react-native-device-info';

Expand Down
32 changes: 16 additions & 16 deletions apps/text-embeddings/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,29 @@
"lint": "eslint . --ext .ts,.tsx --fix"
},
"peerDependencies": {
"@react-navigation/native": "*",
"react-native": "*"
"@react-navigation/native": "*"
},
"dependencies": {
"@react-navigation/drawer": "^7.4.2",
"expo": "^53.0.0",
"expo-constants": "~17.1.6",
"expo-linking": "~7.1.5",
"expo-router": "~5.1.0",
"expo-status-bar": "~2.2.3",
"react": "19.0.0",
"react-native": "0.79.2",
"@react-navigation/drawer": "^7.3.9",
"expo": "^54.0.27",
"expo-constants": "~18.0.11",
"expo-linking": "~8.0.10",
"expo-router": "~6.0.17",
"expo-status-bar": "~3.0.9",
"react": "19.1.0",
"react-native": "0.81.5",
"react-native-executorch": "workspace:*",
"react-native-gesture-handler": "~2.24.0",
"react-native-gesture-handler": "~2.28.0",
"react-native-image-picker": "^7.2.2",
"react-native-reanimated": "~3.17.4",
"react-native-safe-area-context": "5.4.0",
"react-native-screens": "~4.11.1",
"react-native-svg": "15.11.2"
"react-native-reanimated": "~4.1.1",
"react-native-safe-area-context": "~5.6.0",
"react-native-screens": "~4.16.0",
"react-native-svg": "15.12.1",
"react-native-worklets": "0.5.1"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@types/react": "~19.0.10"
"@types/react": "~19.1.10"
},
"private": true
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
"eslint-plugin-prettier": "^5.0.1",
"prettier": "^3.3.3",
"prettier-plugin-jsdoc": "^1.3.0",
"typescript": "~5.8.3"
"typescript": "~5.9.2"
}
}
20 changes: 10 additions & 10 deletions packages/react-native-executorch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,25 +65,25 @@
"registry": "https://registry.npmjs.org/"
},
"peerDependencies": {
"expo": "*",
"expo-asset": "*",
"expo-file-system": "*",
"expo": ">=54.0.0",
"expo-asset": "^12.0.0",
"expo-file-system": "^19.0.0",
"react": "*",
"react-native": "*"
},
"devDependencies": {
"@react-native-community/cli": "latest",
"@types/jest": "^29.5.5",
"@types/react": "^18.2.44",
"expo": "^53.0.7",
"expo-asset": "~11.1.5",
"expo-file-system": "~18.1.10",
"@types/react": "~19.1.10",
"expo": "^54.0.0",
"expo-asset": "12.0.11",
"expo-file-system": "^19.0.20",
"jest": "^29.7.0",
"metro-react-native-babel-preset": "^0.77.0",
"react": "19.0.0",
"react-native": "0.79.2",
"react": "19.1.0",
"react-native": "0.81.5",
"react-native-builder-bob": "^0.40.12",
"typescript": "~5.8.3"
"typescript": "~5.9.2"
},
"resolutions": {
"@types/react": "^18.2.44"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { importLegacyExpoFSModules } from '../utils/ResourceFetcher';

const { documentDirectory } = importLegacyExpoFSModules();
import { documentDirectory } from 'expo-file-system/legacy';

export const RNEDirectory = `${documentDirectory}react-native-executorch/`;
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { ResourceSource } from '../types/common';
import {
importLegacyExpoFSModules,
ResourceFetcher,
} from '../utils/ResourceFetcher';
import { ResourceFetcher } from '../utils/ResourceFetcher';
import { ETError, getError } from '../Error';
import { Template } from '@huggingface/jinja';
import { DEFAULT_CHAT_CONFIG } from '../constants/llmDefaults';
Expand All @@ -16,7 +13,7 @@ import {
} from '../types/llm';
import { parseToolCall } from '../utils/llm';
import { Logger } from '../common/Logger';
const { readAsStringAsync } = importLegacyExpoFSModules();
import { readAsStringAsync } from 'expo-file-system/legacy';

export class LLMController {
private nativeModule: any;
Expand Down
24 changes: 2 additions & 22 deletions packages/react-native-executorch/src/utils/ResourceFetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,8 @@
* - Implements linked list behavior via the `.next` attribute
* - Automatically processes subsequent downloads when `.next` contains a valid resource
*/
import type * as FileSystemTypes from 'expo-file-system';

export function importLegacyExpoFSModules() {
let FileSystem: typeof FileSystemTypes;

try {
const expoPkg = require('expo/package.json');
const sdkVersion = expoPkg.version.split('.')[0];

if (Number(sdkVersion) > 53) {
FileSystem = require('expo-file-system/legacy');
} else {
FileSystem = require('expo-file-system');
}
} catch (e) {
throw new Error('Expo must be installed to use react-native-executorch');
}
return FileSystem;
}

const {
import {
cacheDirectory,
copyAsync,
createDownloadResumable,
Expand All @@ -57,8 +38,7 @@ const {
EncodingType,
deleteAsync,
readDirectoryAsync,
} = importLegacyExpoFSModules();

} from 'expo-file-system/legacy';
import { Asset } from 'expo-asset';
import { Platform } from 'react-native';
import { RNEDirectory } from '../constants/directories';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import type * as FileSystemTypes from 'expo-file-system';
import { RNEDirectory } from '../constants/directories';
import { ResourceSource } from '../types/common';
import { Asset } from 'expo-asset';
import { Logger } from '../common/Logger';
import { importLegacyExpoFSModules } from './ResourceFetcher';

/**
* @internal
*/
const { getInfoAsync, makeDirectoryAsync } = importLegacyExpoFSModules();
import {
getInfoAsync,
makeDirectoryAsync,
type DownloadResumable,
} from 'expo-file-system/legacy';

export const enum HTTP_CODE {
OK = 200,
Expand Down Expand Up @@ -40,7 +42,7 @@ export interface ResourceSourceExtended {
}

export interface DownloadResource {
downloadResumable: FileSystemTypes.DownloadResumable;
downloadResumable: DownloadResumable;
status: DownloadStatus;
extendedInfo: ResourceSourceExtended;
}
Expand Down
Loading
Loading