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

@putout/printer

Package Overview
Dependencies
Maintainers
1
Versions
599
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@putout/printer - npm Package Compare versions

Comparing version 8.16.0 to 8.17.0

20

lib/tokenize/statements/expression-statement.js

@@ -70,2 +70,5 @@ 'use strict';

if (isTopParentLast(path))
return;
print.newline();

@@ -76,2 +79,19 @@ maybe.markAfter(store(), path);

function isTopParentLast({parentPath}) {
if (!parentPath.isIfStatement())
return false;
const nextParent = parentPath.parentPath;
if (!nextParent.isIfStatement())
return false;
const nextNext = nextParent.parentPath;
if (!nextNext.isIfStatement())
return false;
return isLast(nextNext);
}
function isNotLastBody(path) {

@@ -78,0 +98,0 @@ return path.parentPath.get('body') === path;

10

lib/tokenize/statements/if-statement/if-statement.js

@@ -59,3 +59,8 @@ 'use strict';

} else if (alternate.isIfStatement()) {
write(' else ');
if (alternate.get('consequent').isBlockStatement())
write.space();
else
indent();
write('else ');
traverse(alternate);

@@ -73,2 +78,5 @@ } else if (exists(alternate)) {

if (!isNext(path) && !consequent.isBlockStatement())
return;
if (path === partOfAlternate && isInside(path))

@@ -75,0 +83,0 @@ print.newline();

2

package.json
{
"name": "@putout/printer",
"version": "8.16.0",
"version": "8.17.0",
"type": "commonjs",

@@ -5,0 +5,0 @@ "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",

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