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
603
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.4.0 to 8.5.0

9

lib/tokenize/expressions/array-expression/array-expression.js

@@ -30,2 +30,4 @@ 'use strict';

const isNextString = (path) => isStringLiteral(path.getNextSibling());
const isPrevString = (path) => isStringLiteral(path.getPrevSibling());
const isAroundStrings = (path) => isNextString(path) || isPrevString(path);
const isNextObject = (a) => a.getNextSibling().isObjectExpression();

@@ -104,5 +106,8 @@ const isPrevObject = (a) => a.getPrevSibling().isObjectExpression();

if (isInsideArray(path) && isStringAndArray(parentElements)) {
maybe.indent.dec(!isNextString(path));
const parentCountTwo = parentElements.length === 2;
const isHideIdent = !isAroundStrings(path) || parentCountTwo;
maybe.indent.dec(isHideIdent);
maybe.indent(elements.length && isNewLine);
maybe.indent.inc(!isNextString(path));
maybe.indent.inc(isHideIdent);
} else if (!isArrayInsideArray(path) && !isObjectExpression(elements.at(-1))) {

@@ -109,0 +114,0 @@ maybe.indent(elements.length && isNewLine);

{
"name": "@putout/printer",
"version": "8.4.0",
"version": "8.5.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