@putout/printer 9.8.0 → 9.9.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.07.16, v9.9.0
2
+
3
+ fix:
4
+ - d59aaae @putout/printer: JSXText: raw: & (coderaiser/putout#216)
5
+
6
+ feature:
7
+ - 3f87ab5 @putout/printer: putout v36.0.0
8
+
9
+ 2024.07.14, v9.8.1
10
+
11
+ feature:
12
+ - 1490187 @putout/printer: YieldExpression: maybeParens
13
+
1
14
  2024.07.14, v9.8.0
2
15
 
3
16
  feature:
@@ -26,14 +26,14 @@ module.exports.AwaitExpression = (path, {print}) => {
26
26
  });
27
27
  };
28
28
 
29
- module.exports.YieldExpression = (path, {print, maybe}) => {
29
+ module.exports.YieldExpression = maybeParens((path, {print, maybe}) => {
30
30
  const {delegate} = path.node;
31
31
 
32
32
  print(`yield`);
33
33
  maybe.print(delegate, '*');
34
34
  print(' ');
35
35
  print('__argument');
36
- };
36
+ });
37
37
 
38
38
  module.exports.ThrowStatement = (path, {print, indent, maybe}) => {
39
39
  indent();
@@ -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) {
@@ -38,6 +38,7 @@ const {
38
38
  const {maybePrintTypeAnnotation} = require('../maybe/maybe-type-annotation');
39
39
  const {TSImportType} = require('./ts-import-type');
40
40
  const {TSExportAssignment} = require('./ts-export-assignment/ts-export-assignment');
41
+ const {TSTypeReference} = require('./ts-type-reference/ts-type-reference');
41
42
 
42
43
  module.exports = {
43
44
  TSAsExpression,
@@ -98,14 +99,11 @@ module.exports = {
98
99
  braceClose: '>',
99
100
  });
100
101
  },
101
- TSTypeReference(path, {print}) {
102
- print('__typeName');
103
- print('__typeParameters');
104
- },
105
102
  TSArrayType(path, {print}) {
106
103
  print('__elementType');
107
104
  print('[]');
108
105
  },
106
+ TSTypeReference,
109
107
  TSTypeOperator(path, {write, print}) {
110
108
  const {operator} = path.node;
111
109
  write(`${operator} `);
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+
3
+ module.exports.TSTypeReference = (path, {print}) => {
4
+ print('__typeName');
5
+ print('__typeParameters');
6
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/printer",
3
- "version": "9.8.0",
3
+ "version": "9.9.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",