fix(devcheck): advance scanner past consumed --conditions value; drop invalid -C= form - #13
Merged
Merged
Conversation
… 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.
There was a problem hiding this comment.
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
approved these changes
Aug 9, 2026
This was referenced Aug 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚀 What's Changed
💥 Breaking Changes
No breaking changes
✨ Features
No new features
🐛 Bug Fixes
📦 Dependencies
No dependency updates
🔧 Other Changes
No other changes
👥 Contributors