Releases: babel/babel
v6.10.0
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
- Clean up language/consistency in CONTRIBUTING.md (#3517) (@kaicataldo)
- Fix up broken links in monorepo.md (#3519) (@koenkivits)
v6.9.2
v6.9.1
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 originalregenerator-runtime
since the differences are resolved. Thanks to (@benjamn) for the suggestion to maintain it (and for originally creating it!).
Bug Fix
babel-core
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
v6.9.0
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
from2.1.0
to2.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
andreact-jsx-source
plugins.
New Feature
babel-types
babel-plugin-transform-runtime
,babel-polyfill
,babel-register
,babel-runtime
babel-plugin-transform-es2015-modules-systemjs
- #3482 Add
systemGlobal
option to allow changing theSystem
inSystem.register
to besystemGlobal
. Also moveuse strict
wrapping. (@guybedford)
- #3482 Add
Bug Fix
babel-plugin-transform-react-jsx-source
babel-plugin-transform-class-properties
babel-traverse
babel-plugin-transform-es2015-parameters
- #3481 also visit
ClassProperty
for rest param deopt check, fixes T7311. (@jayphelps)
- #3481 also visit
Documentation
- #3498 Fix grammar in CHANGELOG. (@graingert)
Internal
Upgrade to lodash 4.
babel-traverse
babel-helper-fixtures
babel-generator
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
v6.8.0
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
- #3438 Self host on babel6. (@hzoo)
- #3477 turn transform into a simple
for
loop. (@mattkrick)
Misc
v6.7.7
Bug Fix
babel-code-frame
babel-core
- #3422 - Insert
this
references inconstructor
aftersuper()
(@loganfsmyth)
- #3422 - Insert
babel-generator
- #3463 - Better sourcemaps for function bodies (@loganfsmyth)
Misc
babel-plugin-transform-es2015-modules-commonjs
babel-generator
,babel-types
- #3475 - Performance improvements for the code generator (@loganfsmyth)
v6.7.6
babel-traverse
- #3458: Revert PR #3433 which introduced https://phabricator.babeljs.io/T7272 (@loganfsmyth)
v6.7.5
Bug Fix
babel-traverse
- #3433: Only attempt to rename export declarations, not expressions. (@loganfsmyth)
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
babel-generator
- #3421: Wrap parens around default exports starting with function/class. (@loganfsmyth)
Misc
babel-plugin-transform-runtime
- #3258: Expanded documentation (@trodrigues)
- #3441: Improve babel-code-frame. Kill the line-numbers dependency. (@lydell)
babel-traverse
- #3442: Remove the old NodePath validation check (@loganfsmyth)
- #3447: Stop traversing when target type is found. (@nkzawa)
v6.7.4
Bug Fix
babel-traverse
-
#3419: Keep the context stack balanced to ensure that contexts are properly popped off. (@loganfsmyth)
This bug was causing issues internally because the context system relies on the queues being balanced when deciding what nodes need to be re-processed and which do not. When it becomes imbalanced, nodes can be forgotten or skipped, causing issues like https://phabricator.babeljs.io/T7199 which broke ES6 modules on IE8 with the ES3 transforms.
-
#3420: Invalidate the scope cache when nodes are moved. (@loganfsmyth)
This bug was causing scoping issues in some cases if a node was moved to a new location that was not nested inside a new scope. When this case was hit, the old cached scope would be used, causing issues like https://phabricator.babeljs.io/T7194, https://phabricator.babeljs.io/T6934, and https://phabricator.babeljs.io/T6728.
-
babel-runtime
babel-plugin-transform-react-jsx
Misc
babel-traverse
- #3432: Fix a spelling mistake in an error message. (@simeonwillbanks)
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