Skip to content

fix(devcheck): advance scanner past consumed --conditions value; drop invalid -C= form - #13

Merged
Shinrai merged 1 commit into
nextfrom
fix/devcheck-conditions-scanner
Aug 9, 2026
Merged

fix(devcheck): advance scanner past consumed --conditions value; drop invalid -C= form#13
Shinrai merged 1 commit into
nextfrom
fix/devcheck-conditions-scanner

Conversation

@cldmv-bot

@cldmv-bot cldmv-bot Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

🚀 What's Changed

💥 Breaking Changes

No breaking changes

✨ Features

No new features

🐛 Bug Fixes

  • fix(devcheck): advance scanner past consumed --conditions value; drop invalid -C= form (42e5a6f)

📦 Dependencies

No dependency updates

🔧 Other Changes

No other changes

👥 Contributors

… invalid -C= form

The devcheck scanner (merged via #10) had two nits: the space-form branch
(`--conditions x` / `-C x`) consumed tokens[i+1] as the value but did not
advance the loop index, so a value that itself looks like a flag could be
double-processed; and it handled `-C=value`, which Node rejects outright
("bad option") so it can never appear. Advance i past the consumed value token,
drop the dead `-C=` branch (valid forms: `--conditions=x`, `--conditions x`,
`-C x`), and add -C short-flag test coverage.

Redo of the change that was mistakenly pushed onto the already-merged
fix/devcheck-condition-detection branch (which opened a diverged PR #12);
this branch is cut fresh from next so the diff is only the scanner delta.
@cldmv-bot cldmv-bot Bot added ! fix → next v4 flow: fix contributor PR targeting the next integration branch area: tests Touches test files, fixtures, or test infrastructure labels Aug 9, 2026
@Shinrai
Shinrai requested a lite review from Copilot August 9, 2026 04:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR tightens devcheck.mjs’s argument scanning so --conditions/-C values are treated as consumed (and not re-parsed as separate flags), and aligns behavior with Node’s accepted --conditions forms.

Changes:

  • Update the token scanner to advance past the consumed value for space-separated --conditions / -C.
  • Remove handling of the invalid -C=<value> form and document supported forms.
  • Add a Vitest case covering the -C <value> short-flag behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tests/DevCheck.test.vitest.mjs Adds coverage for -C <value> as an accepted way to set the uuid-dev condition.
devcheck.mjs Fixes scanner logic to skip consumed values and removes parsing for invalid -C=<value> tokens.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@Shinrai
Shinrai merged commit 1de8886 into next Aug 9, 2026
25 checks passed
@cldmv-bot
cldmv-bot Bot deleted the fix/devcheck-conditions-scanner branch August 9, 2026 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: tests Touches test files, fixtures, or test infrastructure ! fix → next v4 flow: fix contributor PR targeting the next integration branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants