feat: accept multiple file paths as positional arguments - #1745
Draft
skoshx wants to merge 3 commits into
Draft
Conversation
- Change CLI to accept variadic positional arguments [paths...] - When multiple paths provided, treat them as file list (like --changed-files-from) - Maintain backward compatibility: 0 args -> current dir, 1 arg -> directory - Normalize file paths to repo-relative with forward slashes - Add tests for all three cases (0, 1, N paths) - Add example to help output - Add changeset Closes #1744 Co-authored-by: Skosh <skoshx@users.noreply.github.com>
commit: |
Contributor
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
Contributor
Interactive terminal E2ETerminal Control verified the built CLI at
|
Co-authored-by: Skosh <skoshx@users.noreply.github.com>
Co-authored-by: Skosh <skoshx@users.noreply.github.com>
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.
Summary
Fixes #1744
Allows the CLI to accept multiple file paths as positional arguments, enabling CI systems to pass pre-computed changed-file lists directly instead of forcing react-doctor to re-derive them via
--scope files --base.Changes
[directory]to[paths...]to accept variadic arguments--changed-files-from.Usage
Testing
Scope
This is a CLI-only change that doesn't affect the diagnostic engine. The diagnostics produced are identical to using
--changed-files-from- we're just adding a more ergonomic way to specify the file list directly on the command line.