npm babel-preset-stage-3 6.17.0
v6.17.0

latest releases: 7.0.0-beta.3, 7.0.0-beta.2, 7.0.0-beta.1...
7 years ago

v6.17.0 (2016-10-01)

If you have questions please join our slack: https://slack.babeljs.io

👓 Spec Compliancy

  • babel-preset-stage-2, babel-preset-stage-3

tc39/proposals@96f8d79

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"]
}
  • #4611 Move object-rest-spread to stage-3. (@hzoo)

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

  • babel-generator

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
    • #4635 Forward bound shadowed function when hoisting identifiers. (@danez)
    • #4620 Resolve presets with named exports correctly. (@danez)
  • babel-generator
  • babel-plugin-transform-es2015-parameters
    • #4636 Fix rest parameters with flow type casting. (@danez)
  • babel-plugin-transform-flow-comments
    • #4623 Fix regression in transform-flow-comments for class properties. (@danharper)

First PR!

Don't miss a new babel-preset-stage-3 release

NewReleases is sending notifications on new releases.