Fixes#1317
Originally a new Set was generated upon every individual file (or dir)
watched. This typically doesn't take a long time, but if there's 10,000
files to watch, it's very, very slow. Moving this logic out to the ready
event instead, cuts all the processing time of the watch right down.
* chore: bump chokidar to latest
* test: fix weird output on restart filename
* test: skip old broken test
* fix: node_modules watched off relative path
Fixes#1294Fixes#1305 (though couldn't confirm - just looks very similar)
I've gone back and forth on this Chokidar option `cwd` and in this fix
I've removed it from the config. I've checked the issues that were
raised that caused me to add the option, and they still appear to pass
in the tests, so I believe it's okay.
However, it _might_ come back in - just a note for Future @remy.
This change takes code from npm's cli to change the way the arguments
passed to nodemon are interpreted.
Removes path.normalize and replaces with windowsVerbatimArguments
Fixes#1236
Previous the rules weren't matching fully inside of chokidar, requiring
that, for instance, node_modules is written as **/node_modules/**.
I've also tidied up what's printed in verbose mode, so it doesn't print
default ignores, and doesn't print the full path of an ignored
directory.
This change _also_ fixes notifications from chokidar from user ignored
paths (using the `cwd` argument). This should fix#1202
Changed to passing Chokidar simple strings instead of custom regexp, only had to prefix with **/ to get it to match the ignore directories properly.
Fixes#916
Originally used ps-tree which relied on `ps` on *nix. But if the system
didn't have `ps` at all, we'd try to kill the child process, but alas
this would not always work, as we're spawning `sh` and _then_ node, so
the kill would only kill the `sh` process, and not the running node
process.
The new @remy/pstree lib sniffs for `ps` and defers to ps-tree,
otherwise it will walk /proc and map the PPID to the child process
allowing nodemon to fully clean up.
Fixes the issue where express is a js based project, but the executable
is `www`, so it misses on the match. So now nodemon will watch for
matching extensions but *also* the script the user gave.
Fixes#461
Note that this can't handle the situation where npm is used to run `node
./bin/www` as nodemon can't split out a package script command.
* fix: pass through execArgs from config
Also updating some deps and linting tweaks
* chore: add message on postinstall
Lost funds from gratipay and codesponsor 😢
Fixes a range of issues, including:
Fixes#1115
* refactor: use Object.assign in place of merge (this will leak to more work)
Since we're now supporting 6 upwards
I'm using nodemon in a docker container with a restart policy configured to restart the container in case it crashes. If the app crashes, nodemon exits with code 0 and docker assumes it was a graceful exit, so it does not restart my container. I don't see the harm in changing the exit code here to reflect an unexpected termination, given that this path is only exercised in the event of a crash.
- If the user configured a *nix compatible npm script where the path contained a forward slash, that failed under windows, since cmd.exe treated that as a command line argument.
- The quote handling was not 100% correct under windows, the whole path needs to be quoted, not just the segments it is also modified.
* fix: non-utf8 stdin processing
Fixes#890
Ref https://github.com/FormidableLabs/webpack-dashboard/issues/16
The library blessed inside of the webpack-dashboard does some funky stuff with std streams and the expectation of the encoding. I'm not 100% sure of this change, I've got to see all the tests, but this tweak moves to inherit the child's stdin and doesn't purposely encode the stdin stream as utf8 (which, I don't recall exactly why I did this in the first place…though I'm fairly sure it was another issue somewhere else in nodemon).
* fix: use stdin:inherit when we're not forked
* fix: don't use inherit when required
* style: lint
* style: I am going to 🐎 kick the lint in the 🌰