@putout/printer 1.109.0 → 1.110.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,13 @@
1
+ 2023.05.23, v1.110.0
2
+
3
+ feature:
4
+ - 347e957 @putout/printer: ForStatement: spaces
5
+
6
+ 2023.05.23, v1.109.1
7
+
8
+ feature:
9
+ - 1baa0ae @putout/printer: ExportDeclaration: space
10
+
1
11
  2023.05.23, v1.109.0
2
12
 
3
13
  feature:
@@ -49,10 +49,9 @@ module.exports.ExportNamedDeclaration = {
49
49
 
50
50
  indent();
51
51
  write('export');
52
- write.space();
53
52
 
54
53
  if (exportKind === 'type' && specifiers.length) {
55
- print('type ');
54
+ print(' type ');
56
55
  print(specifiers[0]);
57
56
  print(' from ');
58
57
  traverse(source);
@@ -62,6 +61,7 @@ module.exports.ExportNamedDeclaration = {
62
61
  }
63
62
 
64
63
  if (isExportNamespaceSpecifier(specifiers[0])) {
64
+ print(' ');
65
65
  print(specifiers[0]);
66
66
  print(' from ');
67
67
  print('__source');
@@ -75,6 +75,7 @@ module.exports.ExportNamedDeclaration = {
75
75
  const isNewline = !exists(source) || n > maxOneLineSpecifiers;
76
76
 
77
77
  if (specifiers.length) {
78
+ print.space();
78
79
  write('{');
79
80
  indent.inc();
80
81
  maybe.write.newline(isNewline);
@@ -102,6 +103,7 @@ module.exports.ExportNamedDeclaration = {
102
103
  return;
103
104
  }
104
105
 
106
+ print(' ');
105
107
  print('__declaration');
106
108
  },
107
109
  afterIf(path) {
@@ -13,18 +13,21 @@ module.exports.ForStatement = {
13
13
  } = path.node;
14
14
 
15
15
  indent();
16
- print('for (');
16
+ print('for');
17
+ print.space();
18
+ print('(');
17
19
  print('__init');
18
20
  print(';');
19
- maybe.print(test, ' ');
21
+ maybe.print.space(test);
20
22
  print('__test');
23
+
21
24
  print(';');
22
- maybe.print(update, ' ');
25
+ maybe.print.space(update);
23
26
  print('__update');
24
27
  print(')');
25
28
 
26
29
  if (body.body) {
27
- print(' ');
30
+ print.space();
28
31
  print('__body');
29
32
  } else {
30
33
  const is = !path.get('body').isEmptyStatement();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/printer",
3
- "version": "1.109.0",
3
+ "version": "1.110.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",