@putout/printer 10.4.0 → 10.4.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
+ 2024.11.27, v10.4.1
2
+
3
+ fix:
4
+ - 2b128c2 @putout/printer: comments
5
+
1
6
  2024.11.27, v10.4.0
2
7
 
3
8
  feature:
@@ -76,8 +76,10 @@ function isCommentOnNextLine(path) {
76
76
  if (!loc)
77
77
  return true;
78
78
 
79
- const isNextLine = line === loc.start.line + 1;
80
- const isNextLineAfterNewline = line === loc.start.line + 2;
79
+ const startLine = loc.start.line;
80
+ const endLine = loc.end.line;
81
+ const isNextLine = line === startLine + 1 && line === endLine + 1;
82
+ const isNextLineAfterNewline = line === startLine + 2 && line === endLine + 2;
81
83
 
82
84
  return isNextLine || isNextLineAfterNewline;
83
85
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/printer",
3
- "version": "10.4.0",
3
+ "version": "10.4.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",