@putout/printer 17.7.0 → 17.7.2

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,19 @@
1
+ 2026.02.17, v17.7.2
2
+
3
+ feature:
4
+ - 4db4f2b @putout/printer: types: maybeVisitor: return type
5
+
6
+ 2026.02.16, v17.7.1
7
+
8
+ feature:
9
+ - 3811a52 @putout/printer: TSDeclareFunction: no returnType
10
+ - 206f251 @putout/printer: redlint v6.0.0
11
+ - 90d9f97 @putout/printer: putout v42.0.1
12
+ - 2a805c8 @putout/printer: madrun v13.0.0
13
+ - 316c6d4 @putout/printer: eslint-plugin-putout v31.0.0
14
+ - b38077b @putout/printer: escover v6.0.0
15
+ - a36080d @putout/printer: @putout/plugin-promises v19.0.0
16
+
1
17
  2026.02.16, v17.7.0
2
18
 
3
19
  feature:
package/lib/printer.d.ts CHANGED
@@ -59,7 +59,7 @@ interface Options {
59
59
 
60
60
  export function print(ast: types.Node, options?: Options): string;
61
61
 
62
- declare function maybeVisitor(plugin: Visitor, path: types.Path, printer: Print, semantics: Semantics);
62
+ declare function maybeVisitor(plugin: Visitor, path: types.Path, printer: Print, semantics: Semantics): void;
63
63
 
64
64
  export const visitors = Visitors;
65
65
 
@@ -23,9 +23,13 @@ export const TSDeclareFunction = {
23
23
 
24
24
  printParams(path, printer, semantics);
25
25
 
26
- print(':');
27
- print.space();
28
- print('__returnType');
26
+ const {returnType} = path.node;
27
+
28
+ if (returnType) {
29
+ print(':');
30
+ print.space();
31
+ print('__returnType');
32
+ }
29
33
  }),
30
34
  afterIf: (path) => !isInsideDefaultExport(path),
31
35
  after: (path, {print}) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/printer",
3
- "version": "17.7.0",
3
+ "version": "17.7.2",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "Simplest possible opinionated Babel AST printer for 🐊Putout",
@@ -64,25 +64,26 @@
64
64
  "devDependencies": {
65
65
  "@babel/parser": "^7.28.5",
66
66
  "@putout/eslint": "^5.0.2",
67
+ "@putout/eslint-flat": "^4.0.0",
67
68
  "@putout/plugin-minify": "^11.2.1",
68
69
  "@putout/plugin-printer": "^7.0.0",
69
- "@putout/plugin-promises": "^18.0.0",
70
+ "@putout/plugin-promises": "^19.0.0",
70
71
  "@putout/plugin-react-hook-form": "^6.0.0",
71
72
  "@putout/plugin-react-hooks": "^9.0.0",
72
73
  "acorn": "^8.8.2",
73
74
  "c8": "^10.1.2",
74
75
  "check-dts": "^0.9.0",
75
- "escover": "^5.0.0",
76
+ "escover": "^6.0.0",
76
77
  "eslint": "^10.0.0",
77
- "eslint-plugin-putout": "^30.0.0",
78
+ "eslint-plugin-putout": "^31.0.0",
78
79
  "estree-to-babel": "^12.0.0",
79
80
  "goldstein": "^7.0.0",
80
81
  "just-kebab-case": "^4.2.0",
81
- "madrun": "^12.0.0",
82
+ "madrun": "^13.0.0",
82
83
  "montag": "^1.0.0",
83
84
  "nodemon": "^3.0.1",
84
- "putout": "^41.0.0",
85
- "redlint": "^5.0.2",
85
+ "putout": "^42.0.1",
86
+ "redlint": "^6.0.0",
86
87
  "samadhi": "^4.0.2",
87
88
  "supertape": "^12.0.9",
88
89
  "try-catch": "^4.0.6",