Skip to content
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

fix(v2): fix inconsistent error output in swizzle command #3725

Merged
merged 1 commit into from
Nov 12, 2020

Conversation

lex111
Copy link
Contributor

@lex111 lex111 commented Nov 11, 2020

Motivation

Fixes #3408, but also does some minor refactoring of command body to improve the comprehensibility/readability of the code (mostly, using return early pattern and using console.warn together with process.exit instead of throwing an exception so as not to display unnecessary/long stack trace).

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Try to execute swizzle command with different cases (with empty/wrong arguments, with --danger and --typescript flags).

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

@lex111 lex111 added pr: bug fix This PR fixes a bug in a past release. pr: polish This PR adds a very minor behavior improvement that users will enjoy. labels Nov 11, 2020
@lex111 lex111 requested a review from slorber as a code owner November 11, 2020 16:25
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Nov 11, 2020
@lex111 lex111 changed the title fix(v2): fix inconsistent error output fix(v2): fix inconsistent error output in swizzle command Nov 11, 2020
@netlify
Copy link

netlify bot commented Nov 11, 2020

Deploy preview for docusaurus-2 ready!

Built with commit ad504ba

https://deploy-preview-3725--docusaurus-2.netlify.app

@slorber
Copy link
Collaborator

slorber commented Nov 12, 2020

thanks, that seems to work better now ❤️

@slorber slorber merged commit 460ac71 into master Nov 12, 2020
@lex111 lex111 deleted the lex111/refactor-swizzle branch November 13, 2020 22:58
@lex111 lex111 added this to the v2.0.0-alpha.67 milestone Nov 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: bug fix This PR fixes a bug in a past release. pr: polish This PR adds a very minor behavior improvement that users will enjoy.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bad error when trying to swizzle a theme component
3 participants