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

Also listened to 'add' event for chokidar file watchers #162

Closed
wants to merge 1 commit into from
Closed

Also listened to 'add' event for chokidar file watchers #162

wants to merge 1 commit into from

Conversation

JoshuaKGoldberg
Copy link

@JoshuaKGoldberg JoshuaKGoldberg commented Oct 20, 2017

Moves the 'change' callback to a separate onAddOrChange that now is also passed to 'add'.

Fixes #161.

@JoshuaKGoldberg JoshuaKGoldberg changed the title Also listened to 'add' event for chokidar file watchers' Also listened to 'add' event for chokidar file watchers Oct 20, 2017
@JoshuaKGoldberg
Copy link
Author

Err. CI is complaining about lines I didn't modify...

index.js Outdated
})
.on('change', file => {
let recompile = []
const onAddOrChange = file => {
Copy link
Contributor

Choose a reason for hiding this comment

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

const onAddOrChange => const recompile

index.js Outdated
.on('change', file => {
let recompile = []
const onAddOrChange = file => {
let recompile = []
Copy link
Contributor

Choose a reason for hiding this comment

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

let recompiled => let changed

@michael-ciniawsky
Copy link
Contributor

Travis is definitely unrelated (something weird with prettier), this should be rumberstamp good to go

@RyanZim Does this require changes for depGraph aswell ?

@RyanZim
Copy link
Collaborator

RyanZim commented Oct 21, 2017

Ignore my previous deleted comment. Will fix prettier errors ASAP.

@RyanZim
Copy link
Collaborator

RyanZim commented Oct 21, 2017

Fixed, please rebase on master.

@JoshuaKGoldberg
Copy link
Author

JoshuaKGoldberg commented Oct 23, 2017

To be honest, I'm no longer using this tool, and development doesn't work on my OS (#164). I'm not going to have the time to investigate the single CI test failure. Hopefully this PR ends up being of some use to you!

(Edit: unsubscribed; ping me if you need anything!)

@michael-ciniawsky
Copy link
Contributor

michael-ciniawsky commented Oct 23, 2017

Could you nevertheless rebase, so this can be merged ? Are 'only' the current tests failing on windows or doesn't it work at all (normal CLI usage) ?

Moves the 'change' callback to a separate `recompile` that now is also passed to 'add'.
@JoshuaKGoldberg
Copy link
Author

On Windows, none of the tests work when I run npm run ci on master. On CI for this pull request, there's an introduced failure.

Out of curiosity, why the requirement to rebase? Do you not want PRs to squash commits?

@coveralls
Copy link

coveralls commented Oct 23, 2017

Coverage Status

Coverage increased (+0.03%) to 95.364% when pulling 1b28e28 on JoshuaKGoldberg:watch-new-files into e263060 on postcss:master.

Copy link
Contributor

@michael-ciniawsky michael-ciniawsky left a comment

Choose a reason for hiding this comment

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

@michael-ciniawsky
Copy link
Contributor

The watch test are definitely flaky

@RyanZim
Copy link
Collaborator

RyanZim commented Oct 23, 2017

The watch test are definitely flaky

Yeah, they drive me nuts. Gotta figure out something sometime.

@RyanZim
Copy link
Collaborator

RyanZim commented Oct 23, 2017

Out of curiosity, why the requirement to rebase? Do you not want PRs to squash commits?

@JoshuaKGoldberg I always squash commits; I just wanted to see the CI rerun with the prettier issue fixed.

NVM the failing watch tests; they are unpredictably flacky.

@RyanZim
Copy link
Collaborator

RyanZim commented Oct 23, 2017

Finally got the CI to pass after restarting it for the nth time. 😬 Gotta do some quick tests locally before I merge.

@RyanZim
Copy link
Collaborator

RyanZim commented Oct 23, 2017

This PR doesn't work for me; since we're passing the de-globbed file list into chokidar. It's possible to fix this, but I've got to move carefully to ensure I don't break my smart recompile logic.

@JoshuaKGoldberg
Copy link
Author

I've stopped using the tool and don't really have time for this PR. Best of luck! :)

@JoshuaKGoldberg JoshuaKGoldberg deleted the watch-new-files branch August 28, 2021 15:26
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.

None yet

4 participants