v5.6.21
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"name": "babel",
|
||||
"version": "5.6.21",
|
||||
"description": "Turn ES6 code into readable vanilla ES5 with source maps",
|
||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||
"homepage": "https://babeljs.io/",
|
||||
@@ -7,7 +8,7 @@
|
||||
"repository": "babel/babel",
|
||||
"preferGlobal": true,
|
||||
"dependencies": {
|
||||
"babel": "*",
|
||||
"babel": "^5.6.21",
|
||||
"chokidar": "^1.0.0",
|
||||
"commander": "^2.6.0",
|
||||
"convert-source-map": "^1.1.0",
|
||||
@@ -26,4 +27,4 @@
|
||||
"babel-external-helpers": "./bin/babel-external-helpers.js",
|
||||
"babel-plugin": "./bin/babel-plugin.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"name": "babel-runtime",
|
||||
"version": "5.6.21",
|
||||
"description": "babel selfContained runtime",
|
||||
"license": "MIT",
|
||||
"repository": "babel/babel",
|
||||
@@ -7,4 +8,4 @@
|
||||
"dependencies": {
|
||||
"core-js": "^0.9.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"name": "babel-core",
|
||||
"version": "5.6.21",
|
||||
"description": "A compiler for writing next generation JavaScript",
|
||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||
"homepage": "https://babeljs.io/",
|
||||
@@ -41,7 +42,7 @@
|
||||
"babel-plugin-runtime": "^1.0.7",
|
||||
"babel-plugin-undeclared-variables-check": "^1.0.2",
|
||||
"babel-plugin-undefined-to-void": "^1.1.6",
|
||||
"babylon": "*",
|
||||
"babylon": "^5.6.21",
|
||||
"bluebird": "^2.9.33",
|
||||
"chalk": "^1.0.0",
|
||||
"convert-source-map": "^1.1.0",
|
||||
@@ -74,4 +75,4 @@
|
||||
"to-fast-properties": "^1.0.0",
|
||||
"trim-right": "^1.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -56,6 +56,10 @@ export function getCompletionRecords(): Array {
|
||||
add(this.get("body").pop());
|
||||
} else if (this.isFunction()) {
|
||||
return this.get("body").getCompletionRecords();
|
||||
} else if (this.isTryStatement()) {
|
||||
add(this.get("block"));
|
||||
add(this.get("handler"));
|
||||
add(this.get("finalizer"));
|
||||
} else {
|
||||
paths.push(this);
|
||||
}
|
||||
|
||||
@@ -156,19 +156,18 @@ export function replaceExpressionWithStatements(nodes: Array) {
|
||||
|
||||
// add implicit returns to all ending expression statements
|
||||
var last = this.get("callee").getCompletionRecords();
|
||||
for (var i = 0; i < last.length; i++) {
|
||||
var lastNode = last[i];
|
||||
if (lastNode.isExpressionStatement()) {
|
||||
var loop = lastNode.findParent((path) => path.isLoop());
|
||||
if (loop) {
|
||||
var uid = this.get("callee").scope.generateDeclaredUidIdentifier("ret");
|
||||
this.get("callee.body").pushContainer("body", t.returnStatement(uid));
|
||||
lastNode.get("expression").replaceWith(
|
||||
t.assignmentExpression("=", uid, lastNode.node.expression)
|
||||
);
|
||||
} else {
|
||||
lastNode.replaceWith(t.returnStatement(lastNode.node.expression));
|
||||
}
|
||||
for (var lastNode of (last: Array)) {
|
||||
if (!lastNode.isExpressionStatement()) continue;
|
||||
|
||||
var loop = lastNode.findParent((path) => path.isLoop());
|
||||
if (loop) {
|
||||
var uid = this.get("callee").scope.generateDeclaredUidIdentifier("ret");
|
||||
this.get("callee.body").pushContainer("body", t.returnStatement(uid));
|
||||
lastNode.get("expression").replaceWith(
|
||||
t.assignmentExpression("=", uid, lastNode.node.expression)
|
||||
);
|
||||
} else {
|
||||
lastNode.replaceWith(t.returnStatement(lastNode.node.expression));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
{
|
||||
"name": "babylon",
|
||||
"version": "5.6.21",
|
||||
"description": "",
|
||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||
"homepage": "https://babeljs.io/",
|
||||
"license": "MIT",
|
||||
"repository": "babel/babel",
|
||||
"main": "lib/index.js"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user