Commit Graph

249 Commits

Author SHA1 Message Date
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
9d1a63c6a6 fix: allow watching relative path files (#1385)
Fixes #1355
2018-07-10 18:39:53 +01:00
Victor Perez
f616258669 fix: {{filename}} is only replaced once 2018-05-05 20:17:54 +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
0f39b2e349 fix: make it possible for windows to checkout (#1270)
Fixes #1255
2018-02-27 16:43:09 +00:00
Remy Sharp
e41f3c3aad feat: feed args to exec when detecting script (#1273)
Fixes #1263

The way it works:

- If the script is detected via index.js from the directory, or from the
package, then all the arguments on the CLI are shifted to execArgs

- If there was a double-dash on the CLI args, then only those before the
double-dash are given to execArgs and the rest remain passed to the
script
2018-02-27 16:42:32 +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
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
8cb26bfe25 refactor: small tweaks to ES6-ish 2018-01-06 09:35:16 +00:00
Josef Brandl
d78bf3d5d1 fix: watch both js and mjs files if main file is JavaScript 2017-12-29 16:51:17 +00:00
Remy Sharp
6e839d4a33 fix: support implicit filename extension
Fixes #1193
2017-12-29 10:55:12 +00:00
Remy Sharp
0c78a9c7a0 test: remove .only 2017-12-23 08:48:46 +00:00
Remy Sharp
ad226afc13 fix: ensure non-slurp is passed to script
The `--` argument now passes all arguments after the script (if omitted in the nodemon call), rather than the exec command.

Fixes #750
2017-12-22 22:34:18 +00:00
Dominykas Blyžė
35b86a92e1 test: increase timeout between writing files and starting nodemon
It seems that the filesystem events for creating the files get delayed somehow and arrive after nodemon has started - increasing the timeout prevents a restart before we've actually modified the file
2017-12-20 14:08:53 +00:00
Dominykas Blyžė
b326b4648a test: unlink tmp files after each test 2017-12-20 14:08:53 +00:00
Dominykas Blyžė
c5bf96c051 test: always wait for nodemon.reset() to complete in teardown 2017-12-20 14:08:53 +00:00
Dominykas Blyžė
70a2ec7f3d test: use unlinkSync; validate file exists before unlinking
Sometimes tests fail because the file does not exist (it was possibly not created due to unrelated failure?); Async unlinking might also be causing unnecessary restarts (sometimes test fail with "`done` called twice")
2017-12-20 14:08:53 +00:00
Dominykas Blyžė
84ec156ed0 test: fix hanging test 2017-12-20 14:08:53 +00:00
Dominykas Blyžė
009d868516 feat: support wildcard extension matching 2017-12-20 14:08:32 +00:00
Remy Sharp
a282afbbe3 fix: support nodemon index to expand to index.js
With support for custom extensions (picking only the first).

Fixes #1165
2017-12-15 08:45:49 +00:00
Tim
f711fb7889 test: fork child node processes 2017-12-06 14:45:10 -08: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
17ad4b9f1a docs: include .github templates 2017-12-05 13:08:53 +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
Marcus Noble
ff935cae7f test: Test support for multi-level filenames 2017-10-08 16:02:15 +01:00
Remy Sharp
6a4803d7b6 test: skip a test 2017-09-04 20:41:47 +01:00
Rich Hodgkins
fb5da380c8 feat: nodemonConfig support in package.json
* feat: support using ‘nodemonConfig’ in package.json

Implements loading configuration options from the `nodemonConfig` value in the package.json, nodemon.json is still preferred before looking at the new option.
Also includes tests.

Closes #873

* docs: update for using ‘nodemonConfig’ in package.json

Add to both the README and `nodemon --help config`.

#1028
2017-09-04 20:26:17 +01:00
Tim Kang
3c352f2f27 fix: support signal on CLI (#1061) 2017-09-04 19:41:35 +01:00
Kyle Smith
ee110add53 feat: support --config command line arg
Implement `--config <file>` option to allow config loading from an arbitrary file instead of being
bound to the static `$PWD/nodemon.json`.

Closes #755 
Closes #855
2016-07-25 22:01:45 +01:00
Mark Wubben
12b8935232 test: should not match dotfiles unless asked 2016-02-25 21:08:44 +00:00
Mark Wubben
3d19aee29f test: watcher shouldn't crash if ignoreRoot is [] 2016-02-25 21:08:44 +00:00
Remy Sharp
b95469aeb4 test: check non-english chrs don't blow up 2016-02-25 11:14:27 +00:00
Remy Sharp
f5d1a04cc8 test: fix default node ext to js,json
@pensierinmusica this was the fix you needed to pass the tests.
2015-10-25 07:14:49 +00:00
Remy Sharp
e4412268c4 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:27:54 +01:00
Remy Sharp
3265e92b62 test: fix bad runOnChangeOnly test 2015-10-19 12:27:54 +01:00
Remy Sharp
b875ffc9c0 test: clean string for trigger check 2015-10-19 12:27:53 +01:00
Remy Sharp
0b13116551 refactor: allow dev use of nodemon to show githash
Rather than an arbitrary version string - this will only happen when cloned from git, rather than an npm install. This is entirely for debugging.
2015-10-19 12:27:53 +01:00
Remy Sharp
526811d9b0 fix: make control over ignoreRoot easier
And add documentation and tests
2015-10-19 12:27:53 +01:00
Remy Sharp
fb8580c806 test: fix searching for nodemon message 2015-10-19 12:27:53 +01:00
Remy Sharp
37755457b6 chore: travis faff 2015-10-19 12:27:52 +01:00
Remy Sharp
099496ab61 chore: cleanup stupid merge mess 2015-10-19 12:27:52 +01:00
Remy Sharp
d98301d436 chore: Merge branch 'feature/legacy-polling-mode'
Conflicts:
	test/cli/parse.test.js
2015-09-19 10:43:08 +01:00
Remy Sharp
e8f6d296dc chore: exposure on what is failing in travis 2015-09-19 10:32:37 +01:00
Remy Sharp
f4b12476e1 chore: Merge branch 'master' into feature/disable-colour 2015-09-19 10:29:08 +01:00
Remy Sharp
03ef996d29 chore: Merge branch 'fix/package-start-with-env' 2015-09-19 10:25:50 +01:00
Remy Sharp
12d02b5ec2 test: update tests with new pkg.start 2015-09-19 09:43:12 +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
Remy Sharp
be3b5b3aee test: updating tests for new pkg.start logic 2015-09-16 10:32:43 +01:00
Kevin Woo
cde21fb4de test: added dotfile tests 2015-09-15 21:46:36 -07:00