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

Add '--silent' or '-s' option to suppress output #79

Merged
merged 1 commit into from
Dec 19, 2015
Merged

Add '--silent' or '-s' option to suppress output #79

merged 1 commit into from
Dec 19, 2015

Conversation

Sinewyk
Copy link
Contributor

@Sinewyk Sinewyk commented Dec 17, 2015

issue ref: #60

@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

@Sinewyk
Copy link
Contributor Author

Sinewyk commented Dec 17, 2015

signed

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@fkling
Copy link
Contributor

fkling commented Dec 19, 2015

Thanks a lot!

fkling added a commit that referenced this pull request Dec 19, 2015
Add '--silent' or '-s' option to suppress output
@fkling fkling merged commit 7280e6f into facebook:master Dec 19, 2015
@Sinewyk
Copy link
Contributor Author

Sinewyk commented Dec 19, 2015

No problem =). Happy to help ^^.

@Sinewyk Sinewyk deleted the silent branch December 19, 2015 01:40
euphocat pushed a commit to euphocat/jscodeshift that referenced this pull request Oct 22, 2017
)

JSX uses capitalization to determine what type of `React.createElement` call to
produce: if the name starts with a lower-case letter, `React.createElement` is
called with the name as a string. Otherwise, it is called with the name as an
identifier. This means that an expression like `React.createElement(componentClass)`
cannot be converted to JSX, since `<componentClass />` would transform to the
string form. This commit changes the script to detect and skip these cases so
that the script does not introduce correctness issues.
euphocat pushed a commit to euphocat/jscodeshift that referenced this pull request Oct 22, 2017
In facebook#79, I made it so the transformation is skipped in some cases, in particular
when the capitalization is invalid. This broke an assumption elsewhere in the
code that `convertNodeToJSX` always returns a `JSXElement`, so there was a crash
if a skipped element was used as a child. To fix, we can just wrap in a
`JSXExpressionContainer` for that case.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants