@putout/printer 12.25.0 → 12.26.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,9 @@
1
+ 2025.02.08, v12.26.0
2
+
3
+ feature:
4
+ - b2afc0d @putout/printer: @putout/compare v16.0.1
5
+ - 386284a @putout/printer: ClassMethod: comments
6
+
1
7
  2025.02.07, v12.25.0
2
8
 
3
9
  feature:
@@ -19,6 +19,7 @@ const {
19
19
  isSpreadElement,
20
20
  isClassBody,
21
21
  isBinaryExpression,
22
+ isClassMethod,
22
23
  } = types;
23
24
 
24
25
  const isProperty = satisfy([
@@ -136,7 +137,9 @@ module.exports.parseLeadingComments = (path, {print, maybe, indent}, semantics)
136
137
  maybe.print.breakline(propIs);
137
138
  maybe.print.newline(!propIs);
138
139
 
139
- if (isBinaryExpression(path)) {
140
+ if (isClassMethod(path)) {
141
+ indent();
142
+ } else if (isBinaryExpression(path)) {
140
143
  indent.inc();
141
144
  indent();
142
145
  indent.dec();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/printer",
3
- "version": "12.25.0",
3
+ "version": "12.26.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",
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@putout/babel": "^3.0.0",
36
- "@putout/compare": "^15.0.2",
36
+ "@putout/compare": "^16.0.1",
37
37
  "@putout/operate": "^12.0.0",
38
38
  "@putout/operator-json": "^2.0.0",
39
39
  "fullstore": "^3.0.0",