36 Commits

Author SHA1 Message Date
Emily Marigold Klassen
2973afbd26 fix: Quote zero-length strings in arguments (#1551)
If a zero-length string is passed, it does not get properly quoted, and then it is not properly passed to the child process
2019-05-01 08:04:25 +01:00
Remy Sharp
97f8d0a175 fix: node_modules watched off relative path (#1328)
* 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 #1294
Fixes #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.
2018-05-05 20:17:21 +01:00
Remy Sharp
aa18c806b3 fix: don't throw when required in the repl
Fixes #1292
2018-03-31 08:40:08 +01:00
Remy Sharp
f4391d4ff1 fix: make clear where more opts are in help (#1271) 2018-02-27 16:42:20 +00:00
Remy Sharp
e90f15aa8a fix: node < 6.4.0 causing crash on 'rs' trigger
* fix: node < 6.4.0 can't connect to stdin
* fix: child stdio when spawn is similar to fork

Fixes #1218
2018-01-09 13:18:08 +00:00
Remy Sharp
6a4fb22602 fix: pass through execArgs from config (#1142)
* fix: pass through execArgs from config

Also updating some deps and linting tweaks

* chore: add message on postinstall

Lost funds from gratipay and codesponsor 😢
2017-12-05 18:01:55 +00:00
Remy Sharp
32aed42f7f chore: linting errors 2017-09-04 20:35:56 +01:00
mike
4c81e9aa52 fix: catch module.parent.filename === undefined (#1053)
It happened with electron.js. Maybe some wrapper module has a native nature
2017-09-04 19:27:34 +01:00
Matt Lyons
f62c0d55ee refactor: remove deprecated util.error
Replace with console.error
Replace util.log with console.log to be consistent with _log
2015-10-21 23:34:39 -07:00
Remy Sharp
6e40e9adfd feat: support disabling colour output
via cli --no-color/--no-colour and via nodemon.json colours: false
2015-09-12 22:34:07 +01:00
Remy Sharp
438b8d7c0e refactor: passing jscs 2015-09-09 22:30:43 +01:00
Remy Sharp
7496f08330 fix: incorrectly exiting when required
test: updated travis tests
2015-09-09 22:29:26 +01:00
Remy Sharp
b0fd56f7de refactor: move watch out in favour of chokidar
Plus jscs clean ups
2015-08-31 18:25:55 +01:00
Doug Patti
56c4caf2ed pull command stringification into a utility
This was copied and pasted more than a handful of times around the
library and tests. Some implementations were more naive and did not
try to add quotes if there are spaces within a single argument.

There is one slight oddity in one of the cli parse tests. Stringifying
the command causes many of the arguments to show up in quotes when they
probably shouldn't. This seems to trace back to a deep problem related
to how commands are pulled out of package.scripts.start and is out of
scope for this patch. Even though the test might look incorrect now, it
is an accurate reflection of what the generated command is.
2015-04-22 13:42:55 -04:00
Remy Sharp
10ed83ea21 Fixed #499
`rs` now works again on windows when app has crashed.
2015-02-11 12:16:16 +00:00
Remy Sharp
1bb7c01fb6 Check of object hasOwnProp method 2015-01-18 10:48:18 +00:00
Remy Sharp
c223bfe5d5 Find on linux and detect container offset
Closes #455
Closes #453
Fixes #419

This method creates a file and checks the stat to check of an offset between the date on the machine and the created time on the file system. Docker (in my tests) show that you can get the offset using this method.

Once we have the offset, we tell the user (once) and then we use that to find files that have been modified according to the offset (either looking in the last using -mmin or in the future using -newer + a touched file).
2015-01-08 12:35:58 +00:00
Remy Sharp
80e8f7598f Early testing for event tests 2014-12-09 11:09:29 +00:00
Michael Heuberger
c4e263ed37 expose streams for piping (mh) 2014-06-04 02:49:24 +12: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
b6b98716a1 Quiet option wasn't working. 2014-01-17 23:37:12 +00:00
Remy Sharp
965446cc45 If mac, only use find on --watch directories 2014-01-15 14:13:46 +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
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
30a4a192f5 Docs and 1.0.0 release. Whoop whoop! 2013-12-29 22:50:02 +00:00
Remy Sharp
ab464021df 78 tests passing on mac. 2013-12-29 20:26:28 +00:00
Remy Sharp
96cd53cc94 Windows support, note to self: path.sep 2013-12-15 14:29:53 +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
4785409a79 tweaks to copy 2013-12-05 16:30:13 +00:00
Remy Sharp
d092d71775 Ignore .git & node_modules/**/node_modules by default. Closes #230
Also linting, tests and cleaned up filename that's echoed triggering the change
2013-12-05 00:12:24 +00:00
Remy Sharp
c503222f30 Refactoring.
* userScript => script
* simplified exec library
* removed dead code in config loading
* nodemon now knows when it's being required (and goes dark)
* etc...
2013-12-03 13:34:40 +00:00
Remy Sharp
d7c3647405 Using event bus for tests and requirable nodmeon
TODO: remove stdout inside tests
2013-11-25 01:04:52 +00:00
Remy Sharp
2909a17a8f First tests to ensure nodemon is actually restarting correctly 2013-11-14 14:09:14 +00:00
Remy Sharp
817e2269dc Custom merge with tests
Also fixes missing values in config
2013-10-30 19:43:20 +00:00