Comparing version 0.3.1 to 0.3.2
# buble changelog | ||
## 0.3.2 | ||
* Handle empty `class` declarations | ||
## 0.3.1 | ||
@@ -4,0 +8,0 @@ |
@@ -124,3 +124,3 @@ import { parse } from 'acorn'; | ||
const indentStr = magicString.indentStr; | ||
const indentStr = magicString.getIndentString(); | ||
const pattern = new RegExp( indentStr + '\\S', 'g' ); | ||
@@ -182,3 +182,3 @@ | ||
} else { | ||
magicString.insert( this.body.start, `() {};\n\n${indentation}` ); | ||
magicString.insert( this.body.start, this.body.body.length ? `() {};\n\n${indentation}` : `() {};` ); | ||
} | ||
@@ -189,3 +189,3 @@ } | ||
magicString.remove( this.body.start, this.body.body[0].start ); | ||
if ( this.body.body.length ) magicString.remove( this.body.start, this.body.body[0].start ); | ||
@@ -192,0 +192,0 @@ this.body.body.forEach( method => { |
@@ -128,3 +128,3 @@ (function (global, factory) { | ||
const indentStr = magicString.indentStr; | ||
const indentStr = magicString.getIndentString(); | ||
const pattern = new RegExp( indentStr + '\\S', 'g' ); | ||
@@ -186,3 +186,3 @@ | ||
} else { | ||
magicString.insert( this.body.start, `() {};\n\n${indentation}` ); | ||
magicString.insert( this.body.start, this.body.body.length ? `() {};\n\n${indentation}` : `() {};` ); | ||
} | ||
@@ -193,3 +193,3 @@ } | ||
magicString.remove( this.body.start, this.body.body[0].start ); | ||
if ( this.body.body.length ) magicString.remove( this.body.start, this.body.body[0].start ); | ||
@@ -196,0 +196,0 @@ this.body.body.forEach( method => { |
{ | ||
"name": "buble", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "Common sense JavaScript transpilation", | ||
@@ -5,0 +5,0 @@ "main": "dist/buble.umd.js", |
@@ -40,3 +40,3 @@ import Node from '../Node.js'; | ||
} else { | ||
magicString.insert( this.body.start, `() {};\n\n${indentation}` ); | ||
magicString.insert( this.body.start, this.body.body.length ? `() {};\n\n${indentation}` : `() {};` ); | ||
} | ||
@@ -47,3 +47,3 @@ } | ||
magicString.remove( this.body.start, this.body.body[0].start ); | ||
if ( this.body.body.length ) magicString.remove( this.body.start, this.body.body[0].start ); | ||
@@ -50,0 +50,0 @@ this.body.body.forEach( method => { |
@@ -9,3 +9,3 @@ // TODO this function is slightly flawed – it works on the original string, | ||
const indentStr = magicString.indentStr; | ||
const indentStr = magicString.getIndentString(); | ||
const pattern = new RegExp( indentStr + '\\S', 'g' ); | ||
@@ -12,0 +12,0 @@ |
Sorry, the diff of this file is not supported yet
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
219455