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
593
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 1.5.3 to 1.5.4

2

lib/tokenize/expressions/call-expression.js

@@ -14,3 +14,3 @@ 'use strict';

if (shouldAddNewLine(path) && !isMarkedParentBefore(path) && !isMarkedPrevAfter(path.parentPath))
print.linebreak();
print.breakline();

@@ -17,0 +17,0 @@ print(path.get('callee'));

@@ -9,3 +9,3 @@ 'use strict';

if (!isFirst(path)) {
print.linebreak();
print.breakline();
}

@@ -12,0 +12,0 @@

@@ -10,5 +10,5 @@ 'use strict';

module.exports.ExpressionStatement = (path, {write, indent, traverse}) => {
module.exports.ExpressionStatement = (path, {write, indent, traverse, print}) => {
if (isCoupleLinesExpression(path) && !isFirst(path) && shouldAddNewLine(path) && !isMarkedPrevAfter(path)) {
write.linebreak();
print.breakline();
markBefore(path);

@@ -66,1 +66,2 @@ }

}

@@ -19,3 +19,3 @@ 'use strict';

maybe.print.linebreak(isNext(path));
maybe.print.breakline(isNext(path));
};

@@ -22,0 +22,0 @@

@@ -16,3 +16,3 @@ 'use strict';

if (!isFirst(path) && shouldAddNewLine(path) && !hasPrevNewline(path))
print.linebreak();
print.breakline();

@@ -35,4 +35,3 @@ const isParentBlock = /Program|BlockStatement/.test(path.parentPath.type);

if (is) {
print.indent();
print.newline();
print.linebreak();
markAfter(path);

@@ -39,0 +38,0 @@ }

@@ -40,3 +40,3 @@ 'use strict';

const maybeNewline = (a) => a && newline();
const maybeLinebreak = (a) => a && linebreak();
const maybeBreakline = (a) => a && breakline();

@@ -61,2 +61,9 @@ let i = 0;

type: TYPES.NEWLINE,
value: `${printIndent(i)}\n`,
});
};
const breakline = () => {
tokens.push({
type: TYPES.NEWLINE,
value: `\n${printIndent(i)}`,

@@ -77,2 +84,3 @@ });

linebreak,
breakline,
});

@@ -104,3 +112,3 @@ const print = (maybeLine) => {

newline: maybeNewline,
linebreak: maybeLinebreak,
breakline: maybeBreakline,
});

@@ -107,0 +115,0 @@

{
"name": "@putout/printer",
"version": "1.5.3",
"version": "1.5.4",
"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