@putout/printer 9.8.1 → 9.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,16 @@
1
+ 2024.08.01, v9.10.0
2
+
3
+ feature:
4
+ - 1e95457 @putout/printer: ClassMethod: override
5
+
6
+ 2024.07.16, v9.9.0
7
+
8
+ fix:
9
+ - d59aaae @putout/printer: JSXText: raw: & (coderaiser/putout#216)
10
+
11
+ feature:
12
+ - 3f87ab5 @putout/printer: putout v36.0.0
13
+
1
14
  2024.07.14, v9.8.1
2
15
 
3
16
  feature:
package/README.md CHANGED
@@ -73,7 +73,7 @@ const a = (b, c) => {
73
73
  When you need to extend syntax of `@putout/printer` just pass a function which receives:
74
74
 
75
75
  - `path`, Babel Path
76
- - `write`, a function to output result of printing into token array;
76
+ - `print`, a function to output result of printing into token array;
77
77
 
78
78
  When `path` contains to dashes `__` and name, it is the same as: `write(path.get('right'))`, and this is
79
79
  actually `traverse(path.get('right'))` shortened to simplify read and process.
@@ -22,6 +22,11 @@ const ClassMethod = {
22
22
  print(' ');
23
23
  }
24
24
 
25
+ if (node.override) {
26
+ print('override');
27
+ print(' ');
28
+ }
29
+
25
30
  if (node.async) {
26
31
  print('async');
27
32
  print(' ');
@@ -8,7 +8,7 @@ module.exports.JSXText = (path, {write, indent}) => {
8
8
  const isSpacesOnly = /^\s+$/.test(value);
9
9
  const hasNext = isNext(path);
10
10
 
11
- if (extra?.raw.startsWith('&'))
11
+ if (extra.raw.includes('&'))
12
12
  return write(extra.raw);
13
13
 
14
14
  if (isSpacesOnly && hasNext) {
@@ -4,4 +4,3 @@ module.exports.TSTypeReference = (path, {print}) => {
4
4
  print('__typeName');
5
5
  print('__typeParameters');
6
6
  };
7
-
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/printer",
3
- "version": "9.8.1",
3
+ "version": "9.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",
@@ -64,7 +64,7 @@
64
64
  "mock-require": "^3.0.3",
65
65
  "montag": "^1.0.0",
66
66
  "nodemon": "^3.0.1",
67
- "putout": "^35.0.0",
67
+ "putout": "^36.0.0",
68
68
  "samadhi": "^2.8.0",
69
69
  "supertape": "^10.0.0",
70
70
  "try-catch": "^3.0.0",