@putout/printer 1.73.2 → 1.74.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,8 @@
1
+ 2023.04.26, v1.74.0
2
+
3
+ feature:
4
+ - 9ef7aaa @putout/printer: add support of empty value in JSXAttribute
5
+
1
6
  2023.04.26, v1.73.2
2
7
 
3
8
  feature:
package/README.md CHANGED
@@ -51,7 +51,6 @@ const {parse} = require('@babel/parser');
51
51
  const ast = parse('const a = (b, c) => {const d = 5; return a;}');
52
52
 
53
53
  print(ast);
54
-
55
54
  // returns
56
55
  `
57
56
  const a = (b, c) => {
@@ -87,7 +86,6 @@ print(ast, {
87
86
  },
88
87
  },
89
88
  });
90
-
91
89
  // returns
92
90
  'const {a /* [hello world] */= 5} = b;\n';
93
91
  ```
@@ -10,12 +10,15 @@ module.exports.JSXAttribute = {
10
10
  indent.inc();
11
11
  print.breakline();
12
12
  },
13
- print(path, {print}) {
13
+ print(path, {print, maybe}) {
14
+ const {value} = path.node;
15
+
14
16
  print('__name');
15
- print('=');
17
+ maybe.print(value, '=');
16
18
  print('__value');
17
19
  },
18
20
  after(path, {indent}) {
19
21
  indent.dec();
20
22
  },
21
23
  };
24
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/printer",
3
- "version": "1.73.2",
3
+ "version": "1.74.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 fro 🐊Putout",