Comparing version 0.5.4 to 0.5.5
# buble changelog | ||
## 0.5.5 | ||
* Ensure `return` is in correct place when creating bodies for arrow functions ([#21](https://gitlab.com/Rich-Harris/buble/issues/21)) | ||
* Prevent deindentation of class methods causing breakage with destructuring statements ([#22](https://gitlab.com/Rich-Harris/buble/issues/22)) | ||
## 0.5.4 | ||
@@ -4,0 +9,0 @@ |
{ | ||
"name": "buble", | ||
"version": "0.5.4", | ||
"version": "0.5.5", | ||
"description": "The blazing fast, batteries-included ES2015 compiler", | ||
@@ -5,0 +5,0 @@ "main": "dist/buble.umd.js", |
@@ -275,4 +275,8 @@ import wrap from './wrap.js'; | ||
if ( this.synthetic && this.parent.type === 'ArrowFunctionExpression' ) { | ||
code.insert( this.body[0].start, 'return ' ); | ||
} | ||
super.transpile( code, transforms ); | ||
} | ||
} |
@@ -43,3 +43,2 @@ import Node from '../Node.js'; | ||
super.transpile( code, transforms ); | ||
code.insert( this.body.body[0].start, 'return ' ); | ||
code.insert( this.body.end, `;\n${indentation}}` ); | ||
@@ -49,3 +48,3 @@ } | ||
else if ( transforms.arrow ) { | ||
code.insert( this.body.start, `{ return ` ); | ||
code.insert( this.body.start, `{ ` ); | ||
super.transpile( code, transforms ); | ||
@@ -52,0 +51,0 @@ code.insert( this.body.end, `; }` ); |
@@ -14,2 +14,4 @@ import Node from '../Node.js'; | ||
if ( transforms.classes ) { | ||
if ( !this.superClass ) deindent( this.body, code ); | ||
const superName = this.superClass && ( this.superClass.name || 'superclass' ); | ||
@@ -36,4 +38,2 @@ | ||
} | ||
if ( !this.superClass ) deindent( this.body, code ); | ||
} | ||
@@ -40,0 +40,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1106199
10084