* 'master' of github.com:remy/nodemon:
fix: postinstall hide message in CI
chore: change test targets (#1788)
chore: Switch from JSCS to ESLint
fix: ignore ./<path> on cwd (#1787)
fix: runOnChangeOnly=true
Fixes: #1784
This fixes the watch/ignore rules where the config is ignoring
the relative local path of ./ - this fix was in place for the
positive (watch) test but not patched for the negative (ignore).
* fix: package.main with -- arguments
Fixes#1758
The combination of using a package.main (which sets the script
position to index zero) and using the -- stop slurp meant that
the arguments had the script appended to the end instead of
prepended to the start. The net result meant that when the script
was forked, it would drop the first user arg.
See diff for details of the fix - a simple check against null.
* fix: protect against missing opts
I suspect, though not 100% sure, that this test fails because it was
being required and when so, chokidar is already watching and thus fires
before the config is loaded.
Fixes#1638
This also simplifies the shutdown process by sending the kill signal to
the sub-process - thus ensuring we don't get the weird "User defined
singal" from the shell.
This commit also includes a test to ensure this doesn't happen again.
Fixes#1633
Multiple parts but all localised to run.js:
- Refactor the kill logic to be simpler
- Consistently use pstree to determine sub process list
- Pipe stderr through nodemon to squash `sh -c` error warning
Bug was caused by waiting on multiple sub processes and if they all
ended the logic would only subtract one from the count list (rather
than the total number).
I've refactored the code so that it doesn't use the `kill -0 <pid>` as
this was a little confusing to read (it's effectively a no op) and
switched to using pstree to test if any sub processes are still running.
The logic for killing the processes has also been refactored to
simplify. Before it would fork the logic based on whether `ps` existed
on the system.
Now it uses the same logic with the exception of the kill signal sent -
when `ps` isn't on the system, we have to send numeric signals (I can't
remember how I found that out, but I do remember it was a painful
process!).
The last part required due to a side effect of the refactor on kill:
when a kill signial is sent to `sh -c` the shell prints a warning.
Details on how to replicate: https://git.io/Je6d0
To squash this, I track if the process is about to be killed (by
flagging the sub process right before the kill function call) and if
there's an error whilst shutdown is in effect, the error is only printed
to nodemon's detailed output (using nodemon -V).
* refs/remotes/origin/master:
fix: to avoid confusion like in #1528, always report used extension
fix: langauge around "watching" (#1591)
docs: README Grammar (#1601)
`ts-node` is the standard for running typescript node programs on development mode.
Adding this line will enable everyone with a `tsconfig.json` to have a full-refresh server watching experience. (: