steps to follow to update a package to babel 7

  1. See if there is a new upstream version that already uses babel 7 and update if available
  2. Update build dependencies, add node-babel7 and remove node-babel-* if the plugin is part of node-babel7, check apt-file list node-babel7 | grep <plugin name>. Update build dependencies: node-rollup-plugin-babel (>= 4.4~), node-gulp-babel (>= 8.0~)

  3. Edit .babelrc/package.json/gulpfile*/gruntfile*/rollup.config*/webpack.config* and update presets and plugin names (see rails as an example). env => @babel/env. See node-puka for updating module names. Some plugin names have changed transform => proposal

Also refer upstream migration guide ->

Reverse build dependencies of node-babylon

babylon is @babel/parser in babel 7

Reverse build dependencies of node-babel-plugin-add-module-exports

Use @babel/plugin-proposal-export-default-from. See node-eslint-plugin-flowtype. May be breaking change. We can keep this plugin as it works with babel 7 as well.

Need to verify build with node-babel-plugin-add-module-exports 1.0 in experimental See 990493 for details.

How to verify: Build with node-babel-plugin-add-module-exports (>= 1.0~) in experimental and compare non minified build output with current version in the archive.

DONE (in experimental)


DONE (in unstable) but needs review to confirm it did not introduce breaking change

If the package or reverse dependencies does not have any tests enabled, use upstream test suite or even better send a pull request and check upstream ci results.

Confirmed in unstable

node-postcss-modules-values, node-postcss-modules-extract-imports, node-webassemblyjs