Skip to content

[pull] main from expo:main#825

Merged
pull[bot] merged 1 commit intocode:mainfrom
expo:main
May 2, 2026
Merged

[pull] main from expo:main#825
pull[bot] merged 1 commit intocode:mainfrom
expo:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented May 2, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

# Why

`expo-file-system` had no way to reactively observe file or directory
changes. This adds a `watch()` method to `File` and `Directory` that
lets developers subscribe to filesystem events without polling.

# How

- Added a `FileSystemWatcher` native shared object on iOS (using
`DispatchSource`) and Android (using `FileObserver`) that emits `change`
events with debouncing.
- Exposed a JS `FileSystemWatcher` class that wraps the native object,
maps raw events to typed `WatchEvent<T>` objects, and auto-stops on
`deleted`/`renamed` of the watched target.
- Added `.watch()` convenience methods on `File` and `Directory` that
return a `WatchSubscription` (with `remove()`).

# Test Plan

- Test Suite tests
- NCL section
- TS-side unit tests

# Checklist

- [x] I added a `changelog.md` entry and rebuilt the package sources
according to [this short
guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).
- [x] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
@pull pull Bot locked and limited conversation to collaborators May 2, 2026
@pull pull Bot added the ⤵️ pull label May 2, 2026
@pull pull Bot merged commit 1976cf3 into code:main May 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant