@putout/printer 5.5.1 → 5.6.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.09.22, v5.6.0
2
+
3
+ feature:
4
+ - c86e9bd @putout/printer: ClassDeclaration: extends
5
+
1
6
  2023.09.20, v5.5.1
2
7
 
3
8
  feature:
package/README.md CHANGED
@@ -132,7 +132,7 @@ const overrides = {
132
132
  - `newline` - symbol for used for line separation;
133
133
  - `space` - default symbol used for space character;
134
134
  - `splitter` - mandatory symbol that used inside of statements like this:
135
- - `roundBraceOpen` and `roundBraceClose` symbols to to output braces in a single argument arrow function expressions: `(a) => {}`.
135
+ - `roundBraceOpen` and `roundBraceClose` symbols to output braces in a single argument arrow function expressions: `(a) => {}`.
136
136
 
137
137
  Default options produce:
138
138
 
@@ -36,7 +36,7 @@ module.exports.ClassDeclaration = {
36
36
  };
37
37
 
38
38
  function classVisitor(path, {print, indent, maybe, traverse}) {
39
- const {abstract} = path.node;
39
+ const {id, abstract} = path.node;
40
40
 
41
41
  for (const decorator of maybeDecorators(path)) {
42
42
  traverse(decorator);
@@ -58,7 +58,7 @@ function classVisitor(path, {print, indent, maybe, traverse}) {
58
58
  }
59
59
 
60
60
  if (node.superClass) {
61
- maybe.print(path.isStatement(), ' ');
61
+ maybe.print(id && !node.implements, ' ');
62
62
  print('extends ');
63
63
  print('__superClass');
64
64
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/printer",
3
- "version": "5.5.1",
3
+ "version": "5.6.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",