remy / nodemon

Monitor for any changes in your node.js application and automatically restart the server - perfect for development
http://nodemon.io/
MIT License
26.31k stars 1.73k forks source link

YAML file passed to -w does not trigger restart when it changes #2216

Closed rjray closed 1 month ago

rjray commented 2 months ago

Expected behaviour

A change to the file src/openapi.yaml should cause nodemon to restart the watched process

Actual behaviour

Changes to the YAML file have no effect

Work-around

Passing --ext yaml,ts causes the file to trigger restarts when it changes. However, I expected that an explicitly-specified file would not need to be further enabled by --ext.

github-actions[bot] commented 1 month ago

This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up. Thank you for contributing <3

rjray commented 1 month ago

This is still an issue. The work-around gets the job done, but could also falsely trigger a re-start if any other YAML files are in the watched directories.

remy commented 1 month ago

ACK - this is actually a bug, though not entirely apparent. If you run nodemon in the src directory and ask it to run as nodemon -w ./openapi.yaml -w . ./server.ts it works, but if you're watching in a sub-directory it doesn't - as you're experiencing.

I'm trying to work on a fix for this.

remy commented 1 month ago

I wrote a fix last night but it's not fully passing tests (but I think those tests need to be updated).

I've published a dev build if you want to try it out though - if you install using npm install nodemon@dev you should be able to test it out.

rjray commented 1 month ago

Tried it and it worked. Will watch for an updated release.

github-actions[bot] commented 1 month ago

This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up. Thank you for contributing <3

rjray commented 1 month ago

Commenting to keep this alive. Any estimate on the next release?

remy commented 1 month ago

I'm still trying to scrape the time to get the tests to pass (I've marked as not-stale to prevent the bot from closing). The code change is there, but there's a lot of tests that fail (in the match logic) due to the change, and I'm trying to work out which are false negatives and which are real. Definitely going in soon…ish!

remy commented 1 month ago

That's going up in the latest release now 👍

github-actions[bot] commented 1 month ago

:tada: This issue has been resolved in version 3.1.6 :tada:

The release is available on:

Your semantic-release bot :package::rocket: