You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes file change watcher to work with git submodules
Summary:When using git submodules the path to the submodule parent is returned rather than the submodule itself and this broke the watcher in my project
For example: if we have `/Users/brent/monorepo` and `/Users/brent/monorepo/product-a`, when we run `jest --onlyChanged` it should search `/Users/brent/monorepo/product-a` but instead it would search `/Users/brent/monorepo/` because `/Users/brent/monorepo/.git/modules/product-a` is returned from `git rev-parse --git-dir` and `path.dirname` for that returns `/Users/brent/monorepo`
You can probably come up with a cleaner solution using some node or git apis that I'm not aware of, just throwing this out there as one possible fix.
Closesjestjs#832
Differential Revision: D3138457
fb-gh-sync-id: 136124a22acc1a921925c09c62d3f83648a27273
fbshipit-source-id: 136124a22acc1a921925c09c62d3f83648a27273
0 commit comments