v6.13.0 (2016-08-04)
If you are getting an error like "Invalid options type for " then check that you have an updated version of babel-core/cli/etc. If you are using greenkeeper, it will fail because it will only update the preset and not the other packages.
Since the last release we've created https://github.com/babel/notes to track discussions on our slack and features/changes that could be added - definetely check it out if you're interested in Babel's development!
Please join #discussion on slack if you have questions and #development for dev
Some small but very important additions in this release:
Preset options (babel/notes)
Initially, presets were supposed to be one-off sets of plugins that didn't have any configuration. If you wanted to do something different you would make your own presets. There are > 600 presets on npm now. We want to give users more flexibility in certain cases: like when you want to pass the same option to multiple presets or to remove a default plugin.
loose
and modules
options for babel-preset-es2015
(#3331, #3627)
This has been rather annoying. Having to install babel-preset-es2015-loose-native-modules
seems rather crazy when it could be an option.
With #3627, you can pass 2 options in:
loose
- Enable "loose" transformations for any plugins in this preset that allow them (Disabled by default).modules
- Enable transformation of ES6 module syntax to another module type (Enabled by default to"commonjs"
).
Can befalse
to not transform modules, or one of["amd", "umd", "systemjs", "commonjs"]
// for loose and native modules
{
presets: [
["es2015", { "loose": true, "modules": false }]
]
}
Updates to babel-preset-stage-2
- #3613 Move the decorators transform.
- #3626 Make a more informative error message when using the default decorators transform and link to the legacy transform
- #3611 Move class properties transform.
Coming Up
babel-preset-es2017
,babel-preset-latest
(still deciding the name), supporting codemods, and more!
New Feature
babel-core
,babel-preset-es2015
- #3627 es2015: transpile the preset, modify modules option to support "amd,umd,systemjs" as well, tests. (@hzoo)
- #3331 Support passing options to presets.. (@loganfsmyth)
babel-preset-stage-1
,babel-preset-stage-2
- #3613 Move decorators to stage 2. (@doug-wade)
- #3611 Move
babel-plugin-transform-class-properties
to stage 2. (@kripod)
Bug Fix
babel-traverse
- #3557 Fix bug where
path.evaluate
treats repeated identifiers as undefined. (@erikdesjardins)
- #3557 Fix bug where
Polish
babel-plugin-transform-decorators
Internal
babel-types
babel-plugin-syntax-async-functions
,babel-plugin-syntax-async-generators
,babel-plugin-syntax-class-constructor-call
,babel-plugin-syntax-class-properties
,babel-plugin-syntax-decorators
,babel-plugin-syntax-do-expressions
,babel-plugin-syntax-exponentiation-operator
,babel-plugin-syntax-export-extensions
,babel-plugin-syntax-flow
,babel-plugin-syntax-function-bind
,babel-plugin-syntax-function-sent
,babel-plugin-syntax-jsx
,babel-plugin-syntax-object-rest-spread
,babel-plugin-syntax-trailing-function-commas
babel-plugin-transform-inline-environment-variables
,babel-plugin-transform-member-expression-literals
,babel-plugin-transform-merge-sibling-variables
,babel-plugin-transform-minify-booleans
,babel-plugin-transform-node-env-inline
,babel-plugin-transform-property-literals
,babel-plugin-transform-remove-console
,babel-plugin-transform-remove-debugger
,babel-plugin-transform-simplify-comparison-operators
,babel-plugin-transform-undefined-to-void
- Other
- #3622 Update mocha to version 3.0.0 🚀. (@greenkeeperio-bot)
Commiters: 7
- Daniel Tseng (kpman)
- Douglas Wade (doug-wade)
- Erik Desjardins (erikdesjardins)
- Greenkeeper (greenkeeperio-bot)
- Henry Zhu (hzoo)
- Kristóf Poduszló (kripod)
- Logan Smyth (loganfsmyth)