@putout/printer 15.8.0 → 15.9.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,10 @@
1
+ 2025.07.03, v15.9.0
2
+
3
+ feature:
4
+ - 57013dc @putout/printer: ExpressionStatement: inside BlockStatement: leading comment
5
+ - f2f187f @putout/printer: ExpressionStatement inside ArrowFunction: leadinging comment
6
+ - 0afbf8d @putout/printer: @putout/plugin-printer v6.0.0
7
+
1
8
  2025.07.02, v15.8.0
2
9
 
3
10
  feature:
@@ -7,23 +7,20 @@ const {
7
7
  isBlockStatement,
8
8
  isProgram,
9
9
  isIfStatement,
10
- isClassMethod,
11
10
  } = types;
12
11
 
13
12
  module.exports.printLeadingCommentLine = (path, printer, semantics, {index, isLast, printComment}) => {
14
13
  const {print, indent} = printer;
15
14
  const prev = path.getPrevSibling();
16
15
  const {parentPath} = path;
17
- const parentParentPath = parentPath.parentPath;
18
16
 
19
17
  if (hasTrailingComment(prev))
20
18
  return;
21
19
 
22
- if (!index && !prev.node && (isIfStatement(parentPath) || isClassMethod(parentParentPath)))
20
+ if (!index && !prev.node && (isIfStatement(parentPath) || isBlockStatement(parentPath)))
23
21
  indent();
24
22
 
25
23
  printComment();
26
-
27
24
  print.newline();
28
25
 
29
26
  if (!isLast && !path.parentPath.isIfStatement())
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/printer",
3
- "version": "15.8.0",
3
+ "version": "15.9.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",
@@ -71,7 +71,7 @@
71
71
  "devDependencies": {
72
72
  "@putout/eslint": "^4.1.0",
73
73
  "@putout/plugin-minify": "^10.0.0",
74
- "@putout/plugin-printer": "^5.0.0",
74
+ "@putout/plugin-printer": "^6.0.0",
75
75
  "@putout/plugin-promises": "^18.0.0",
76
76
  "@putout/plugin-react-hook-form": "^6.0.0",
77
77
  "@putout/plugin-react-hooks": "^9.0.0",