v6.17.0 (2016-10-01)
If you have questions please join our slack: https://slack.babeljs.io
👓 Spec Compliancy
Specification repo: https://github.com/tc39/proposal-async-iteration
Asynchronous Iteration was already added in 6.16.0 under stage-2 but it was moved to stage-3 at the latest TC-39 meeting.
// async generator syntax
async function* agf() {}
// for-await statement
async function f() {
for await (let x of y) {
g(x);
}
}
To use it as a standalone plugin:
{
"plugins": ["transform-async-generator-functions"]
}
With the stage-3 preset (or below):
{
"presets": ["stage-3"]
}
Similarly, object-rest-spread is now also at stage-3.
https://twitter.com/sebmarkbage/status/781564713750573056
tc39/proposals@142ac3c
// Rest properties
let { x, y, ...z } = { x: 1, y: 2, a: 3, b: 4 };
console.log(x); // 1
console.log(y); // 2
console.log(z); // { a: 3, b: 4 }
// Spread properties
let n = { x, y, ...z };
console.log(n); // { x: 1, y: 2, a: 3, b: 4 }
To use it as a standalone plugin:
{
"plugins": ["transform-object-rest-spread"]
}
With the stage-3 preset (or below):
{
"presets": ["stage-3"]
}
🚀 New Feature
References:
Adds a retainFunctionParens
to babel-generator
. This option will retain the parentheses around an IIFE.
// parens are stripped without the option
__d('x', (function () {}));
🐛 Bug Fix
babel-core
babel-generator
babel-plugin-transform-es2015-parameters
babel-plugin-transform-flow-comments
- #4623 Fix regression in transform-flow-comments for class properties. (@danharper)
First PR!
- Bruno Jouhier (bjouhier)