Skip to content

watch: add --watch-kill-signal flag #58719

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

Conversation

dario-piotrowicz
Copy link
Member

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

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/config
  • @nodejs/test_runner

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Jun 15, 2025
@dario-piotrowicz dario-piotrowicz added semver-minor PRs that contain new features and should be released in the next minor version. needs-ci PRs that need a full CI run. lib / src Issues and PRs related to general changes in the lib or src directory. and removed c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Jun 15, 2025
@dario-piotrowicz dario-piotrowicz force-pushed the dario/watch-mode-kill-signal branch from 1d23a46 to 96426c5 Compare June 15, 2025 18:09
Copy link
Member

@anonrig anonrig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation changes are missing

@dario-piotrowicz dario-piotrowicz force-pushed the dario/watch-mode-kill-signal branch from 96426c5 to 83894cf Compare June 15, 2025 18:18
@dario-piotrowicz
Copy link
Member Author

Documentation changes are missing

Sorry my bad 🙇 , doc changes added 🙂👍

Copy link

codecov bot commented Jun 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

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%) ⬆️
src/node_options.h 97.87% <100.00%> (+0.01%) ⬆️

... and 35 files with indirect coverage changes

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

@dario-piotrowicz dario-piotrowicz force-pushed the dario/watch-mode-kill-signal branch 2 times, most recently from 887d4b7 to f90f6be Compare June 15, 2025 20:31
@anonrig anonrig added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Jun 15, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 15, 2025
@nodejs-github-bot

This comment was marked as outdated.

@dario-piotrowicz dario-piotrowicz force-pushed the dario/watch-mode-kill-signal branch from f90f6be to 973b29c Compare June 17, 2025 21:38
@nodejs-github-bot

This comment was marked as outdated.

@dario-piotrowicz dario-piotrowicz force-pushed the dario/watch-mode-kill-signal branch from 973b29c to 3b17c10 Compare June 17, 2025 22:55
@nodejs-github-bot

This comment was marked as outdated.

@dario-piotrowicz dario-piotrowicz force-pushed the dario/watch-mode-kill-signal branch from 3b17c10 to 229863f Compare June 18, 2025 00:01
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@dario-piotrowicz
Copy link
Member Author

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

Hi @atlowChemi, thanks a lot for having a look 🫶

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 😅)

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 dario-piotrowicz force-pushed the dario/watch-mode-kill-signal branch from 229863f to ce4776c Compare June 28, 2025 11:04
@dario-piotrowicz
Copy link
Member Author

Alright @atlowChemi , node.1 is for the man page... sorry for not knowing 🙈😓

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

@dario-piotrowicz dario-piotrowicz added the commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. label Jun 28, 2025
@dario-piotrowicz dario-piotrowicz added the request-ci Add this label to start a Jenkins CI on a PR. label Jun 28, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 28, 2025
@nodejs-github-bot
Copy link
Collaborator

@dario-piotrowicz dario-piotrowicz added the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 28, 2025
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 28, 2025
@nodejs-github-bot
Copy link
Collaborator

Landed in f0a9478...4d5ee24

nodejs-github-bot pushed a commit that referenced this pull request Jun 28, 2025
add the new `--watch-kill-signal` to allow users to customize
what signal is sent to the process on restarts during watch mode

PR-URL: #58719
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
nodejs-github-bot pushed a commit that referenced this pull request Jun 28, 2025
PR-URL: #58719
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
@dario-piotrowicz dario-piotrowicz deleted the dario/watch-mode-kill-signal branch June 29, 2025 00:57
targos pushed a commit that referenced this pull request Jul 3, 2025
add the new `--watch-kill-signal` to allow users to customize
what signal is sent to the process on restarts during watch mode

PR-URL: #58719
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
targos pushed a commit that referenced this pull request Jul 3, 2025
PR-URL: #58719
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
nodejs-github-bot added a commit that referenced this pull request Jul 8, 2025
Notable changes:

crypto:
  * (SEMVER-MINOR) support outputLength option in crypto.hash for XOF functions (Aditi) #58121
doc:
  * (SEMVER-MINOR) add all watch-mode related flags to node.1 (Dario Piotrowicz) #58719
fs:
  * (SEMVER-MINOR) add disposable mkdtempSync (Kevin Gibbons) #58516
permission:
  * (SEMVER-MINOR) propagate permission model flags on spawn (Rafael Gonzaga) #58853
sqlite:
  * (SEMVER-MINOR) add support for readBigInts option in db connection level (Miguel Marcondes Filho) #58697
src,permission:
  * (SEMVER-MINOR) add support to permission.has(addon) (Rafael Gonzaga) #58951
watch:
  * (SEMVER-MINOR) add `--watch-kill-signal` flag (Dario Piotrowicz) #58719

PR-URL: #58993
@RafaelGSS
Copy link
Member

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

@dario-piotrowicz
Copy link
Member Author

@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 🤔

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

@RafaelGSS
Copy link
Member

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

@dario-piotrowicz
Copy link
Member Author

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

#58997 🙂

RafaelGSS pushed a commit that referenced this pull request Jul 9, 2025
Notable changes:

crypto:
  * (SEMVER-MINOR) support outputLength option in crypto.hash for XOF functions (Aditi) #58121
doc:
  * (SEMVER-MINOR) add all watch-mode related flags to node.1 (Dario Piotrowicz) #58719
fs:
  * (SEMVER-MINOR) add disposable mkdtempSync (Kevin Gibbons) #58516
permission:
  * (SEMVER-MINOR) propagate permission model flags on spawn (Rafael Gonzaga) #58853
sqlite:
  * (SEMVER-MINOR) add support for readBigInts option in db connection level (Miguel Marcondes Filho) #58697
src,permission:
  * (SEMVER-MINOR) add support to permission.has(addon) (Rafael Gonzaga) #58951
watch:
  * (SEMVER-MINOR) add `--watch-kill-signal` flag (Dario Piotrowicz) #58719

PR-URL: #58993
@ASAav123 ASAav123 mentioned this pull request Jul 9, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. semver-minor PRs that contain new features and should be released in the next minor version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants