@putout/printer 10.1.0 → 10.2.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 +10 -0
- package/lib/tokenize/expressions/call-expression/call-expression.js +1 -1
- package/lib/tokenize/expressions/function/arrow-function-expression.js +1 -1
- package/lib/tokenize/expressions/function/function-expression.js +1 -1
- package/lib/tokenize/expressions/unary-expression/unary-expressions.js +1 -1
- package/lib/tokenize/literals/identifier.js +1 -1
- package/lib/tokenize/typescript/function/ts-function-type.js +1 -1
- package/lib/tokenize/typescript/ts-as-expression/ts-as-expression.js +1 -1
- package/lib/tokenize/typescript/ts-infer-type/ts-infert-type.js +1 -1
- package/lib/tokenize/typescript/type/ts-type-literal.js +3 -0
- package/package.json +1 -1
- /package/lib/tokenize/{expressions/function/parens.js → maybe/maybe-parens.js} +0 -0
package/ChangeLog
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
2024.10.29, v10.2.0
|
|
2
|
+
|
|
3
|
+
feature:
|
|
4
|
+
- 329ca16 @putout/printer: TSTypeLiteral: one inside TSTypeParameterInstantiation: no newline
|
|
5
|
+
|
|
6
|
+
2024.10.29, v10.1.1
|
|
7
|
+
|
|
8
|
+
feature:
|
|
9
|
+
- 73a628b @putout/printer: parens -> maybe-parens
|
|
10
|
+
|
|
1
11
|
2024.10.28, v10.1.0
|
|
2
12
|
|
|
3
13
|
feature:
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const {exists} = require('../../is');
|
|
4
4
|
const {printParams} = require('./params');
|
|
5
|
-
const {maybeParens} = require('
|
|
5
|
+
const {maybeParens} = require('../../maybe/maybe-parens');
|
|
6
6
|
|
|
7
7
|
module.exports.ArrowFunctionExpression = maybeParens((path, printer, semantics) => {
|
|
8
8
|
const {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const {exists} = require('../../is');
|
|
4
4
|
const {printParams} = require('./params');
|
|
5
|
-
const {maybeParens} = require('
|
|
5
|
+
const {maybeParens} = require('../../maybe/maybe-parens');
|
|
6
6
|
|
|
7
7
|
module.exports.FunctionExpression = maybeParens((path, printer, semantics) => {
|
|
8
8
|
const {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const {maybeDecorators} = require('../maybe-get');
|
|
4
|
-
const {maybeParens} = require('../
|
|
4
|
+
const {maybeParens} = require('../maybe/maybe-parens');
|
|
5
5
|
const {maybeTypeAnnotation} = require('../maybe/maybe-type-annotation');
|
|
6
6
|
|
|
7
7
|
module.exports.Identifier = maybeParens(maybeTypeAnnotation((path, printer) => {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const {printParams} = require('../../expressions/function/params');
|
|
4
4
|
const {printReturnType} = require('./print-return-type');
|
|
5
5
|
|
|
6
|
-
const {maybeParens} = require('../../
|
|
6
|
+
const {maybeParens} = require('../../maybe/maybe-parens');
|
|
7
7
|
|
|
8
8
|
module.exports.TSFunctionType = maybeParens((path, printer, semantics) => {
|
|
9
9
|
const {print} = printer;
|
|
@@ -27,5 +27,8 @@ module.exports.TSTypeLiteral = (path, {indent, traverse, write}) => {
|
|
|
27
27
|
function isNewline(path) {
|
|
28
28
|
const members = path.get('members');
|
|
29
29
|
|
|
30
|
+
if (members.length === 1 && path.parentPath.isTSTypeParameterInstantiation())
|
|
31
|
+
return false;
|
|
32
|
+
|
|
30
33
|
return members.length && members[0].node.typeAnnotation;
|
|
31
34
|
}
|
package/package.json
CHANGED
|
File without changes
|