Skip to content

watch: fix watch args not being properly filtered (second attempt) - #58279

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
dario-piotrowicz:dario/57124/2/node-watch-args-filtering-fix
May 13, 2025
Merged

watch: fix watch args not being properly filtered (second attempt)#58279
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
dario-piotrowicz:dario/57124/2/node-watch-args-filtering-fix

Conversation

@dario-piotrowicz

@dario-piotrowiczdario-piotrowicz commented May 11, 2025

Copy link
Copy Markdown
Member

I'm re-introducing this change that previously landed in #57936 but got reverted in #58190.

I believe that one of the main reasons for reverting the PR was the fact that when it landed it didn't include the changes that I however later introduced in #58183 (that also got reverted as part of #58190) (making me wonder if the revert was actually completely necessary after all 🤔).

Another reason for the revert was that I was adding the tests to the test/sequential/test-watch-mode.mjs file (which is marked as flaky) instead of creating a new test file.

I am not sure if there were other issues associated to the original PR, however I am opening this PR that reintroduces the changes and also addresses the two above issues (if there were other issues I'd imagine we'll see them when running ci against this PR).


Fixes: #57124

currently when --watch is used, the argv arguments that
the target script receives are filtered so that they don't
include watch related arguments, however the current
filtering logic is incorrect and it causes some watch values
to incorrectly pass the filtering, the changes here address
such issue
@nodejs-github-botnodejs-github-bot added the needs-ci PRs that need a full CI run. label May 11, 2025
@codecov

codecovBot commented May 11, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.18%. Comparing base (5f841fb) to head (6a063f5).
Report is 22 commits behind head on main.

Additional details and impacted files
@@ Coverage Diff @@## main #58279 +/- ##
==========================================
- Coverage 90.19% 90.18% -0.02% 
==========================================
Files 631 631 Lines 186670 186670 Branches 36670 36664 -6 ==========================================
- Hits 168374 168344 -30 - Misses 11112 11122 +10 - Partials 7184 7204 +20 

see 27 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-piotrowiczdario-piotrowicz added the request-ci Add this label to start a Jenkins CI on a PR. label May 11, 2025
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label May 11, 2025
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@dario-piotrowiczdario-piotrowicz added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue Add this label to land a pull request using GitHub Actions. labels May 12, 2025
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label May 13, 2025
@nodejs-github-bot
nodejs-github-bot merged commit ae8a6de into nodejs:mainMay 13, 2025
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in ae8a6de

targos pushed a commit that referenced this pull request May 16, 2025
currently when --watch is used, the argv arguments that
the target script receives are filtered so that they don't
include watch related arguments, however the current
filtering logic is incorrect and it causes some watch values
to incorrectly pass the filtering, the changes here address
such issue
PR-URL: #58279Fixes: #57124
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
aduh95 pushed a commit that referenced this pull request Jun 10, 2025
currently when --watch is used, the argv arguments that
the target script receives are filtered so that they don't
include watch related arguments, however the current
filtering logic is incorrect and it causes some watch values
to incorrectly pass the filtering, the changes here address
such issue
PR-URL: #58279Fixes: #57124
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.needs-ciPRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--watch combined with --watch-path results in duplicate restart events/logs

4 participants

@dario-piotrowicz@nodejs-github-bot@jasnell@benjamingr