Commit Graph

70 Commits

Author SHA1 Message Date
Remy Sharp
d5c4d1c594 Revert package version away from RC to 1.0.16
Conflicts:
	package.json
2014-03-20 12:14:13 +00:00
Remy Sharp
690c564a80 Fixed #303, #304 and #311.
We don't use pipe by default for stdio spawn, we look at how nodemon is being used, the either decide to use pipe or process.stdout/err. Then depending on whether nodemon is required, we then attach to the different stdout/err streams as required.
2014-03-20 12:08:48 +00:00
Remy Sharp
b1e4111626 If a rule matches, only say it once. 2014-03-19 15:48:48 +00:00
Remy Sharp
641eb96cf5 -w <single file> ignores extension filter
Fixes #299 and fixes #308.

This means if you use nodemon to monitor a .js script, but explicitly watch another file (that isn't .js) then nodemon *will* restart as expected.
2014-03-19 15:33:35 +00:00
Remy Sharp
a9f8dd97ec Work on #304 and #304 to read the stdout *stream*
Changed it from using `.on('data')` to using a PassThrough stream which does the job much better, but the readline demos don't work when they're doing anything special on stdout, like `.cursorTo`. WIP.
2014-03-19 14:27:03 +00:00
Remy Sharp
85feec55d4 Merge pull request #307 from remy/fix/273
Fixed #273
2014-03-11 16:39:34 +00:00
Remy Sharp
9fb11fa7f0 Support for -w 'lib/**/foo.js' to match 'lib' 2014-03-11 15:31:00 +00:00
Remy Sharp
360a16c5dd Put the find narrow method back in
In favour of attempting to find the basedir the pattern sits on, but only try when the path looks like a pattern, otherwise it's more likely to be an incorrect directory.
2014-03-11 15:16:32 +00:00
Remy Sharp
5664e575bd Removed config.dirs.push to default to all 2014-03-11 14:47:04 +00:00
Amber Dixon
04d368b9a9 Make the ignore flag work on Mac, where the "find" option is used for file watching. 2014-02-18 20:41:20 +00:00
Remy Sharp
400f5bc69b Fixed #281. Can now watch with . and .* 2014-01-27 16:12:54 +00:00
Remy Sharp
2a2f1260e4 If no script, default is null, not -1. Fixes #265
Includes test and exposing the command run for debugging.
2014-01-21 07:57:27 +00:00
Remy Sharp
1b8075586c Warn to mac users when they're watching 25,000+ files 2014-01-17 23:38:48 +00:00
Remy Sharp
34cb3a10fb Fixed #268 relative paths on watches now work 2014-01-17 22:37:23 +00:00
Remy Sharp
ea5e925716 Patch to fix directory/* being ignored in ignore rule 2014-01-17 17:54:36 +00:00
Remy Sharp
fd0f9eb297 Allow ignore or watch to be strings. Not great, but useful. 2014-01-17 17:54:36 +00:00
Remy Sharp
b9b1cd5499 Moved watch+ignore conversion to match library 2014-01-16 23:45:50 +00:00
Remy Sharp
f636bc16f5 execMap uses script ext to lookup. Fixes #265
+ tests
2014-01-16 22:52:39 +00:00
Remy Sharp
483e70283e Pass non-nodemon args *in order* to exec. Fixes #263 2014-01-15 14:11:56 +00:00
Remy Sharp
bfc4ac1c4d Required nodemon accepts env to pass to spawned process
See https://github.com/ChrisWren/grunt-nodemon/pull/29 for example/request
2014-01-15 14:07:36 +00:00
Remy Sharp
9b3b5099c7 If nodemon is required, respect SIGINT, and fricking quit already! 2014-01-09 13:10:07 +00:00
Remy Sharp
df6219c897 Making nodemon options consistent with CLI args 2014-01-09 12:41:30 +00:00
Remy Sharp
85b6349522 Fixed #260 by using watchFile.
Should also close #74 as it's a similar problem. Also clarified the system
flags.
2014-01-07 15:32:52 -08:00
Remy Sharp
1d7de9c31f Passes tests again 2014-01-07 22:57:13 +00:00
Remy Sharp
968fee4ed0 Attempt to use fs.watchFile when in legacy 2014-01-07 22:56:30 +00:00
Remy Sharp
d922b49a45 Allow the watch test to fire *very* late. Working on #260 2014-01-07 22:42:02 +00:00
Remy Sharp
3c3b540df6 Moving Mac back to find.
We're purposely putting Mac over to the `find` command. This is because it has a default ulimit of 256 - which is WAY LOW, and without asking the user to `unlimit -n <BIG-ASS-NUMBER>` it'll throw up all over your screen like this: http://d.pr/i/R6B8+
2014-01-06 17:22:40 +00:00
Remy Sharp
589dffcc42 Watch lib/*.* ignores the extension check. Closes #255 2014-01-06 15:34:43 +00:00
Remy Sharp
9d138df520 lint fix 2014-01-06 15:25:52 +00:00
Remy Sharp
a9212e748e Fixed #252. The timeout was too quick for fs.watch
I also have disabled the default assumption that watch won't work on mac (though I reserve the right to switch back!).
2014-01-06 15:07:09 +00:00
Remy Sharp
c78bcb9faa Documentation of required nodemon 2014-01-05 22:59:23 +00:00
Remy Sharp
1cf51d81fb unpipe added after 0.8 2014-01-05 18:41:25 +00:00
Remy Sharp
3c02191cb1 Removed the setTimeout nonsense, and manually close child.stdin 2014-01-05 18:29:18 +00:00
Remy Sharp
e40240e045 Fix failing test, move setTimeout to around restart point 2014-01-05 18:07:47 +00:00
Remy Sharp
3ec394be2a Unpipe stdin from child before restarting. Fixes #235
Note that I have to use setTimeout (I tried process.nextTick but it was still too soon) to delay between disconnecting the stdin pipe and actually restarting the child.

I've tested this with a simple script that echos stdin, and used the "rs" restart command over and over and it avoids the two EPIPE and ECONNRESET errors. I'm not sure I can easily create automated tests for this, but I'll try at a later date...maybe.
2014-01-05 17:48:42 +00:00
Remy Sharp
05671321b1 Don't connect the STDIN to the child process, prevents crash.
But currently unsure of the impact of the change. I need to create a test that will try to read from STDIN.
2014-01-05 17:48:42 +00:00
Remy Sharp
a610aa3436 Better specificity in match process 2014-01-05 15:00:15 +00:00
Remy Sharp
ab549a1e85 All tests passing (damn race conditions) 2014-01-05 10:16:39 +00:00
Remy Sharp
13770da9f3 Fixed nodemon.once. Add config.run. Tests not 100% passing
Something weird is happening with required nodemon and re-running lots of times, that somehow resets the config. I know it's due to my tests, but I'm unsure which one is actually causing the damn issue. Anyway, bed for me, it's almost 2am. Sod this for a game of cricket.
2014-01-05 01:42:37 +00:00
Remy Sharp
08c758f884 Rule matching tested and passing 2014-01-05 00:45:38 +00:00
Remy Sharp
8eef00b334 Add new tests for match code and updated for monitor format. 2014-01-05 00:44:56 +00:00
Remy Sharp
7959c5bf00 Refactor watch & ignore logic in favour of monitor
Now using minimatch to match globs to files that have changed. Logic orders the rules in order of specificity (i.e. deeper paths have higher specificity) and the file runs through the rules.
2014-01-03 18:27:24 +00:00
Remy Sharp
f3e76157d2 Tweaking how watching works
Fixed nodemon to echo out what's being watched in the regexp instead of the config.dir path.

Also allowing patterns on the "watch" config setting, rather than just paths.

Removed useless test (that kept failing...incorrectly).
2014-01-03 14:20:46 +00:00
Remy Sharp
e92d29316f Fixed default ignore rule overriding all 2014-01-02 18:17:26 +00:00
Remy Sharp
f53173cdf2 typo 2013-12-31 14:32:02 +00:00
Remy Sharp
ab464021df 78 tests passing on mac. 2013-12-29 20:26:28 +00:00
Remy Sharp
86d32281ce Passing all tests on linux 2013-12-14 20:20:27 +00:00
Remy Sharp
5c7af6bfc4 More tests. 79% code coverage + more docs
- Events documented
- Require working nicely
- If nodemon is required, nodemon message are emitted rather than console.log'ged
2013-12-14 00:57:41 +00:00
Remy Sharp
ad0eba36aa Required nodemon, upon quit, correctly unwatches files 2013-12-12 11:44:59 +00:00
Remy Sharp
4f5593d439 Fix nodemon.config.required flag, and expose config
For when nodemon is required in to projects like grunt.
2013-12-11 16:17:26 +00:00