Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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.8.4 to 0.8.5

5

CHANGELOG.md
# buble changelog
## 0.8.5
* Allow destructured parameter to have default ([#43](https://gitlab.com/Rich-Harris/buble/issues/43))
* Allow `continue`/`break` statements inside a for-of loop
## 0.8.4

@@ -4,0 +9,0 @@

2

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

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

@@ -88,7 +88,2 @@ import wrap from './wrap.js';

if ( /Function/.test( this.parent.type ) ) {
// default parameters
if ( transforms.defaultParameter ) {
this.transpileDefaultParameters( code, introStatementGenerators );
}
// object pattern

@@ -100,2 +95,7 @@ if ( transforms.parameterDestructuring ) {

// default parameters
if ( transforms.defaultParameter ) {
this.transpileDefaultParameters( code, introStatementGenerators );
}
// rest parameter

@@ -209,4 +209,9 @@ if ( transforms.spreadRest ) {

transpileObjectPattern ( code, introStatementGenerators ) {
this.parent.params.filter( param => param.type === 'ObjectPattern' ).forEach( param => {
const params = this.parent.params;
const objectPatterns = params.filter( param => param.type === 'ObjectPattern' );
const assignmentPatterns = params.filter( param => param.type === 'AssignmentPattern' )
.map( exp => exp.left ).filter( param => param.type === 'ObjectPattern' );
[].concat(objectPatterns, assignmentPatterns).forEach( param => {
const ref = this.scope.createIdentifier( 'ref' );
param.name = ref;
code.insertRight( param.start, ref );

@@ -213,0 +218,0 @@

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

transpile ( code, transforms ) {
const loop = this.findNearest( /(?:For(?:In)?|While)Statement/ );
const loop = this.findNearest( /(?:For(?:In|Of)?|While)Statement/ );
if ( loop.shouldRewriteAsFunction ) {

@@ -9,0 +9,0 @@ if ( this.label ) throw new CompileError( this, 'Labels are not currently supported in a loop with locally-scoped variables' );

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