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

fix: ignore dotfiles in watcher #1183

Merged
merged 7 commits into from
Jul 7, 2020
Merged

Conversation

SpaceK33z
Copy link
Contributor

@SpaceK33z SpaceK33z commented Jul 6, 2020

Without this fix, when files in folders like .git and .next change, the reflection is ran again by Chokidar. The previous way of ignoring dotfiles didn't work properly.

The way of ignoring dotfiles I use now is also what is mentioned in the Chokidar readme.

To reproduce this issue, clone https://github.com/SpaceK33z/graphql-nexus-watcher-issue . Start with yarn && yarn start and modify a random file in the repo. Stage the file with git (or alternatively: trigger a git fetch). You will now see e.g. ● nexus:dev:watcher restarting -- type: 'add' file: '.git/FETCH_HEAD'.

closes #731

Without this fix, when files in folders like `.git` and `.next` change, the reflection is ran again. The previous way of ignoring dotfiles didn't work properly.
@netlify
Copy link

netlify bot commented Jul 6, 2020

Deploy request for graphql-nexus pending review.

Review with commit f9040ba

https://app.netlify.com/sites/graphql-nexus/deploys

@jasonkuhrt

This comment has been minimized.

@SpaceK33z
Copy link
Contributor Author

@jasonkuhrt what do you mean? The tests seem to pass?

@jasonkuhrt

This comment has been minimized.

Copy link
Member

@jasonkuhrt jasonkuhrt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @SpaceK33z! Tests worked in the end!

@jasonkuhrt jasonkuhrt changed the title fix: Ignore dotfiles in watcher fix: ignore dotfiles in watcher Jul 7, 2020
@jasonkuhrt jasonkuhrt merged commit eb54c3c into prisma-labs:master Jul 7, 2020
@SpaceK33z SpaceK33z deleted the patch-1 branch July 8, 2020 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Blacklist .git/FETCH_HEAD in the watcher
2 participants