@putout/printer 12.17.0 → 12.18.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.27, v12.18.0
2
+
3
+ feature:
4
+ - 7fae490 @putout/printer: ExpressionStatement: before IfStatement
5
+
1
6
  2025.01.24, v12.17.0
2
7
 
3
8
  feature:
@@ -37,10 +37,15 @@ const satisfyAfter = satisfy([
37
37
  isNextUp,
38
38
  ]);
39
39
 
40
+ const isNextIf = (path) => path
41
+ .getNextSibling()
42
+ .isIfStatement();
43
+
40
44
  const shouldBreakline = satisfy([
41
45
  isNewlineBetweenSiblings,
42
46
  isNotLastBody,
43
47
  isStrictMode,
48
+ isNextIf,
44
49
  ]);
45
50
 
46
51
  module.exports.ExpressionStatement = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/printer",
3
- "version": "12.17.0",
3
+ "version": "12.18.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",