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

Upgrade to Babel 7 #120

Merged
merged 3 commits into from Sep 30, 2017
Merged

Upgrade to Babel 7 #120

merged 3 commits into from Sep 30, 2017

Conversation

vlad-zhukov
Copy link
Contributor

Upgraded tests automatically, we need to go through them to make sure they work properly.

@@ -1,3 +1,3 @@
{
"presets": ["react", "es2015", "stage-0"]
"presets": ["es2015", "react", "flow", "stage-0"]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'flow' preset is required now because it was removed from the 'react' preset.

@@ -19,7 +19,7 @@ module.exports = {
'flowtype',
],
rules: {
'array-bracket-spacing': 'off', // use babel plugin rule
'array-bracket-spacing': ['error', 'never'],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'babel/array-bracket-spacing' rule is deprecated and suggest to use 'array-bracket-spacing'

// Required for `babel-plugin-transform-flow-strip-types`
if (typeof plugin !== 'function') {
plugin = plugin.default;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'babel-plugin-transform-flow-strip-types' exports default

Copy link
Owner

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't spot any regression after a quick scan :)


Object.defineProperty(Foo, "propTypes", {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Broken test? Shouldn't it remove it?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this broken?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should remove prop types, isn't it? Am I not noticing something obvious?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It shouldn't. It's here to show a limitation of the lib. It's a tradeoff taken for perf.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, that's why it's not working for me as I expect it to. Looks like a bug to be tho.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vlad-zhukov It's related to #8

@vlad-zhukov
Copy link
Contributor Author

vlad-zhukov commented Sep 28, 2017

I've published this branch at @vlad-zhukov/babel-plugin-transform-react-remove-prop-types and tested on my project against the currently published version. The output is exactly the same (same content hashes).

@oliviertassinari oliviertassinari merged commit c4e4dab into oliviertassinari:master Sep 30, 2017
@oliviertassinari
Copy link
Owner

@vlad-zhukov Let's release it :)

@oliviertassinari
Copy link
Owner

@vlad-zhukov Thanks!

@vlad-zhukov
Copy link
Contributor Author

Thank you!

@vlad-zhukov vlad-zhukov deleted the upgrade-to-babel7 branch October 5, 2017 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants