Skip to content

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

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

@dario-piotrowicz dario-piotrowicz commented May 11, 2025

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-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label May 11, 2025
Copy link

codecov bot commented May 11, 2025

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-piotrowicz dario-piotrowicz added the request-ci Add this label to start a Jenkins CI on a PR. label May 11, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label May 11, 2025
@nodejs-github-bot
Copy link
Collaborator

@dario-piotrowicz dario-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-bot nodejs-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:main May 13, 2025
69 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in ae8a6de

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. needs-ci PRs 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