npm babel-preset-stage-3 6.22.0
v6.22.0

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

6.22.0 (2017-01-19)

Thanks to 10 new contributors! (23 total)

A quick update since it's been over a month already: adds support for shorthand import syntax in Flow + some fixes!

We'll be merging in our current 7.0 PRs on a 7.0 branch soon and I'l be making some more issues (most should be beginner-friendly).

To follow our progress check out our 7.0 milestone, the wiki and upcoming announcements on twitter!

We support stripping out and generating the new shorthand import syntax in Flow (parser support was added in babylon@6.15.0.

import {
  someValue,
  type someType,
  typeof someOtherValue,
} from "blah";

πŸš€ New Feature

  • babel-generator, babel-types
  • babel-plugin-transform-flow-strip-types, babel-traverse
    • #5035 Strip Flow's new shorthand import-type specifiers. (@jeffmo)
  • babel-core
    • #4729 Add resolvePlugin and resolvePreset methods to babel-core API. (@rmacklin)

πŸ› Bug Fix

  • babel-plugin-transform-object-rest-spread
const { x, ...y } = foo();

Old Behavior

const { x } = foo();
const y = _objectWithoutProperties(foo(), ["x"]);

New/Expected Behavior

const _ref = foo(); // should only be called once
const { x } = _ref; 
const y = _objectWithoutProperties(_ref, ["x"]);
  • babel-cli
  • babel-plugin-transform-object-rest-spread

Accounts for default values in object rest params

function fn({a = 1, ...b} = {}) {
  return {a, b};
}
  • babel-plugin-transform-es2015-destructuring
const assign = ([...arr], index, value) => {
  arr[index] = value
  return arr
}

const arr = [1, 2, 3]
assign(arr, 1, 42)
console.log(arr) // [1, 2, 3]
  • babel-plugin-transform-es2015-function-name
    • #5008 Don't try to visit ArrowFunctionExpression, they cannot be named. (@Kovensky)

Input

export const x = ({ x }) => x;
export const y = function () {};

Output

export const x = ({ x }) => x;
export const y = function y() {}; 
  • babel-types
    • #5068 Fix getBindingIdentifiers in babel-types. (@rtsao)
  • babel-cli
    • #3698 Watch mode should wait for file write. (T7411) (@hayeah)

πŸ’… Polish

  • babel-traverse
    • #5076 Optimize removal-hooks for ArrowFunctions. (@danez)
  • babel-generator, babel-plugin-transform-exponentiation-operator

πŸ“ Documentation

  • Other
  • babel-core
  • babel-plugin-syntax-class-constructor-call
    • #5130 update syntax-class-constructor-call documentation. (@xtuc)
  • babel-plugin-transform-es2015-duplicate-keys, babel-plugin-transform-es2015-parameters
    • #5111 Fixes some inconsistent documentation. (@xtuc)
  • babel-plugin-transform-es2015-computed-properties, babel-plugin-transform-es2015-for-of
  • babel-plugin-transform-class-properties
    • #5077 Static function call result comment does not match variable content [skip ci]. (@kasn)
  • Other
  • babel-plugin-transform-es2015-classes, babel-plugin-transform-function-bind
  • babel-helpers
    • #5059 Fix incorrect snippet language in babel-helpers. (@xtuc)
  • babel-preset-react
  • babel-plugin-check-es2015-constants, babel-plugin-transform-es2015-modules-umd, babel-plugin-transform-es2015-typeof-symbol, babel-register
  • babel-core

🏠 Internal

  • babel-*
  • babel-helper-transform-fixture-test-runner
  • babel-cli, babel-core, babel-generator, babel-helper-define-map, babel-register, babel-runtime, babel-types
    • #5043 Replace "lodash/is*" and "lodash/each" with native equivalents. (@zertosh)
  • babel-cli, babel-generator, babel-helper-fixtures, babel-helper-transform-fixture-test-runner, babel-preset-es2015, babel-runtime, babel-traverse
    • #5042 Use native or lodash util module where full "lodash" is required. (@zertosh)
  • babel-code-frame
  • babel-plugin-transform-react-jsx
  • babel-plugin-transform-decorators
  • babel-plugin-transform-es2015-computed-properties
  • babel-cli

Committers: 23, First PRs: 10

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

NewReleases is sending notifications on new releases.