Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7c1a924ef6 | ||
|
|
1d975a2635 | ||
|
|
67cfdbd447 | ||
|
|
ab02231d39 |
@@ -1,3 +1,7 @@
|
||||
# 1.14.14
|
||||
|
||||
* Fix template literals escaping.
|
||||
|
||||
# 1.14.13
|
||||
|
||||
* Fix let scoping of `while` loops.
|
||||
|
||||
@@ -11,7 +11,7 @@ exports.Function = function (node, parent, file, scope) {
|
||||
return t.getIds(param);
|
||||
});
|
||||
|
||||
var closure = false;
|
||||
var iife = false;
|
||||
|
||||
_.each(node.defaults, function (def, i) {
|
||||
if (!def) return;
|
||||
@@ -29,7 +29,7 @@ exports.Function = function (node, parent, file, scope) {
|
||||
}
|
||||
|
||||
if (scope.has(node.name)) {
|
||||
closure = true;
|
||||
iife = true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -40,7 +40,7 @@ exports.Function = function (node, parent, file, scope) {
|
||||
// we're accessing a variable that's already defined within this function
|
||||
var has = scope.get(param.name);
|
||||
if (has && !_.contains(node.params, has)) {
|
||||
closure = true;
|
||||
iife = true;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -55,7 +55,7 @@ exports.Function = function (node, parent, file, scope) {
|
||||
}, true));
|
||||
});
|
||||
|
||||
if (closure) {
|
||||
if (iife) {
|
||||
var container = t.functionExpression(null, [], node.body, node.generator);
|
||||
container._aliasFunction = true;
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ exports.TemplateLiteral = function (node) {
|
||||
var nodes = [];
|
||||
|
||||
_.each(node.quasis, function (elem) {
|
||||
nodes.push(t.literal(elem.value.raw));
|
||||
nodes.push(t.literal(elem.value.cooked));
|
||||
|
||||
var expr = node.expressions.shift();
|
||||
if (expr) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "6to5",
|
||||
"description": "Turn ES6 code into readable vanilla ES5 with source maps",
|
||||
"version": "1.14.13",
|
||||
"version": "1.14.14",
|
||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||
"homepage": "https://github.com/6to5/6to5",
|
||||
"repository": {
|
||||
|
||||
Reference in New Issue
Block a user