@putout/printer 5.9.0 → 5.10.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.26, v5.10.0
2
+
3
+ feature:
4
+ - 04ff653 @putout/printer: improve check of unsupported node
5
+
1
6
  2023.09.23, v5.9.0
2
7
 
3
8
  feature:
package/README.md CHANGED
@@ -14,7 +14,7 @@ Prints [**Babel AST**](https://github.com/coderaiser/estree-to-babel) to readabl
14
14
  - ☝️ Similar to **Recast**, but [twice faster](#speed-comparison), also simpler and easier in maintenance, since it supports only **Babel**.
15
15
  - ☝️ As opinionated as **Prettier**, but has more user-friendly output and works directly with **AST**.
16
16
  - ☝️ Like **ESLint** but works directly with **Babel AST**.
17
- - ☝️ Easily extendable with help of [Overrides](h#overrides).
17
+ - ☝️ Easily extendable with help of [Overrides](#overrides).
18
18
 
19
19
  Supports:
20
20
 
@@ -8,6 +8,7 @@ module.exports.maybeDecorators = (visitor) => (path, printer, semantics, options
8
8
  traverse,
9
9
  maybe,
10
10
  } = printer;
11
+
11
12
  const {decorators} = path.node;
12
13
 
13
14
  if (decorators) {
@@ -171,6 +171,7 @@ module.exports.tokenize = (ast, overrides) => {
171
171
  dec: maybeIndentDec,
172
172
  });
173
173
 
174
+ // should never change to avoid unexpected errors related to printing path, since it hard to debug
174
175
  const mainPrinter = freeze({
175
176
  indent,
176
177
  write,
@@ -233,7 +234,7 @@ module.exports.tokenize = (ast, overrides) => {
233
234
  print: maybePrint,
234
235
  });
235
236
 
236
- maybeThrow(!currentTraverse, path, `Node type '{{ type }}' is not supported yet: '{{ path }}'`);
237
+ maybeThrow(!currentTraverse, path, `☝️Node type '{{ type }}' is not supported yet by @putout/printer: '{{ path }}'`);
237
238
 
238
239
  const currentIndent = i;
239
240
  parseLeadingComments(path, printer, semantics);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/printer",
3
- "version": "5.9.0",
3
+ "version": "5.10.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",