-
Notifications
You must be signed in to change notification settings - Fork 932
feat: move doctor into cli-doctor package, extract config into cli-config, clean-up types
#1480
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
Merged
grabbou
merged 19 commits into
react-native-community:master
from
nickx720:1047-move-doctor-separate-package
Jan 26, 2022
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
6dd0677
Changed doctor to cli-doctor
nickx720 0c46e02
Fixed lint issues
nickx720 b5984a2
Fixed unit test cases for ci
nickx720 77a8f28
rebasing to master
nickx720 04b239c
Merge branch 'master' into 1047-move-doctor-separate-package
grabbou 6ca39a2
chore: add back
grabbou 5cb0f0f
WIP: update few missing deps and move tools around
grabbou 7d762b2
chore: clean-up packages, make config a separate package
grabbou 6572222
fix import
grabbou 8086cc4
fix: add note about todo
grabbou 6f93afa
additiinoal fies
grabbou 9ce9ffd
feat: fix up types and Ora
grabbou 851f0fc
chore: eslint
grabbou 27a447a
downgrade Ora to 5.4 - ESM not supported yet
grabbou 2c694e6
Apply review
grabbou 1abaf1c
fix: jest tests
grabbou 5d98d16
chore remove console log
grabbou d61a109
fix snapshot
grabbou 710c773
chore: fix test
grabbou File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,5 +14,4 @@ jest.mock('@react-native-community/cli-tools', () => { | |
| }, | ||
| }; | ||
| }); | ||
|
|
||
| jest.setTimeout(20000); | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| { | ||
| "name": "@react-native-community/cli-config", | ||
| "version": "6.0.1", | ||
| "license": "MIT", | ||
| "main": "build/index.js", | ||
| "publishConfig": { | ||
| "access": "public" | ||
| }, | ||
| "types": "build/index.d.ts", | ||
| "dependencies": { | ||
| "cosmiconfig": "^5.1.0", | ||
| "deepmerge": "^3.2.0", | ||
| "@react-native-community/cli-tools": "^6.2.0", | ||
| "joi": "^17.2.1", | ||
| "glob": "^7.1.3" | ||
| }, | ||
| "files": [ | ||
| "build", | ||
| "!*.d.ts", | ||
| "!*.map" | ||
| ], | ||
| "devDependencies": { | ||
| "@types/cosmiconfig": "^5.0.3", | ||
| "@react-native-community/cli-types": "^6.0.0", | ||
| "@types/glob": "^7.1.1" | ||
| }, | ||
| "homepage": "https://github.com/react-native-community/cli/tree/master/packages/cli-config", | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/react-native-community/cli.git", | ||
| "directory": "packages/cli-config" | ||
| } | ||
| } |
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
File renamed without changes.
6 changes: 1 addition & 5 deletions
6
...config/__tests__/findDependencies-test.ts → ...ig/src/__tests__/findDependencies-test.ts
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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
7 changes: 4 additions & 3 deletions
7
...rc/tools/config/resolveReactNativePath.ts → .../cli-config/src/resolveReactNativePath.ts
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
File renamed without changes.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "extends": "../../tsconfig.json", | ||
| "compilerOptions": { | ||
| "rootDir": "src", | ||
| "outDir": "build" | ||
| }, | ||
| "references": [{"path": "../tools"}, {"path": "../cli-types"}] | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| { | ||
| "name": "@react-native-community/cli-doctor", | ||
| "version": "6.0.1", | ||
| "license": "MIT", | ||
| "main": "build/index.js", | ||
| "publishConfig": { | ||
| "access": "public" | ||
| }, | ||
| "types": "build/index.d.ts", | ||
| "dependencies": { | ||
| "@react-native-community/cli-tools": "^6.2.0", | ||
| "@react-native-community/cli-config": "^6.0.1", | ||
| "chalk": "^3.0.0", | ||
| "envinfo": "^7.7.2", | ||
| "hermes-profile-transformer": "^0.0.6", | ||
| "ip": "^1.1.5", | ||
| "node-stream-zip": "^1.9.1", | ||
| "command-exists": "^1.2.8", | ||
| "prompts": "^2.4.0", | ||
| "semver": "^6.3.0", | ||
| "strip-ansi": "^5.2.0", | ||
| "ora": "^5.4.1", | ||
| "execa": "^1.0.0", | ||
| "wcwidth": "^1.0.1", | ||
| "sudo-prompt": "^9.0.0" | ||
| }, | ||
| "files": [ | ||
| "build", | ||
| "!*.d.ts", | ||
| "!*.map" | ||
| ], | ||
| "devDependencies": { | ||
| "@types/command-exists": "^1.2.0", | ||
| "@react-native-community/cli-types": "^6.0.0", | ||
| "@types/ip": "^1.1.0", | ||
| "@types/semver": "^6.0.2", | ||
| "@types/wcwidth": "^1.0.0", | ||
| "@types/prompts": "^2.0.9" | ||
| }, | ||
| "homepage": "https://github.com/react-native-community/cli/tree/master/packages/cli-doctor", | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/react-native-community/cli.git", | ||
| "directory": "packages/cli-doctor" | ||
| } | ||
| } | ||
4 changes: 2 additions & 2 deletions
4
.../src/commands/info/__tests__/info.test.ts → ...octor/src/commands/__tests__/info.test.ts
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| import doctor from './commands/doctor'; | ||
| import info from './commands/info'; | ||
|
|
||
| export const commands = {info, doctor}; | ||
|
|
||
| /** | ||
| * @todo | ||
| * We should not rely on this file from other packages, e.g. CLI. We probably need to | ||
| * refactor the init in order to remove that connection. | ||
| */ | ||
| export {default as installPods} from './tools/installPods'; |
6 changes: 3 additions & 3 deletions
6
packages/cli/src/tools/brewInstall.ts → packages/cli-doctor/src/tools/brewInstall.ts
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
File renamed without changes.
File renamed without changes.
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
2 changes: 1 addition & 1 deletion
2
packages/cli/src/tools/envinfo.ts → packages/cli-doctor/src/tools/envinfo.ts
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
4 changes: 2 additions & 2 deletions
4
.../__tests__/androidHomeEnvVariable.test.ts → .../__tests__/androidHomeEnvVariable.test.ts
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.