-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Support dynamically detecting changes when .gitignore is updated #6962
Support dynamically detecting changes when .gitignore is updated #6962
Conversation
d6b6e5f
to
5779d91
Compare
9b7f562
to
6242aaa
Compare
Codecov Report
@@ Coverage Diff @@
## master #6962 +/- ##
==========================================
- Coverage 67.99% 66.89% -1.11%
==========================================
Files 248 250 +2
Lines 9490 10437 +947
Branches 6 4 -2
==========================================
+ Hits 6453 6982 +529
- Misses 3035 3454 +419
+ Partials 2 1 -1
Continue to review full report at Codecov.
|
@sat0yu I still think I'd prefer just support the ignore files of the 2 VCS-es we support. See https://fishshell.com/docs/current/design.html (Configurability is the root of all evil). I can't really think of any cases where this config would be needed for other use cases? |
8790d0b
to
a9054a5
Compare
Yep, I'm with @SimenB on that. We support 2 VCS so we can "hardcode" their ignore files so it's transparent to the user. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Wonder if that affects performance anyhow. Also a test would be great to add. And a changleog :)
Would love to see a test, but the code lgtm :) |
@rickhanlonii, since you use this in RN |
@sat0yu could you update the changelog and resolve the conflict? |
let changeQueue = Promise.resolve(); | ||
let eventsQueue = []; | ||
// We only need to copy the entire haste map once on every "frame". | ||
let mustCopy = true; | ||
|
||
const createWatcher = root => { | ||
const watcher = new Watcher(root, { | ||
dot: false, | ||
glob: extensions.map(extension => '**/*.' + extension), | ||
dot: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this impact all dotfiles not just .gitignore and .hgignore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so because the line !suffixes.some(suffix => filePath.endsWith(suffix))
filters other dotfiles
…ly-detection-for-gitignore
@SimenB @thymikee @rickhanlonii thanks for your comments and sorry for the late response. This PR still has a few failures in the following 2 Test Suites.
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
jest (watchman) could not detect any changes in hidden files (e.g.
.gitignore
)Support dynamically detecting changes when .gitignore is updated #5730
this PR enables jest to do so for specified hidden files
Test plan
followed this scenario #5730 (comment)