-
Notifications
You must be signed in to change notification settings - Fork 636
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't apply file extensions filter to symlink change events
Summary: Currently, `metro-file-map`'s onChange handler filters out non-directory events whose extensions don't match the configured set of watched file extensions (or really, suffices). We don't want this - symlinks may point to files, directories, or nothing, and this may change over time without modification to the symlink itself. We need to retain them *unless* the canonical path of the symlink itself is ignored by `ignorePattern` (eg, the symlink is under `.git`)`. This diff shifts things around so that `onChange` ignores early for - a) any directory event, - b) known-regular files with an unlisted extension, - c) any path matching `ignorePattern`. `delete` events may not have metadata, so we can't ignore them based on a) or b). Instead, we ignore deletion events for files not present in the file map. Changelog: [Internal] *(No observable change unless using experimental config)* Reviewed By: motiz88 Differential Revision: D43214089 fbshipit-source-id: e2c4e4e47cee1e3dbe7292d83a4c16af84e21b06
- Loading branch information
1 parent
2ca7548
commit a0ba994
Showing
2 changed files
with
131 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters