Compare commits

...

7 Commits

Author SHA1 Message Date
Sebastian McKenzie
0e6bd3ed08 v2.13.6 2015-01-24 11:13:59 +11:00
Sebastian McKenzie
95a3a02469 disable failing let scoping test 2015-01-24 11:10:18 +11:00
Sebastian McKenzie
1a0cad2ac1 add new expression as a valid conditional expression parent for parantheses insertion - fixes #578 2015-01-24 10:29:34 +11:00
Sebastian McKenzie
fe594dfe0c Merge pull request #572 from assaf/master
Added test case for issue #564
2015-01-23 07:12:02 +11:00
Assaf Arkin
4fe6ad43c1 Added test case for issue #564 2015-01-22 10:19:45 -08:00
Sebastian McKenzie
738203485c Merge pull request #569 from caspervonb/makefile-open
Use $BROWSER with fallbacks for opening browser tests
2015-01-22 16:05:56 +11:00
Casper Beyer
5218d07b0d Use $BROWSER with fallbacks for opening browser tests 2015-01-22 12:45:47 +08:00
4 changed files with 20 additions and 4 deletions

View File

@@ -65,7 +65,10 @@ test-browser:
node $(BROWSERIFY_CMD) -e test/_browser.js >dist/6to5-test.js
rm -rf templates.json tests.json
test -n "`which open`" && open test/browser.html
if [ -n $$BROWSER ]; then $$BROWSER test/browser.html; \
elif which xdg-open > /dev/null; then xdg-open 'test/browser.html'; \
elif which gnome-open > /dev/null; then gnome-open 'test/browser.html'; \
elif which open > /dev/null; then open 'test/browser.html'; fi \
publish:
git pull --rebase

View File

@@ -151,8 +151,10 @@ exports.ConditionalExpression = function (node, parent) {
return true;
}
if (t.isCallExpression(parent) && parent.callee === node) {
return true;
if (t.isCallExpression(parent) || t.isNewExpression(parent)) {
if (parent.callee === node) {
return true;
}
}
if (t.isConditionalExpression(parent) && parent.test === node) {

View File

@@ -1,7 +1,7 @@
{
"name": "6to5",
"description": "Turn ES6 code into readable vanilla ES5 with source maps",
"version": "2.13.5",
"version": "2.13.6",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://6to5.org/",
"repository": "6to5/6to5",

View File

@@ -0,0 +1,11 @@
if (true) {
const x = 1;
switch (x) {
case 1: {
function y() {
assert(x, 1);
};
break;
}
}
}