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.4.16 to 0.4.17

src/program/types/ForInStatement.js

4

CHANGELOG.md
# buble changelog
## 0.4.17
* Support `for...in` loops and block scoping
## 0.4.16

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

2

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

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

@@ -7,2 +7,3 @@ import { walk } from 'estree-walker';

ForStatement: 'body',
ForInStatement: 'body',
WhileStatement: 'body',

@@ -9,0 +10,0 @@ ArrowFunctionExpression: 'body'

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

initialise ( transforms ) {
this.loop = this.findNearest( /(?:For|While)Statement/ );
this.loop = this.findNearest( /(?:For(?:In)?|While)Statement/ );
this.loop.canBreak = true;

@@ -9,0 +9,0 @@ }

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

transpile ( code, transforms ) {
const loop = this.findNearest( /(?:For|While)Statement/ );
const loop = this.findNearest( /(?:For(?:In)?|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' );

@@ -12,2 +12,3 @@ import ArrayExpression from './ArrayExpression.js';

import ForStatement from './ForStatement.js';
import ForInStatement from './ForInStatement.js';
import ForOfStatement from './ForOfStatement.js';

@@ -46,2 +47,3 @@ import FunctionDeclaration from './FunctionDeclaration.js';

ForStatement,
ForInStatement,
ForOfStatement,

@@ -48,0 +50,0 @@ FunctionDeclaration,

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

initialise ( transforms ) {
this.loop = this.findNearest( /(?:For|While)Statement/ );
this.loop = this.findNearest( /(?:For(?:In)?|While)Statement/ );
this.nearestFunction = this.findNearest( /Function/ );

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