Commit Graph

100 Commits

Author SHA1 Message Date
Remy Sharp
d5b98915eb test: ensure ignore relative paths
(when asked)
2019-10-07 18:11:43 +01:00
Damián Nohales
5a47a32f79 fix: properly pass options to chokidar 2018-08-29 18:47:51 +01:00
Remy Sharp
d48a482b47 fix: don't watch directory when watching file
Fixes #1320

Also refactors the fix for #1259
2018-07-10 18:40:48 +01:00
Remy Sharp
b3fc3a9aa9 fix: in watch, use fully filtered ignore rules
Fixes #1348
2018-05-23 08:15:55 +01:00
Remy Sharp
58b82f2b72 fix: increase perf of watching large file count
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.
2018-05-05 20:18:16 +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
372e6b23fc fix: watch count regression (#1287)
* chore: revert package
* fix: move to array of watched dirs

Instead of individually listing them.

Fixes #1283
2018-03-13 21:45:50 +00:00
Remy Sharp
94b526f80a fix: put windows drive letter tweak in right place (#1272)
Fixes #1263
2018-02-27 16:42:51 +00:00
Remy Sharp
1cda8fae43 fix: ensure directories are watched, not files (#1260)
Fixes #1259
2018-02-19 16:49:55 +00:00
Remy Sharp
88954455be fix: make watch & ignore relative (#1253)
* docs: add sponsors

[skip ci]

* fix: make watch & ignore relative

Fixes #1246

* fix: relative parent watching and ignore

* chore: lint

* test: fix bail on options
2018-02-15 21:57:47 +00:00
Remy Sharp
4be493ca0d fix: don't ignore dot-directories
Fixes #1223
2018-01-11 11:00:46 +00:00
Remy Sharp
e95ea6f656 fix: ignorePermissionErrors in chokidar
Make any permission errors silent, since it the most likely case we don't need them at all.

Fixes: #1213
2018-01-08 12:35:06 +00:00
Remy Sharp
718a9ad2e2 fix: correctly pass ignored rules to chokidar
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
2018-01-08 12:33:51 +00:00
Remy Sharp
f711537795 chore: fix linting 2017-12-29 10:54:48 +00:00
Remy Sharp
7a04e2c71f fix: incorrect count of watch files being reported
The number of watched files was correct, but showed (incorrectly) a
cumulative total of watched files (i.e. 1 + 2 + 3 + 4 etc).

Fixes #1194
2017-12-29 10:54:48 +00:00
Remy Sharp
4589bc8a60 fix: properly ignore defaults, don't match partial
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
2017-12-20 23:21:35 +00:00
Remy Sharp
67d146637e refactor: remove libraries over native es6 support 2017-12-20 14:09:03 +00:00
Martin Dimitrov
10ded94cd7 fix: fixed an issue where we tried to resolve null as path 2017-12-15 14:14:17 +00:00
Remy Sharp
f8a5abe258 feat: watch script regardless of extension
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.
2017-12-15 08:46:11 +00:00
Timothy Huang
cf923a8a77 fix: get tests to pass 2017-12-06 14:45:17 -08:00
Tim
f711fb7889 test: fork child node processes 2017-12-06 14:45:10 -08:00
Remy Sharp
24a4b84717 feat: disable chokidar globbing on windows (#1140)
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
2017-12-04 20:05:58 +00:00
Remy Sharp
6d57dac0ee fix: bump deps and fix tests for local dev (#1139)
Upgraded tests for node 8
2017-12-04 14:56:44 +00:00
Mark Wubben
7152585fa2 fix: don't concatenate ignore regexes
The initial `ignored` may be undefined. If it isn't then a pipe character should
be inserted. This is all unnecessary though if we build up an array like before
4826c87744.
2016-02-25 21:08:44 +00:00
Danny Raetzsch
fc2bc168b0 feat: support --polling-interval command line arg 2015-11-09 20:34:43 -06:00
Sergey Slipchenko
7e7dc0402e Save readiness state on a per-watcher basis 2015-10-22 22:24:06 +03:00
Remy Sharp
2f19ffb5a7 fix: restart on new files added to watched dir
Fixes #664

Also includes tests and quietens the force crash test (though unchanged).
2015-10-19 12:34:38 +01:00
Remy Sharp
a3c9356de7 chore: Merge branch 'feature/better-error-on-watch-bork' 2015-09-19 10:47:37 +01:00
Remy Sharp
a5ab2354ec chore: better handle errors from chokidar 2015-09-19 08:50:15 +01:00
Remy Sharp
489f22dc93 fix: restore --legacy-watch
Pass the `usePolling` flag to Chokidar when in legacy mode, which is supposed to/hopefully fix containers watching network attached drives.

Fixes #639
Fixes #633
2015-09-19 08:20:39 +01:00
Kevin Woo
4826c87744 fix: ignore dotfiles only if not explicitly told to do so 2015-09-15 21:49:40 -07:00
Kevin Woo
cde21fb4de test: added dotfile tests 2015-09-15 21:46:36 -07:00
Remy Sharp
15b0b88d0f feat: merge ignore rules with defaults
And allow the user to override the defaults from their config
2015-09-12 11:34:28 +01:00
Remy Sharp
7250919e6d fix: restore file count in verbose mode 2015-09-12 11:34:20 +01:00
Remy Sharp
f7a94768f6 refactor: add debugging 2015-09-10 10:38:32 +01:00
Remy Sharp
438b8d7c0e refactor: passing jscs 2015-09-09 22:30:43 +01:00
Remy Sharp
ebbe1edb8d fix: protect from missing options 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
Nikolay Kuchumov
8eefdd0d00 Fixes watch interval 2015-07-11 20:06:54 +03:00
Remy Sharp
5016a38b0a Fixed crazy restart loop
Ensure we don't restart when the last find was 0 seconds ago
2015-01-19 17:07:17 +00:00
Remy Sharp
0f4ff3ffb4 Ditch trottle for debouce & fix tests 2015-01-09 21:05:36 +00:00
Remy Sharp
fd54d04074 Always ensure find ref file is removed 2015-01-08 12:45:57 +00:00
Remy Sharp
b4be4bffe2 Remove logging + swallow error properly 2015-01-08 12:42:13 +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
8d08b183a1 Fixed nodemon require reset fully
And related events test
2015-01-07 21:45:14 +00:00
Edgar Hipp
308f71ac3a updating files to match nodemons syntax style 2015-01-06 12:23:08 +01:00
Edgar Hipp
5b3fb19ffe using throttle only if config.options.delay>0 2015-01-06 10:56:58 +01:00
Edgar Hipp
986ef40c29 added trailing: false to throttle
If trailing is not set to false, a setTimeOut is called if you call the
function when it is 'locked', so you need to set trailing to false to
avoid that unnecessary call
2015-01-05 17:15:47 +01:00
Edgar Hipp
ef5ee96129 changed --delay option: it now works like a throttle instead of with
setTimeout.

This changes the behaviour of the option --delay n

This means that as soon as one file changes, nodemon will restart the
script. The previous behavior was to wait for n seconds before
restarting the process. With throttle, the function gets called when the
first file changes. After that, all file changes in the interval [t,t+n]
are ignored
2015-01-05 15:48:14 +01:00