-
Notifications
You must be signed in to change notification settings - Fork 668
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
build(babel): upgrade from babel 6 to babel 7 #1628
Conversation
e6eaa96
to
c6764bf
Compare
Thanks a lot. The deps here are pretty old... I also started updating our test infrastructure in this branch but it is failing on CI for some reason. 🤔 any ideas why? RE this PR: If you can fix the conflict, I can merge this - and do a release. 🎉 Regarding TypeScript, I don't see much benefit in moving away from flow to TS (although TS is definitely better). We are basically in maintenance mode (not looking to add any major features, anyway) so I don't see a huge benefit in moving to TS. None of the other Vue 2.x core libraries will, so I don't think VTU will either. I'd much rather get us onto Jest + update the rollup version before thinking about TS, at the very least. |
Thanks for taking a look @lmiller1990! I am trying to get more involved in the community and help out where I can. I can take a look at resolving the conflict. I am guessing my base branch is out of date with dev and should likely just be able to cherry-pick (or something) everything but the
I can take a look and see what I can find!
💯 agree. There isn't a huge value add gained from moving to TS and there are bigger fish to fry. I just wanted to throw out the idea that the TS compiler would likely replace babel if going that route, especially considering the capacity in which babel is currently used. Considering VTU Next, I don't believe VTU 1.x would ever remove flow for TS I would love to help out where I can, especially with the Jest upgrade. I am guessing you and the team are super busy with VTU Next. Going to take a look and see if I can help out there. To be honest, I am not exactly sure of the roadmap. As far as I know, VTU Next is going to eventually be VTU 2.x and only support Vue 3, while there will be some branch/tagging model (current dev branch) to support VTU 1.x for Vue 2 where fixes and minor features can still be contributed. Hopefully that is a correct assumption 😆 |
Upgrade the babel config from babel 6 to babel 7. This includes a few subset of changes. The vue-flow preset has been removed in favor or direct plugin installation, including 'transform-flow-strip-types', 'syntax-flow', and ' proposal-class-properties'. Use of 'transform-vue-jsx' plugin, using @vue/babel-plugin-transform-vue-jsx and @vue/babel-helper-vue-jsx-merge-props to gain babel 7 support Use proposal decorators with legacy decorators option set to true. This requires options to be set in the babel-eslint to support since legacy behavior is deprecated. Use loose interpretation for proposal class properties to support legacy proposal decorators. Proposal decorators must come before class properties in plugin declaration There were many stage-2 plugins that are not being used and were not installed: 'proposal-export-namespace-from' 'proposal-function-sent' 'proposal-json-strings' 'proposal-numeric-separator' 'proposal-throw-expressions' 'syntax-import-meta' @babel/polyfill now replaces babel-polyfill. @babel/polyfill is currently deprecated, and should be replaced in a future PR. Please see https://babeljs.io/docs/en/babel-polyfill for more details
Upgraded to latest patch version of vuepress to gain configFile: false fix for babel config. See vuejs/vuepress#797 for more details.
b029d5e
to
36a2a5f
Compare
Roadmap: I think Vue 2.7 will released, as the final "major" release for Vue. After that, only security and bugfixes will be done, no new features or significant changes. I think VTU will be similar, we will just patch bugs, and keep the dependencies up to date (eg, if we move to Jest, I think the workflow will be better and it will be easier to fix bugs etc). VTU 1.x = Vue 2 support |
Upgrade the babel config from babel 6 to babel 7. The goal here is to make sure VTU does not get too far behind on babel support. This is likely considered a larger maintenance item and may be replaced once typescript is fully implemented.
Build output is the same. I believe babel is only used for testing purposes here.
This includes a few subset of changes.
The vue-flow preset has been removed in favor or
direct plugin installation, including 'transform-flow-strip-types',
'syntax-flow', and ' proposal-class-properties'.
Use of 'transform-vue-jsx' plugin, using
@vue/babel-plugin-transform-vue-jsx
and@vue/babel-helper-vue-jsx-merge-props
to gain babel 7 support. This is handled by@vue/babel-preset-jsx
Use proposal decorators with legacy decorators option set to true. This
requires options to be set in the babel-eslint to support since legacy
behavior is deprecated.
Use loose interpretation for proposal class properties to support legacy
proposal decorators. Proposal decorators must come before class
properties in plugin declaration
There were many stage-2 plugins that are not being used and were not
installed:
'proposal-export-namespace-from'
'proposal-function-sent'
'proposal-json-strings'
'proposal-numeric-separator'
'proposal-throw-expressions'
'syntax-import-meta'
@babel/polyfill now replaces babel-polyfill. @babel/polyfill is
currently deprecated, and should be replaced in a future PR. Please see
https://babeljs.io/docs/en/babel-polyfill for more details
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:
dev
branch.fix #xxx[,#xxx]
, where "xxx" is the issue number)If adding a new feature, the PR's description includes:
Other information: