TheThingsNetwork / lorawan-stack

The Things Stack, an Open Source LoRaWAN Network Server
https://www.thethingsindustries.com/stack/
Apache License 2.0
975 stars 306 forks source link

Consider moving to babel 7 #34

Closed johanstokking closed 5 years ago

johanstokking commented 5 years ago

Summary: Babel 7 has been released and there introducing quite many changes that can affect us as well.

At the moment the only package requiring the newest babel version is @storybook/react, but I can image that later there will be more. This issue is rather low priority and we can using babel 6 for quite a while.

For reference, the announcement post. Especially the major breaking changes, to quote:

  • Drop support for un-maintained Node versions: 0.10, 0.12, 4, 5 (details)
  • Move us to the @babel namespace by switching to using "scoped" packages (details). This helps differentiate official packages, so babel-core becomes @babel/core (and no squatting)
  • Remove (and stop publishing) any yearly presets (preset-es2015, etc) (details). @babel/preset-env replaces the need for these as it includes all yearly additions as well as the ability to target a specific set of browsers
  • Also drop the "Stage" presets (@babel/preset-stage-0, etc) in favor of opting into individual proposals. Similarly remove proposals from @babel/polyfill by default (details). Please consider reading the whole post on this for more explanation.
  • Some packages have renames: any TC39 proposal plugin will now be -proposal instead of -transform (details). So @babel/plugin-transform-class-properties becomes @babel/plugin-proposal-class-properties.
  • Introduce a peerDependency on @babel/core for certain user-facing packages (e.g. babel-loader, @babel/cli, etc) (details)

Original issue: https://github.com/TheThingsIndustries/lorawan-stack/issues/1186 by @bafonins

johanstokking commented 5 years ago

Consider this as part of #11