Socket
Socket
Sign inDemoInstall

buble

Package Overview
Dependencies
Maintainers
1
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

buble - npm Package Compare versions

Comparing version 0.5.7 to 0.5.8

4

CHANGELOG.md
# buble changelog
## 0.5.8
* Fix exponentiation assignment operator edge case
## 0.5.7

@@ -4,0 +8,0 @@

2

package.json
{
"name": "buble",
"version": "0.5.7",
"version": "0.5.8",
"description": "The blazing fast, batteries-included ES2015 compiler",

@@ -5,0 +5,0 @@ "main": "dist/buble.umd.js",

@@ -39,3 +39,3 @@ import Node from '../Node.js';

// how we do the next part depends on a number of factors – whether
// how we do the next part depends on a number of factors – whether
// this is a top-level statement, and whether we're updating a

@@ -55,3 +55,2 @@ // simple or complex reference

let needsPropertyVar = false;
let dotProperty = false;

@@ -63,3 +62,2 @@ const statement = this.findNearest( /(?:Statement|Declaration)$/ );

property = left.computed ? getAlias( left.property.name ) : left.property.name;
dotProperty = !left.computed;
} else {

@@ -108,14 +106,20 @@ property = scope.createIdentifier( 'property' );

if ( needsObjectVar ) {
if ( needsObjectVar && needsPropertyVar ) {
code.insert( left.start, `${object} = ` );
code.insert( left.object.end, `, ` );
code.overwrite( left.object.end, left.property.start, `, ${property} = ` );
code.overwrite( left.property.end, left.end, `, ${object}[${property}]` );
}
if ( needsPropertyVar ) {
code.insert( left.object.end, `${property} = ` );
code.move( left.property.start, left.property.end, left.object.end );
else if ( needsObjectVar ) {
code.insert( left.start, `${object} = ` );
code.insert( left.object.end, `, ${object}` );
}
code.remove( left.object.end, left.property.start );
code.overwrite( left.property.end, left.end, `, ${object}${ dotProperty ? `.${property}` : `[${property}]` }` );
else if ( needsPropertyVar ) {
code.insert( left.start, `${property} = ` );
code.move( left.property.start, left.property.end, left.start );
code.insert( left.start, `, ` );
code.overwrite( left.object.end, left.property.start, `[${property}]` );
code.remove( left.property.end, left.end );
}

@@ -125,3 +129,3 @@ code.insert( this.end, ` )` );

base = object + ( left.computed ? `[${property}]` : `.${property}` );
base = object + ( left.computed || needsPropertyVar ? `[${property}]` : `.${property}` );
}

@@ -128,0 +132,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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc