@putout/printer 14.3.0 → 14.3.1

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.1
2
+
3
+ feature:
4
+ - 8ea46f3 @putout/printer: ExpressionStatement: after CallExpression: indent
5
+
1
6
  2025.03.28, v14.3.0
2
7
 
3
8
  feature:
@@ -64,7 +64,7 @@ module.exports.ExpressionStatement = {
64
64
  before(path, {indent}) {
65
65
  indent();
66
66
  },
67
- print(path, {print, maybe, store}) {
67
+ print(path, {print, maybe, store, indent}) {
68
68
  const insideReturn = isInsideReturn(path);
69
69
 
70
70
  print('__expression');
@@ -75,7 +75,15 @@ module.exports.ExpressionStatement = {
75
75
 
76
76
  if (!insideReturn && shouldBreakline(path)) {
77
77
  print.newline();
78
- maybe.indent(isNext(path) && noTrailingComment(path) || isNextCallWithLeadingComment(path));
78
+
79
+ const condition = isNext(path)
80
+ && noTrailingComment(path)
81
+ || isNextCallWithLeadingComment(path)
82
+ || isNextIf(path);
83
+
84
+ if (condition)
85
+ indent();
86
+
79
87
  store(true);
80
88
  }
81
89
  },
@@ -158,3 +166,4 @@ function isNextCallWithLeadingComment(path) {
158
166
 
159
167
  return isCallExpression(expression);
160
168
  }
169
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/printer",
3
- "version": "14.3.0",
3
+ "version": "14.3.1",
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",