Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Labels
bug confirmed bug not-stale Tell stalebot to ignore this issue released remy working on it

Comments

@rjray
Copy link

rjray commented Aug 19, 2024

  • Versions: [email protected], [email protected]
  • nodemon -v: 3.1.4
  • Operating system/terminal environment (powershell, gitshell, etc): Linux, bash, yarn 1.22.22
  • Using Docker? What image: no
  • Command you ran: nodemon -w src/openapi.yaml -w src src/server.ts

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.

Copy link

github-actions bot commented Sep 2, 2024

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

@github-actions github-actions bot added the stale no activity for 2 weeks label Sep 2, 2024
@rjray
Copy link
Author

rjray commented Sep 2, 2024

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.

@github-actions github-actions bot removed the stale no activity for 2 weeks label Sep 2, 2024
@remy
Copy link
Owner

remy commented Sep 2, 2024

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 remy added bug confirmed bug remy working on it labels Sep 2, 2024
@remy
Copy link
Owner

remy commented Sep 3, 2024

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
Copy link
Author

rjray commented Sep 4, 2024

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

Copy link

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

@github-actions github-actions bot added the stale no activity for 2 weeks label Sep 18, 2024
@rjray
Copy link
Author

rjray commented Sep 18, 2024

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

@github-actions github-actions bot removed the stale no activity for 2 weeks label Sep 18, 2024
@remy remy added the not-stale Tell stalebot to ignore this issue label Sep 19, 2024
@remy
Copy link
Owner

remy commented Sep 19, 2024

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 remy closed this as completed in 11fcaaa Sep 19, 2024
@remy
Copy link
Owner

remy commented Sep 19, 2024

That's going up in the latest release now 👍

Copy link

🎉 This issue has been resolved in version 3.1.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment