buble
Advanced tools
Comparing version 0.11.5 to 0.11.6
# buble changelog | ||
## 0.11.6 | ||
* Allow shorthand methods with computed names ([#78](https://gitlab.com/Rich-Harris/buble/issues/78)) | ||
* Include code snippet in `error.toString()` ([#79](https://gitlab.com/Rich-Harris/buble/issues/79)) | ||
## 0.11.5 | ||
@@ -4,0 +9,0 @@ |
{ | ||
"name": "buble", | ||
"version": "0.11.5", | ||
"version": "0.11.6", | ||
"description": "The blazing fast, batteries-included ES2015 compiler", | ||
@@ -5,0 +5,0 @@ "main": "dist/buble.umd.js", |
@@ -62,2 +62,3 @@ import acorn from 'acorn'; | ||
err.snippet = getSnippet( source, err.loc ); | ||
err.toString = () => `${err.name}: ${err.message}\n${err.snippet}`; | ||
throw err; | ||
@@ -64,0 +65,0 @@ } |
import Node from '../Node.js'; | ||
import deindent from '../../utils/deindent.js'; | ||
@@ -99,2 +100,8 @@ export default class ObjectExpression extends Node { | ||
} | ||
if ( prop.method && transforms.conciseMethodProperty ) { | ||
code.insertRight( prop.value.start, 'function ' ); | ||
} | ||
deindent( prop.value, code ); | ||
} | ||
@@ -101,0 +108,0 @@ } |
@@ -6,3 +6,3 @@ import Node from '../Node.js'; | ||
transpile ( code, transforms ) { | ||
if ( transforms.conciseMethodProperty && this.parent.type !== 'ObjectPattern' ) { | ||
if ( transforms.conciseMethodProperty && !this.computed && this.parent.type !== 'ObjectPattern' ) { | ||
if ( this.shorthand ) { | ||
@@ -9,0 +9,0 @@ code.insertRight( this.start, `${this.key.name}: ` ); |
@@ -19,2 +19,6 @@ import locate from './locate.js'; | ||
} | ||
toString () { | ||
return `${this.name}: ${this.message}\n${this.snippet}`; | ||
} | ||
} |
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
1692549
15886
76
1
0