@putout/printer 12.7.0 → 12.8.0

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.01.22, v12.8.0
2
+
3
+ feature:
4
+ - 6bc911d @putout/printer: ObjectExpression: indent
5
+
1
6
  2025.01.21, v12.7.0
2
7
 
3
8
  feature:
@@ -9,6 +9,7 @@ const {
9
9
 
10
10
  const {markBefore} = require('../mark');
11
11
  const {maybeInsideFn} = require('./maybe-inside-fn');
12
+
12
13
  const {
13
14
  isArrowFunctionExpression,
14
15
  isObjectProperty,
@@ -151,4 +152,3 @@ module.exports.parseLeadingComments = (path, {print, maybe, indent}, semantics)
151
152
  }
152
153
  }
153
154
  };
154
-
@@ -51,9 +51,6 @@ function isInsideNestedArrayCall({parentPath}) {
51
51
  }
52
52
 
53
53
  function isInsideNestedTuple({parentPath}) {
54
- if (!isArrayExpression(parentPath.parentPath))
55
- return false;
56
-
57
54
  const {elements} = parentPath.parentPath.node;
58
55
  const [first] = elements;
59
56
 
@@ -119,7 +116,7 @@ module.exports.ObjectExpression = (path, printer, semantics) => {
119
116
  if (!insideNestedArrayCall) {
120
117
  indent.dec();
121
118
  maybe.indent(manyLines);
122
- } else if (isInsideNestedTuple(path)) {
119
+ } else if (isInsideTuple(path) || isInsideNestedTuple(path)) {
123
120
  indent.dec();
124
121
  indent();
125
122
  indent.inc();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/printer",
3
- "version": "12.7.0",
3
+ "version": "12.8.0",
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",