Contents
steps to follow to update a package to babel 7
- See if there is a new upstream version that already uses babel 7 and update if available
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~)
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 -> https://babeljs.io/docs/en/v7-migration
Reverse build dependencies of node-babylon
babylon is @babel/parser in babel 7
- node-flow-remove-types - upstream project archived, should be removed
vue-router.js, vue.js - https://github.com/vuejs/vue/issues/11406 rollup-plugin-flow-no-whitespace -> flow-remove-types-no-whitespace -> babylon
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)
- autosize.js - praveen
- node-babel-plugin-lodash - praveen
- node-colormin - praveen
- node-css-loader - praveen
TODO
- node-deep-for-each
- node-es6-promise - Tunji
- node-handlebars - praveen
- node-i18next-http-backend
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.
- node-eslint-plugin-flowtype
- node-es6-error
Confirmed in unstable
node-postcss-modules-values, node-postcss-modules-extract-imports, node-webassemblyjs
node-postcss-filter-plugins - no reverse dependencies, sent pull request upstream https://github.com/postcss/postcss-filter-plugins/pull/23