-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Framework: Upgrade to Babel 6 #1515
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"presets": [ | ||
"es2015", | ||
"stage-2" | ||
], | ||
"plugins": [ | ||
"transform-runtime", | ||
"transform-class-properties", | ||
"transform-export-extensions", | ||
"add-module-exports", | ||
"syntax-jsx", | ||
"transform-react-jsx", | ||
"transform-react-display-name" | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,18 @@ | ||
export * from './cart'; | ||
export * from './checkout'; | ||
export * from './free-trials'; | ||
export * from './domain-management'; | ||
export * from './domain-search'; | ||
export * from './purchases'; | ||
// These could be rewritten as `export * from`, pending resolution of Babel | ||
// transform bug: http://phabricator.babeljs.io/T2877 | ||
|
||
import * as cart from './cart'; | ||
import * as checkout from './checkout'; | ||
import * as freeTrials from './free-trials'; | ||
import * as domainManagement from './domain-management'; | ||
import * as domainSearch from './domain-search'; | ||
import * as purchases from './purchases'; | ||
|
||
export default { | ||
...cart, | ||
...checkout, | ||
...freeTrials, | ||
...domainManagement, | ||
...domainSearch, | ||
...purchases | ||
}; | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,7 +57,7 @@ export default React.createClass( { | |
|
||
return ( | ||
<div className={ classNames( 'notification-settings-form-stream', this.props.className ) }> | ||
{ () => { | ||
{ ( () => { | ||
if ( this.props.devices ) { | ||
return <DeviceSelector | ||
devices={ this.props.devices } | ||
|
@@ -66,7 +66,7 @@ export default React.createClass( { | |
} | ||
|
||
return ( <StreamHeader stream={ this.props.stream } /> ); | ||
}() } | ||
} )() } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice catch on these - were they breaking tests? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
If I recall correctly, the code was failing to compile on the newer version of Babel. |
||
<StreamOptions | ||
blogId={ this.props.blogId } | ||
stream={ stream } | ||
|
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.
Is this supposed to be included in this PR?
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.
I'll look at this a bit more. It curently fails to compile with the following error with the original code:
However, it's a bit puzzling, since the additional export supports are from a stage 1 proposal (source), so I'd expect them to be supported per our configuration.
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.
Looks like this is a bug with Babel: http://phabricator.babeljs.io/T6888