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

Passing an array into ext config #2189

Closed
lunavod opened this issue Mar 12, 2024 · 5 comments
Closed

Passing an array into ext config #2189

lunavod opened this issue Mar 12, 2024 · 5 comments
Labels
discussion / question stale no activity for 2 weeks

Comments

@lunavod
Copy link

lunavod commented Mar 12, 2024

When using nodemon.json, it is possible to pass an array into watch property, but not into ext. This is probably expected behavior, but it is not intuitive for a first-time user.

  • nodemon -v: 3.1.0
  • node -v: v21.2.0
  • Operating system/terminal environment: Windows
  • Using Docker? What image:
  • Command you ran: nodemon

Expected behaviour

Nodemon works as usual, watching provided extensions

Actual behaviour

TypeError: extension.match is not a function

Steps to reproduce

  • Create a nodemon.json config with the following content:
{
  "ext": ["foo", "bar"]
}
  • Run nodemon
@mauroobento
Copy link

According to Nodemon docs, there is no array in ext, only in options, as you can see

... 
{
  "restartable": "rs",
...
  "ext": "js,json"
}

@lunavod
Copy link
Author

lunavod commented Mar 15, 2024

Yeah, it is more of a feature request. Or at least to get maintainer's opinion about this so I could maybe implement it myself and make a pull request

@remy
Copy link
Owner

remy commented Mar 25, 2024

Correct me if I'm wrong, but the nodemon.json is created by the author, right? If that's the case, why would the author be using an array instead of a string?

It's not a big change, but I just want to work out if there's actually a problem or a need, over something that's just a preference.

Copy link

github-actions bot commented Apr 8, 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 Apr 8, 2024
Copy link

github-actions bot commented May 8, 2024

Automatically closing this issue due to lack of activity

@github-actions github-actions bot closed this as completed May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion / question stale no activity for 2 weeks
Projects
None yet
Development

No branches or pull requests

3 participants