Socket
Socket
Sign inDemoInstall

babel-generator

Package Overview
Dependencies
Maintainers
3
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-generator - npm Package Compare versions

Comparing version 6.1.20 to 6.2.0

2

lib/buffer.js

@@ -1,3 +0,1 @@

/* @flow */
"use strict";

@@ -4,0 +2,0 @@

@@ -1,3 +0,1 @@

/* @flow */
"use strict";

@@ -4,0 +2,0 @@

15

lib/generators/statements.js

@@ -1,3 +0,1 @@

/* @flow */
"use strict";

@@ -49,4 +47,17 @@

var needsBlock = node.alternate && t.isIfStatement(node.consequent);
if (needsBlock) {
this.push("{");
this.newline();
this.indent();
}
this.printAndIndentOnComments(node.consequent, node);
if (needsBlock) {
this.dedent();
this.newline();
this.push("}");
}
if (node.alternate) {

@@ -53,0 +64,0 @@ if (this.isLast("}")) this.space();

@@ -1,3 +0,1 @@

/* @flow */
"use strict";

@@ -4,0 +2,0 @@

@@ -1,3 +0,1 @@

/* @flow */
"use strict";

@@ -4,0 +2,0 @@

@@ -1,3 +0,1 @@

/* @flow */
"use strict";

@@ -4,0 +2,0 @@

@@ -25,3 +25,3 @@ /* @flow */

Position.prototype.push = function push(str) {
Position.prototype.push = function push(str /*: string*/) /*: void*/ {
for (var i = 0; i < str.length; i++) {

@@ -41,3 +41,3 @@ if (str[i] === "\n") {

Position.prototype.unshift = function unshift(str) {
Position.prototype.unshift = function unshift(str /*: string*/) /*: void*/ {
for (var i = 0; i < str.length; i++) {

@@ -44,0 +44,0 @@ if (str[i] === "\n") {

@@ -1,3 +0,1 @@

/* @flow */
"use strict";

@@ -90,2 +88,5 @@

// Check again if any of our children may have left an aux comment on the stack
if (node.loc) this.printAuxAfterComment();
this.printTrailingComments(node, parent);

@@ -107,3 +108,3 @@

var comment = this.format.auxiliaryCommentBefore;
if (!wasInAux && this.insideAux) {
if (!wasInAux && this.insideAux && !this.printAuxAfterOnNextUserNode) {
this.printAuxAfterOnNextUserNode = true;

@@ -110,0 +111,0 @@ if (comment) this.printComment({

@@ -1,3 +0,1 @@

/* @flow */
"use strict";

@@ -4,0 +2,0 @@

@@ -1,3 +0,1 @@

/* @flow */
/**

@@ -4,0 +2,0 @@ * Returns `i`th number from `base`, continuing from 0 when `max` is reached.

{
"name": "babel-generator",
"version": "6.1.20",
"version": "6.2.0",
"description": "Turns an AST into code.",

@@ -14,5 +14,5 @@ "author": "Sebastian McKenzie <sebmck@gmail.com>",

"dependencies": {
"babel-messages": "^6.1.18",
"babel-messages": "^6.2.0",
"babel-runtime": "^5.0.0",
"babel-types": "^6.1.18",
"babel-types": "^6.2.0",
"detect-indent": "^3.0.1",

@@ -27,4 +27,4 @@ "is-integer": "^1.0.4",

"babel-helper-fixtures": "^6.1.18",
"babylon": "^6.1.20"
"babylon": "^6.2.0"
}
}
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