Skip to content

Releases: babel/babel

v6.10.0

11 Jun 04:18
Compare
Choose a tag to compare

6.10.0 (2016-06-11)

New Feature

  • babel-cli: Add a new option --skip-initial-build (#3489) (@lxe)
  • Do not compile files before watching
$ babel src -d dest --watch --skip-initial-build

Bug Fix

  • babel-plugin-transform-es2015-block-scoping: Create a new lexical environment inside switch statement blocks for identifier bindings (#3490, T7324) (@jayphelps)
let foo = false;

switch (true) {
  default:
    let foo = true;
}

alert(foo); // should be false
  • babel-types, babel-generator: Support changes in flow parsing in babylon

Add support for a TypeParameter node.

type A<T = string> = T;
class A<S = number, T: ?string = string> {};

Documentation

v6.9.2

29 May 23:19
Compare
Choose a tag to compare

6.9.2 (2016-05-29)

Fixup missing dependency.

Bug Fix

  • babel-runtime: Fix an issue with getting Cannot find module 'regenerator-runtime' because it was set as a devDependency instead of a dependency.

v6.9.1

29 May 19:51
Compare
Choose a tag to compare

6.9.1 (2016-05-29)

Also released 6.9.2 to fix a missing dependency issue for the switch to regenerator-runtime

Just 2 fixes this release!

  • A class property fix (set this correctly when using async arrow function class properties without a super class).
  • A fix for react-constant-elements plugin to help optimize react more (the plugin wasn't applying to JSX with text).

Also, thanks to @mucsi96 for catching the extraneous code coverage comments we were leaving when publishing!

We are removing/deprecating babel-regenerator-runtime in favor of depending on the original regenerator-runtime since the differences are resolved. Thanks to (@benjamn) for the suggestion to maintain it (and for originally creating it!).

Bug Fix

  • babel-core
    • #3508 Assign _this to this when there is no Superclass in a Class when using class properties. Fixes T7364. (@ehjay)

The fix correctly set this: var _this; -> var _this = this;

// input
class MyClass {
  myAsyncMethod = async () => {
    console.log(this);
  }
}

// output
class MyClass {
  constructor() {
    var _this = this; // _this wasn't being set to `this`
    this.myAsyncMethod = babelHelpers.asyncToGenerator(function* () {
      console.log(_this);
    });
  }
}
  • babel-plugin-transform-react-constant-elements, babel-types

JSX with text in it was not being hoisted as other constant elements.

// input
var Foo = React.createClass({
  render() {
    return <div>Text</div>; // text wasn't considered constant
  }
});

// output
var _ref = <div>Text</div>;

var Foo = React.createClass({
  render() {
    return _ref;
  }
});

Internal

  • #3513 Make sure the env is production when publishing. (@hzoo)
  • babel-regenerator-runtime
  • babel-core
    • #3446 Use more ideal mocha hooks in babel-core/test/api. (@jmm)
  • babel-polyfill, babel-regenerator-runtime, babel-runtime
    • #3494 Use regenerator-runtime from npm; removed babel-regenerator-runtime fork since there aren't differences anymore. (@benjamn)

v6.9.0

17 May 18:54
Compare
Choose a tag to compare

6.9.0 (2016-05-17)

If npm is saying there is no version, then check with npm dist-tag ls babel-traverse rather than the website since the site is cached and mgiht be out of date.

  • Update core-js from 2.1.0 to 2.4.0. Check the releases for more info.
  • Add a systemGlobal option in the systemjs transform.
["transform-es2015-modules-systemjs", {
  // outputs scoped_system.register(...)
  "systemGlobal": "scoped_system" // defaults to System.register
}]
  • Bug fixes for class-properties and react-jsx-source plugins.

New Feature

  • babel-types
    • #3470 Add validation of type fields for parameter decorators. (@shuhei)
  • babel-plugin-transform-runtime, babel-polyfill, babel-register, babel-runtime
  • babel-plugin-transform-es2015-modules-systemjs
    • #3482 Add systemGlobal option to allow changing the System in System.register to be systemGlobal. Also move use strict wrapping. (@guybedford)

Bug Fix

  • babel-plugin-transform-react-jsx-source
  • babel-plugin-transform-class-properties
    • #3486 Add path.ensureBlock for ArrowFunctionExpression in a ClassExpression when there is a ClassProperty. (@jhen0409)
  • babel-traverse
  • babel-plugin-transform-es2015-parameters

Documentation

Internal

Upgrade to lodash 4.

  • babel-traverse
    • #3501 Remove repeating dependency from babel-traverse. (@dlwalsh)
  • babel-helper-fixtures
    • #3502 Replace trim-right with _.trimEnd in babel-helper-fixtures. (@dlwalsh)
  • babel-generator
    • #3500 Remove micro dependencies in favour of lodash functions for babel-generator. (@dlwalsh)
  • babel-cli, babel-core, babel-generator, babel-helper-builder-react-jsx, babel-helper-define-map, babel-helper-fixtures, babel-helper-regex, babel-helper-transform-fixture-test-runner, babel-plugin-transform-es2015-block-scoping, babel-plugin-transform-es2015-function-name, babel-plugin-transform-proto-to-assign, babel-preset-es2015, babel-register, babel-runtime, babel-template, babel-traverse, babel-types

Thanks to amasad, dlwalsh, forivall, frantic, graingert, guybedford, jayphelps, jhen0409, loganfsmyth, shuhei, zloirock!

v6.8.1

03 May 00:46
Compare
Choose a tag to compare

Bug Fix (Regression)

v6.8.0

02 May 23:54
Compare
Choose a tag to compare

6.8.0 (2016-05-02)

Babel is now compiled with Babel 6!

Why this is relevant

TLDR: This fixes the npm deduping issues regarding babel-runtime 5 and 6.

  • Because all Babel packages were compiled with Babel 5 and using babel-runtime@5, npm can't dedupe any of them given if a consumer of Babel also added a dependency on babel-runtime@6.

Example:

└─┬ babel-plugin-transform-exponentiation-operator@6.5.0
  ├─┬ babel-helper-builder-binary-assignment-operator-visitor@6.6.5
  │ ├─┬ babel-helper-explode-assignable-expression@6.6.5
  │ │ └── babel-runtime@5.8.38
  │ └── babel-runtime@5.8.38
  ├─┬ babel-plugin-syntax-exponentiation-operator@6.5.0
  │ └── babel-runtime@5.8.38
  └── babel-runtime@5.8.38

Now it should be more like:

└─┬ babel-runtime@6.8.0
└─┬ babel-plugin-transform-exponentiation-operator@6.8.0
  ├─┬ babel-helper-builder-binary-assignment-operator-visitor@6.8.0
  │ ├─┬ babel-helper-explode-assignable-expression@6.8.0
  ├─┬ babel-plugin-syntax-exponentiation-operator@6.8.0

Related issues: T7252, T7275, T6689, sindresorhus/ava#660, vuejs/vue-loader#96, etc.

Internal

Misc

v6.7.7

21 Apr 03:11
Compare
Choose a tag to compare

Bug Fix

  • babel-code-frame
    • #3464 - Handle tab-indented code when marking errors (@lydell)
  • babel-core
  • babel-generator

Misc

  • babel-plugin-transform-es2015-modules-commonjs
  • babel-generator, babel-types

v6.7.6

21 Apr 03:11
Compare
Choose a tag to compare

v6.7.5

08 Apr 03:30
Compare
Choose a tag to compare

Bug Fix

  • babel-traverse
  • babel-core/babel-cli
    • #3448: Make sure input to path.{dir,base}name is a string. (@addaleax)
    • #3451: Handle input sourcemaps with mappings to nothing to better support sourcemaps from other tools in a pipeline. (@loganfsmyth)
  • babel-helper-builder-react-jsx
    • #3444: Preserve whitespace in JSXExpressionContainer StringLiteral children. (@drd)
  • babel-generator
    • #3421: Wrap parens around default exports starting with function/class. (@loganfsmyth)

Misc

  • babel-plugin-transform-runtime
  • babel-traverse

v6.7.4

23 Mar 03:50
Compare
Choose a tag to compare

Bug Fix

  • babel-traverse
  • babel-runtime
  • babel-plugin-transform-react-jsx
    • #3430: Stop the JSX transform from using an AST node in two places. (@amasad)

Misc

Internal

  • #3400: Fix an issue that could cause a local clone of Babel to error out if the github repo was in a location with a parent .babelrc file. (@callumlocke)
  • #3431: Fix an issue that was causing the local-development watcher to occasionally rebuild with the incorrect file content. (@loganfsmyth)
  • #3436: Update our linting utility version. (@hzoo)
  • #3437: Remove an unused dependency. (@hzoo)
  • babel-core