@putout/printer 14.3.1 → 14.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/ChangeLog CHANGED
@@ -1,3 +1,8 @@
1
+ 2025.03.28, v14.3.2
2
+
3
+ feature:
4
+ - 9319338 @putout/printer: ArrayExpression: nested triple
5
+
1
6
  2025.03.28, v14.3.1
2
7
 
3
8
  feature:
@@ -31,12 +31,14 @@ function isArrayInsideArray(path) {
31
31
 
32
32
  const parentElements = path.parentPath.node.elements;
33
33
  const parentHasArrays = parentElements.filter(isArrayExpression).length;
34
- const lastIsArray = !isArrayExpression(parentElements.at(-1));
34
+ const lastNotArray = !isArrayExpression(parentElements.at(-1));
35
35
 
36
- if (parentHasArrays && lastIsArray)
36
+ if (parentHasArrays && lastNotArray)
37
37
  return false;
38
38
 
39
- return parentElements.length <= 3;
39
+ const {length} = parentElements;
40
+
41
+ return length <= 3 && length !== 1;
40
42
  }
41
43
 
42
44
  const isTwoLongStrings = ([a, b]) => {
@@ -166,4 +166,3 @@ function isNextCallWithLeadingComment(path) {
166
166
 
167
167
  return isCallExpression(expression);
168
168
  }
169
-
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/printer",
3
- "version": "14.3.1",
3
+ "version": "14.3.2",
4
4
  "type": "commonjs",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "Simplest possible opinionated Babel AST printer for 🐊Putout",