Skip to content

Conversation

@OnestarLee
Copy link
Collaborator

@OnestarLee OnestarLee commented Nov 12, 2025

External Contributions

This project is not yet set up to accept pull requests from external contributors.

If you have a pull request that you believe should be accepted, please contact
the Developer Relations team [email protected] with details
and we'll evaluate if we can setup a CLA to allow for the contribution.

For Internal Contributors

[CLNP-7734](https://sendbird.atlassian.net/browse/CLNP-7734)

Description Of Changes

Expo 54부터 expo-file-system의 api 가 변경되어 기존의 백워드 유지하면서 지원하도록 수정하였습니다

Types Of Changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply_

  • Bugfix
  • New feature
  • Documentation (correction or otherwise)
  • Cosmetics (whitespace, appearance (ex) Prettier)
  • Build configuration
  • Improvement (refactor code)
  • Test

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 0% with 33 lines in your changes missing coverage. Please review.
✅ Project coverage is 10.85%. Comparing base (32a3925) to head (1338aa7).

Files with missing lines Patch % Lines
.../uikit-react-native/src/utils/expoBackwardUtils.ts 0.00% 28 Missing ⚠️
...eact-native/src/platform/createFileService.expo.ts 0.00% 4 Missing ⚠️
...ct-native/src/platform/createMediaService.expo.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #273      +/-   ##
==========================================
- Coverage   10.88%   10.85%   -0.04%     
==========================================
  Files         360      360              
  Lines        9019     9047      +28     
  Branches     2421     2555     +134     
==========================================
  Hits          982      982              
+ Misses       8036     7989      -47     
- Partials        1       76      +75     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@OnestarLee OnestarLee changed the title feat: support expo-file-system in expo 54 or higher [CLNP-7734] feat: support expo-file-system in expo 54 or higher Nov 12, 2025
@OnestarLee OnestarLee requested review from bang9 and Copilot and removed request for bang9 November 12, 2025 01:51
Copilot finished reviewing on behalf of OnestarLee November 12, 2025 01:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for expo-file-system SDK 54+ while maintaining backward compatibility with the legacy API. The new SDK introduced breaking changes to the file system API, replacing async methods like getInfoAsync() with a new object-oriented approach using File and Directory classes.

  • Introduces type definitions for both legacy and new expo-file-system APIs
  • Implements utility functions to abstract API differences and detect which version is in use
  • Updates existing file operations to use the new backward-compatible utility functions

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
packages/uikit-react-native/src/utils/expoBackwardUtils.ts Adds type definitions for legacy and new expo-file-system APIs, implements detection logic and wrapper functions for file operations (getFileInfo, getDocumentDirectory, getCacheDirectory, downloadFile)
packages/uikit-react-native/src/platform/createMediaService.expo.tsx Updates image compression to use new getFileInfo utility function instead of direct fsModule.getInfoAsync call
packages/uikit-react-native/src/platform/createFileService.expo.ts Updates file download and record file path creation to use new utility functions for accessing directories and downloading files

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

compress: Math.min(Math.max(0, compressionRate), 1),
});
const fileInfo = await fsModule.getInfoAsync(uri);
const fileInfo = await expoBackwardUtils.fileSystem.getFileInfo(fsModule, uri);
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file info is being retrieved for the original uri instead of the compressedURI. This means the returned size will be incorrect - it will reflect the original file size rather than the compressed file size.

Suggested fix:

const fileInfo = await expoBackwardUtils.fileSystem.getFileInfo(fsModule, compressedURI);
Suggested change
const fileInfo = await expoBackwardUtils.fileSystem.getFileInfo(fsModule, uri);
const fileInfo = await expoBackwardUtils.fileSystem.getFileInfo(fsModule, compressedURI);

Copilot uses AI. Check for mistakes.
Copy link
Collaborator

@bang9 bang9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@OnestarLee OnestarLee added this pull request to the merge queue Nov 13, 2025
Merged via the queue into main with commit fc8b5a1 Nov 13, 2025
13 checks passed
@OnestarLee OnestarLee deleted the feat/support-expo-54-file-system branch November 13, 2025 01:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants