-
Notifications
You must be signed in to change notification settings - Fork 932
feat: better error messages with human readable outputs #609
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 35 commits into
react-native-community:master
from
thecodrr:properly-handle-template-errors
Jan 30, 2020
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
f40353f
refactor: properly handle invalid template package
710d8fb
refactor: error checks when getting template name
1c69278
refactor: remove duplicate exception throw
30b0698
refactor: check if assets dest exists
e27b60b
refactor: add error checks when upgrading
9f6cea1
chore: add comment for using process.exit()
1d4b52c
refactor: improve error outputs in link command
b44a7e8
refactor: use for of loop
c4f1f46
refactor: check package before uninstalling
bc6c633
refactor: use CLIError instead of direct exit
d6f5657
refactor: handle potential android pkg name errors
a69ee5b
refactor: fix typos/mistakes in error outputs
f321431
refactor: add adb & android sdk path checks
389e60f
refactor: fix imports
8a138ce
refactor: improve install apk error outputs
207ea95
Apply suggestions from code review
6bf9dba
refactor: add init doc link in error output
168d679
test: make sure all tests pass
d851843
refactor: use try/catch around readFileSync
c0a2cac
refactor: do not read build.gradle twice
d073a04
refactor: clean up code in android linking
9087af4
fix: packageJson not defined in templateName
fbf5bd8
refactor: remove unintentional --verbose flag
af2b0cc
refactor: make flow very happy
f2f6e08
refactor: remove unnecessary variable definition
415bb25
pkgjson undefined tweak
thymikee 879f9b8
eslint fix
thymikee e87dc75
remove adb/android_home checks because we have doctor
thymikee 1e4ccb1
use mockImplementationOnce
thymikee a3b88f4
revert link changes, as it's going to be removed in next version
thymikee 3091c13
inline fns
thymikee 8b23e14
revert uninstall changes as we're removing that in next version
thymikee 37d4466
adjust copy
thymikee ea4ffd8
mock existsSync once
thymikee 398e7c4
remove unused code
thymikee 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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @thecodrr @thymikee @grabbou,
I have a situation that I need to run bundle and copy assets into new created folder based on
assetsDestand I was relying on https://github.com/react-native-community/cli/pull/609/files#diff-e59437386ac414095e6ed43a3da37303R93 to create folder if not exists.Any specific reason that it needs to check
assetsDestfirst before copying assets?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are calling
mkdirpin the copy function, maybe this is no longer needed?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, i think it should be safe using
mkdirpbefore copy filesThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this check can be safely removed then. What do you think @thymikee?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @thecodrr @thymikee will open the PR