Skip to content

nodemon watch yml conf files and ignore .github#10924

Merged
chris48s merged 1 commit intobadges:masterfrom
jNullj:jNullj/issue10923
Mar 8, 2025
Merged

nodemon watch yml conf files and ignore .github#10924
chris48s merged 1 commit intobadges:masterfrom
jNullj:jNullj/issue10923

Conversation

@jNullj
Copy link
Copy Markdown
Member

@jNullj jNullj commented Mar 5, 2025

Fixes #10923

this change makes nodemon restart on every configuration change

Scanned the project for all other yml files and we have some at cypress and .github, both don't seem to add value for nodemon reload so i added .github to the ignore list (sypress was already there)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 5, 2025

Warnings
⚠️

This PR modified package.json, but not package-lock.json - Perhaps you need to run npm install?

Messages
📖 ✨ Thanks for your contribution to Shields, @jNullj!

Generated by 🚫 dangerJS against 39585cc

this makes nodemon restart on every configuration change

ignored .github folder as it is not needed for nodemon to watch and has yml files

Fixes badges#10923
@jNullj jNullj force-pushed the jNullj/issue10923 branch from dcb02eb to 39585cc Compare March 5, 2025 21:48
@jNullj jNullj changed the title add config yml files to nodemon watch nodemon watch yml conf files and ignore .github Mar 5, 2025
@jNullj jNullj added the developer-experience Dev tooling, test framework, and CI label Mar 5, 2025
@jNullj jNullj marked this pull request as ready for review March 5, 2025 21:51
@chris48s
Copy link
Copy Markdown
Member

chris48s commented Mar 6, 2025

Hmm. In #10922 (reply in thread) you said

i tested and it did not work

but I tried this locally and it was reloading on changed to config files and picking up the new config. What problem did you hit?

@jNullj
Copy link
Copy Markdown
Member Author

jNullj commented Mar 6, 2025

I was testing using npm run debug:server I change local.yml by toggling the service trace option false/true while debug server is running and looked for trace on badges requests (changed badge each time to avoid cache)

public:
  handleInternalErrors: false
  services:
    trace: false/true
  ...

Using this PR commit i was able to get a reload.
Using master (commit be9cdc2) changes don't take effect, i don't see the trace but i do get this message when the file change at config/local.yml is saved:

[nodemon] files triggering change check: config/local.yml
[nodemon] matched rule: **/*.*
[nodemon] changes after filters (before/after): 1/0

i think that "ext": "js" means we only look for .js file changes, and that's why the yml file changes are detected but are not acted upon. which is the main change in this PR.

as i did this quickly yesterday i just tried to replicate this results and was able to do so with the commits mentioned here.

@chris48s
Copy link
Copy Markdown
Member

chris48s commented Mar 7, 2025

Right, ok. So you were saying that:

  • The code as it exists on master doesn't pick up config file changes
  • The code proposed in this PR does pick up config file changes
    ?

@jNullj
Copy link
Copy Markdown
Member Author

jNullj commented Mar 8, 2025

Right, ok. So you were saying that:

* The code as it exists on master _doesn't_ pick up config file changes

* The code proposed in this PR _does_ pick up config file changes
  ?

yea, sorry if i did not communicate my tests clearly.

@chris48s
Copy link
Copy Markdown
Member

chris48s commented Mar 8, 2025

got it - ta 👍

@chris48s chris48s added this pull request to the merge queue Mar 8, 2025
Merged via the queue into badges:master with commit 313cced Mar 8, 2025
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

developer-experience Dev tooling, test framework, and CI

Development

Successfully merging this pull request may close these issues.

Reload configuration without restarting process

2 participants