Compare commits

...

6 Commits

Author SHA1 Message Date
Sebastian McKenzie
725906a7dc v5.6.1 2015-06-21 00:05:13 +01:00
Sebastian McKenzie
13d5c94b8b update transformation tests 2015-06-21 00:03:29 +01:00
Sebastian McKenzie
85308a1e8c fix super spread in loose mode 2015-06-21 00:01:19 +01:00
Sebastian McKenzie
83bcaba1a5 downgrade to babel 5.5.7 2015-06-21 00:01:11 +01:00
Sebastian McKenzie
185648cb2c 5.6.0 2015-06-20 23:44:46 +01:00
Sebastian McKenzie
be355fc1c6 fix build-runtime script 2015-06-20 23:37:46 +01:00
10 changed files with 52 additions and 16 deletions

View File

@@ -13,6 +13,36 @@ _Note: Gaps between patch versions are faulty/broken releases._
See [CHANGELOG - 6to5](CHANGELOG-6to5.md) for the pre-4.0.0 version changelog.
## 5.6.0
* **Bug Fix**
* Fix istanbul interop for register hook when registering for non-existence extension.
* Fix super class constructor call differing for no constructor in derived classes.
* Disable module import receiver when in loose mode.
* Fix duplicate filenames when using `babel` CLI when passing multiple matching patterns.
* Register labels as bindings to fix undeclared variable checks.
* **Polish**
* Remove unnecessary string binary expressions when transforming template literals.
* Support module live bindings in arbitary positions not in Program statement position.
* Throw error when attemping to replace a `Program` root node with another node not of type `Program`.
* Optimise rest parameters in spread element position and allocate rest array at the earliest common ancestor of all references.
* Generate original number representation when value was not changed.
* Check for invalid binding identifiers when generating inferred method names.
* Don't terminate CLI when watching files fail compilation on init.
* **New Feature**
* Add new plugin API.
* **Internal**
* Split react displayName addition into a plugin.
* Add check for `JSXMemberExpression` to `t.isReferenced`.
* Move `validation.undeclaredVariableCheck` transformer up.
* Start great core-to-plugin exodus.
* Add `BindingIdentifier` virtual type.
* Hidden class optimisations.
* Array allocation optimisations.
* Update `regenerator`.
* Update `js-tokens`.
* Sync with upstream Acorn.
## 5.5.8
* **Internal**

View File

@@ -1,7 +1,7 @@
{
"name": "babel-core",
"description": "A compiler for writing next generation JavaScript",
"version": "5.6.0",
"version": "5.6.1",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
"license": "MIT",
@@ -77,7 +77,7 @@
"trim-right": "^1.0.0"
},
"devDependencies": {
"babel": "5.5.8",
"babel": "5.5.7",
"browserify": "^9.0.8",
"chai": "^2.2.0",
"eslint": "^0.21.2",

View File

@@ -1,14 +1,14 @@
{
"name": "babel",
"description": "Turn ES6 code into readable vanilla ES5 with source maps",
"version": "5.5.8",
"version": "5.6.0",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
"license": "MIT",
"repository": "babel/babel",
"preferGlobal": true,
"dependencies": {
"babel-core": "^5.5.8",
"babel-core": "^5.6.0",
"chokidar": "^1.0.0",
"commander": "^2.6.0",
"convert-source-map": "^1.1.0",
@@ -26,4 +26,4 @@
"babel-external-helpers": "./bin/babel-external-helpers",
"babel-plugin": "./bin/babel-plugin/index.js"
}
}
}

View File

@@ -1,7 +1,7 @@
{
"name": "babel-runtime",
"description": "babel selfContained runtime",
"version": "5.5.8",
"version": "5.6.0",
"license": "MIT",
"repository": "babel/babel",
"author": "Sebastian McKenzie <sebmck@gmail.com>",

View File

@@ -75,7 +75,7 @@ writeFile("regenerator/runtime.js", selfContainify(readFile("regenerator/runtime
//
var coreDefinitions = require("../lib/babel/transformation/transformers/other/runtime/definitions");
var coreDefinitions = require("babel-plugin-runtime/lib/definitions");
var paths = ["is-iterable", "get-iterator"];

View File

@@ -169,7 +169,13 @@ export default class ReplaceSupers {
if (methodName.name === "constructor") {
// constructor() { super(); }
return t.memberExpression(superRef, t.identifier("call"));
if (parent.arguments.length === 2 && t.isSpreadElement(parent.arguments[1]) && t.isIdentifier(parent.arguments[1].argument, { name: "arguments" })) {
// special case single arguments spread
parent.arguments[1] = parent.arguments[1].argument;
return t.memberExpression(superRef, t.identifier("apply"));
} else {
return t.memberExpression(superRef, t.identifier("call"));
}
} else {
id = superRef;

View File

@@ -1,7 +1,7 @@
import * as t from "../../../types";
function getSpreadLiteral(spread, scope) {
if (scope.hub.file.isLoose("es6.spread")) {
if (scope.hub.file.isLoose("es6.spread") && !t.isIdentifier(spread.argument, { name: "arguments" })) {
return spread.argument;
} else {
return scope.toArray(spread.argument, true);

View File

@@ -10,7 +10,7 @@ var Test = (function (_Foo) {
_Foo.call(this);
_Foo.prototype.test.call(this);
_Foo.call.apply(_Foo, [this].concat(babelHelpers.slice.call(arguments)));
_Foo.apply(this, arguments);
_Foo.call.apply(_Foo, [this, "test"].concat(babelHelpers.slice.call(arguments)));
(_Foo$prototype$test = _Foo.prototype.test).call.apply(_Foo$prototype$test, [this].concat(babelHelpers.slice.call(arguments)));
@@ -36,4 +36,4 @@ var Test = (function (_Foo) {
};
return Test;
})(Foo);
})(Foo);

View File

@@ -4,7 +4,7 @@ var BaseController = (function (_Chaplin$Controller) {
function BaseController() {
babelHelpers.classCallCheck(this, BaseController);
_Chaplin$Controller.call.apply(_Chaplin$Controller, [this].concat(babelHelpers.slice.call(arguments)));
_Chaplin$Controller.apply(this, arguments);
}
babelHelpers.inherits(BaseController, _Chaplin$Controller);
@@ -15,9 +15,9 @@ var BaseController2 = (function (_Chaplin$Controller$Another) {
function BaseController2() {
babelHelpers.classCallCheck(this, BaseController2);
_Chaplin$Controller$Another.call.apply(_Chaplin$Controller$Another, [this].concat(babelHelpers.slice.call(arguments)));
_Chaplin$Controller$Another.apply(this, arguments);
}
babelHelpers.inherits(BaseController2, _Chaplin$Controller$Another);
return BaseController2;
})(Chaplin.Controller.Another);
})(Chaplin.Controller.Another);

View File

@@ -4,9 +4,9 @@ var Test = (function (_Foo) {
function Test() {
babelHelpers.classCallCheck(this, Test);
_Foo.call.apply(_Foo, [this].concat(babelHelpers.slice.call(arguments)));
_Foo.apply(this, arguments);
}
babelHelpers.inherits(Test, _Foo);
return Test;
})(Foo);
})(Foo);