Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FSEventsWatcher: use common recReadDir #1409

Closed
wants to merge 2 commits into from
Closed

Conversation

robhogan
Copy link
Contributor

Summary:
FSEventsWatcher has its own implementation of recReaddir which is almost identical to the one in ./common.js, except that it wraps handlers in path.normalize.

There’s only one handler, so we can trivially remove this proxy abstraction and reuse the common recReaddir.

(The end goal here is to slim down and tidy up FSEventsWatcher ahead of using it as a basis for native recursive watching)

Changelog: Internal

Differential Revision: D67286092

Summary:
Minor Flow type refinement - I originally typed this as `?(boolean | RegExp)` when conservatively adding types to untyped JS. In fact we only ever pass `?RegExp`, so we can tidy up a bit.

Changelog: Internal

Differential Revision: D67285745
Summary:
`FSEventsWatcher` has its own implementation of `recReaddir` which is almost identical to the one in `./common.js`, except that it wraps handlers in `path.normalize`.

There’s only one handler, so we can trivially remove this proxy abstraction and reuse the common `recReaddir`.

(The end goal here is to slim down and tidy up FSEventsWatcher ahead of using it as a basis for native recursive watching)

Changelog: Internal

Differential Revision: D67286092
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 16, 2024
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 6d2ccbf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants