@putout/printer 14.7.0 → 14.7.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.05.03, v14.7.1
2
+
3
+ feature:
4
+ - 639c091 @putout/printer: comment: block: trailing: before export
5
+
1
6
  2025.05.03, v14.7.0
2
7
 
3
8
  feature:
@@ -139,7 +139,7 @@ module.exports.parseTrailingComments = (path, {write, maybe, indent}, semantics)
139
139
  if (type === 'CommentBlock') {
140
140
  maybe.write.space(sameLine);
141
141
  maybe.indent(!sameLine);
142
- maybe.print.breakline(isPrevCall(path) || isImportDeclaration(path));
142
+ maybe.print.breakline(isPrevCall(path) || isImportNotBeforeExport(path));
143
143
  write(`/*${value}*/`);
144
144
  maybe.write.newline(!sameLine || !isFnParam(path) && isCoupleLines(path.parentPath));
145
145
  }
@@ -160,3 +160,9 @@ function isPrevCall(path) {
160
160
  return !isCallExpression(expression.arguments[0]);
161
161
  }
162
162
 
163
+ function isImportNotBeforeExport(path) {
164
+ if (!isImportDeclaration(path))
165
+ return false;
166
+
167
+ return !path.getNextSibling().isExportDeclaration();
168
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/printer",
3
- "version": "14.7.0",
3
+ "version": "14.7.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",