Comparing version 0.10.5 to 0.10.6
# buble changelog | ||
## 0.10.6 | ||
* Handle sparse arrays ([#62](https://gitlab.com/Rich-Harris/buble/issues/62)) | ||
* Handle spread expressions in JSX ([#64](https://gitlab.com/Rich-Harris/buble/issues/64)) | ||
## 0.10.5 | ||
@@ -4,0 +9,0 @@ |
{ | ||
"name": "buble", | ||
"version": "0.10.5", | ||
"version": "0.10.6", | ||
"description": "The blazing fast, batteries-included ES2015 compiler", | ||
@@ -5,0 +5,0 @@ "main": "dist/buble.umd.js", |
@@ -12,3 +12,3 @@ import Node from '../Node.js'; | ||
const element = this.elements[i]; | ||
if ( element.type === 'SpreadElement' && isArguments( element.argument ) ) { | ||
if ( element && element.type === 'SpreadElement' && isArguments( element.argument ) ) { | ||
this.argumentsArrayAlias = lexicalBoundary.getArgumentsArrayAlias(); | ||
@@ -27,3 +27,3 @@ } | ||
if ( element.type === 'SpreadElement' ) { | ||
if ( element && element.type === 'SpreadElement' ) { | ||
// special case – [ ...arguments ] | ||
@@ -43,3 +43,3 @@ if ( isArguments( element.argument ) ) { | ||
if ( hasSpreadElements ) { | ||
code.overwrite( this.elements[ this.elements.length - 1 ].end, this.end, ' )' ); | ||
code.overwrite( this.end - 1, this.end, ')' ); | ||
} | ||
@@ -46,0 +46,0 @@ } |
@@ -5,3 +5,4 @@ import Node from '../Node.js'; | ||
transpile ( code, transforms ) { | ||
code.overwrite( this.start, this.end, this.argument.name ); | ||
code.remove( this.start, this.argument.start ); | ||
code.remove( this.argument.end, this.end ); | ||
@@ -8,0 +9,0 @@ super.transpile( code, transforms ); |
@@ -11,3 +11,3 @@ export function isArguments ( node ) { | ||
const element = elements[i]; | ||
if ( element.type === 'SpreadElement' ) { | ||
if ( element && element.type === 'SpreadElement' ) { | ||
if ( isArguments( element.argument ) ) { | ||
@@ -14,0 +14,0 @@ code.overwrite( element.argument.start, element.argument.end, argumentsArrayAlias ); |
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
1505708
13982