New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@putout/printer

Package Overview
Dependencies
Maintainers
1
Versions
623
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 6.4.1 to 6.5.0

8

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

@@ -17,8 +17,10 @@ 'use strict';

const {types} = require('@putout/babel');
const {
isObjectExpression,
isStringLiteral,
} = require('@putout/babel').types;
} = types;
const isNextObject = (a) => a.getNextSibling().isObjectExpression();
const isArrayInsideArray = (path) => path.isArrayExpression() && path.parentPath.isArrayExpression();

@@ -67,3 +69,3 @@ const isInsideOneElementArray = ({parentPath}) => parentPath.node.elements.length === 1;

const indented = !isTwoLongStrings(elements) || !isInsideArray(path) && isIndented(elements[0]);
const indented = !isArrayInsideArray(path) && (!isTwoLongStrings(elements) || !isInsideArray(path) && isIndented(elements[0]));

@@ -108,3 +110,3 @@ if (indented)

indent.inc();
} else if (!isObjectExpression(elements.at(-1))) {
} else if (!isArrayInsideArray(path) && !isObjectExpression(elements.at(-1))) {
maybe.indent(elements.length && isNewLine);

@@ -111,0 +113,0 @@ }

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