node icon indicating copy to clipboard operation
node copied to clipboard

watch: add `--watch-kill-signal` flag

Open dario-piotrowicz opened this issue 6 months ago • 4 comments

add the new --watch-kill-signal to allow users to customize what signal is sent to the process on restarts during watch mode

dario-piotrowicz avatar Jun 15 '25 18:06 dario-piotrowicz

Review requested:

  • [ ] @nodejs/config
  • [ ] @nodejs/test_runner

nodejs-github-bot avatar Jun 15 '25 18:06 nodejs-github-bot

Documentation changes are missing

Sorry my bad :bow: , doc changes added :slightly_smiling_face::+1:

dario-piotrowicz avatar Jun 15 '25 18:06 dario-piotrowicz

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 90.08%. Comparing base (eaebfab) to head (ce4776c). Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #58719      +/-   ##
==========================================
- Coverage   90.09%   90.08%   -0.02%     
==========================================
  Files         640      640              
  Lines      188450   188452       +2     
  Branches    36966    36963       -3     
==========================================
- Hits       169789   169766      -23     
- Misses      11364    11404      +40     
+ Partials     7297     7282      -15     
Files with missing lines Coverage Δ
src/node_options.cc 84.59% <100.00%> (+0.13%) :arrow_up:
src/node_options.h 97.87% <100.00%> (+0.01%) :arrow_up:

... and 35 files with indirect coverage changes

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Jun 15 '25 19:06 codecov[bot]

CI: https://ci.nodejs.org/job/node-test-pull-request/67472/

nodejs-github-bot avatar Jun 15 '25 23:06 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/67507/

nodejs-github-bot avatar Jun 17 '25 21:06 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/67509/

nodejs-github-bot avatar Jun 17 '25 22:06 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/67510/

nodejs-github-bot avatar Jun 18 '25 00:06 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/67516/

nodejs-github-bot avatar Jun 18 '25 08:06 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/67517/

nodejs-github-bot avatar Jun 18 '25 10:06 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/67518/

nodejs-github-bot avatar Jun 18 '25 10:06 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/67521/

nodejs-github-bot avatar Jun 18 '25 13:06 nodejs-github-bot

Missing documentation in the node.1 file Other than that LGTM

Hi @atlowChemi, thanks a lot for having a look :heart_hands:

I think you're right, but could you clarify why this needs to be added to node.1? (sorry I am simply not familiar with that file)

Also I don't see any of the watch related flags in that file.... so it feels a bit weird to add this one.... maybe the right thing would be to keep this PR as is and then add all the watch related flags to that file as a followup? (but again I would love to understand what the file does first :sweat_smile:)

dario-piotrowicz avatar Jun 20 '25 17:06 dario-piotrowicz

Alright @atlowChemi , node.1 is for the man page... sorry for not knowing :see_no_evil::sweat:

I've added --watch-kill-signal alongside the missing watch mode related flags to node.1 :+1:

dario-piotrowicz avatar Jun 28 '25 11:06 dario-piotrowicz

CI: https://ci.nodejs.org/job/node-test-pull-request/67711/

nodejs-github-bot avatar Jun 28 '25 21:06 nodejs-github-bot

Landed in f0a947865f0c69de2ac77dc72f2024cf18caa893...4d5ee2491b9c31b142ff48b648ec535b2c5aad13

nodejs-github-bot avatar Jun 28 '25 22:06 nodejs-github-bot

@dario-piotrowicz we should have set the stability of this API. Usually, we start with 1.1 (Active Development), but that's not mandatory.

RafaelGSS avatar Jul 08 '25 18:07 RafaelGSS

@dario-piotrowicz we should have set the stability of this API. Usually, we start with 1.1 (Active Development), but that's not mandatory.

Mh... I see, yes that's a good point... although for something this small and trivial I didn't even consider that :thinking:

Would you like me to open a doc PR to add the stability?

dario-piotrowicz avatar Jul 08 '25 18:07 dario-piotrowicz

I think that would be great. I'd say to mark it as 1.1, but no need to emit a warning on usage.

RafaelGSS avatar Jul 08 '25 18:07 RafaelGSS

I think that would be great. I'd say to mark it as 1.1, but no need to emit a warning on usage.

https://github.com/nodejs/node/pull/58997 :slightly_smiling_face:

dario-piotrowicz avatar Jul 08 '25 18:07 dario-piotrowicz