fix(cli): include React workspace root in project selection#16
Open
abekdwight wants to merge 1 commit intomillionco:mainfrom
Open
fix(cli): include React workspace root in project selection#16abekdwight wants to merge 1 commit intomillionco:mainfrom
abekdwight wants to merge 1 commit intomillionco:mainfrom
Conversation
|
@abekdwight is attempting to deploy a commit to the Million Team on Vercel. A member of the Team first needs to authorize it. |
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
discoverRootReactPackageto detect React dependency on workspace rootname/directory)--project, and non-React root exclusionWhy
In monorepo setups, react-doctor listed only workspace sub-packages and did not include the workspace root even when the root package used React. This prevented users from selecting and scanning root-based apps directly.
Architecture Changes
TypeScript (CLI):
discoverRootReactPackage(rootDirectory)indiscover-project.tshasReactDependencyas an internal helper (non-exported)select-projects.ts, append root candidate when eligible and not duplicatedTests:
tests/select-projects.test.ts--projectTest Plan
pnpm --filter react-doctor run test -- select-projectspnpm --filter react-doctor run typecheckl-shift-4)Files Changed
Updated:
packages/react-doctor/src/utils/discover-project.tspackages/react-doctor/src/utils/select-projects.tsAdded:
packages/react-doctor/tests/select-projects.test.ts