@putout/printer 5.21.0 → 5.22.1
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,15 @@
|
|
|
1
|
+
2023.10.11, v5.22.1
|
|
2
|
+
|
|
3
|
+
feature:
|
|
4
|
+
- a6fe0bc package: estree-to-babel v8.0.0
|
|
5
|
+
- 6072ebd package: @putout/plugin-minify v5.0.0
|
|
6
|
+
- 1e8f92a package: rendy v4.0.0
|
|
7
|
+
|
|
8
|
+
2023.10.05, v5.22.0
|
|
9
|
+
|
|
10
|
+
feature:
|
|
11
|
+
- 8a98fa5 @putout/printer: TSTypeParameter inside TSMappedType: extends -> in (coderaiser/putout#185)
|
|
12
|
+
|
|
1
13
|
2023.10.03, v5.21.0
|
|
2
14
|
|
|
3
15
|
feature:
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
[CoverageURL]: https://coveralls.io/github/putoutjs/printer?branch=master
|
|
10
10
|
[CoverageIMGURL]: https://coveralls.io/repos/putoutjs/printer/badge.svg?branch=master&service=github
|
|
11
11
|
|
|
12
|
-
Prints [**Babel AST**](https://github.com/coderaiser/estree-to-babel) to readable **JavaScript**. For
|
|
12
|
+
Prints [**Babel AST**](https://github.com/coderaiser/estree-to-babel) to readable **JavaScript**. For **ESTree** use [`estree-to-babel`](https://github.com/coderaiser/estree-to-babel).
|
|
13
13
|
|
|
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**.
|
|
@@ -283,7 +283,7 @@ print(ast, {
|
|
|
283
283
|
});
|
|
284
284
|
```
|
|
285
285
|
|
|
286
|
-
This is the same as `
|
|
286
|
+
This is the same as `print('__left')` but more low-level, and supports only objects.
|
|
287
287
|
|
|
288
288
|
## Speed Comparison
|
|
289
289
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const {isNext} = require('../is');
|
|
4
4
|
const {TSTypeLiteral} = require('./type/ts-type-literal');
|
|
5
5
|
const {TSTypeAliasDeclaration} = require('./type/ts-type-alias-declaration');
|
|
6
|
-
const {TSMappedType} = require('./ts-mapped-type');
|
|
6
|
+
const {TSMappedType} = require('./mapped-type/ts-mapped-type');
|
|
7
7
|
const {TSConditionalType} = require('./ts-conditional-type');
|
|
8
8
|
const {TSTypeParameter} = require('./type/ts-type-parameter');
|
|
9
9
|
const {TSDeclareFunction} = require('./function/ts-declare-function');
|
|
@@ -17,7 +17,7 @@ module.exports.TSTypeParameter = (path, {write, traverse}) => {
|
|
|
17
17
|
if (!exists(constraint))
|
|
18
18
|
return;
|
|
19
19
|
|
|
20
|
-
if (constraint.isTSTypeOperator()) {
|
|
20
|
+
if (constraint.isTSTypeOperator() || path.parentPath.isTSMappedType()) {
|
|
21
21
|
write(' in ');
|
|
22
22
|
} else {
|
|
23
23
|
write(' extends ');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/printer",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.22.1",
|
|
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",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"fullstore": "^3.0.0",
|
|
34
34
|
"just-snake-case": "^3.2.0",
|
|
35
35
|
"parse-import-specifiers": "^1.0.1",
|
|
36
|
-
"rendy": "^
|
|
36
|
+
"rendy": "^4.0.0"
|
|
37
37
|
},
|
|
38
38
|
"keywords": [
|
|
39
39
|
"putout",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
],
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@babel/plugin-codemod-object-assign-to-object-spread": "^7.10.4",
|
|
49
|
-
"@putout/plugin-minify": "^
|
|
49
|
+
"@putout/plugin-minify": "^5.0.0",
|
|
50
50
|
"@putout/plugin-printer": "^3.0.0",
|
|
51
51
|
"@putout/plugin-promises": "^13.0.0",
|
|
52
52
|
"@putout/plugin-react-hook-form": "^4.0.0",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"eslint": "^8.0.1",
|
|
58
58
|
"eslint-plugin-n": "^16.0.0",
|
|
59
59
|
"eslint-plugin-putout": "^20.0.0",
|
|
60
|
-
"estree-to-babel": "^
|
|
60
|
+
"estree-to-babel": "^8.0.0",
|
|
61
61
|
"just-kebab-case": "^4.2.0",
|
|
62
62
|
"madrun": "^9.0.0",
|
|
63
63
|
"mock-require": "^3.0.3",
|
|
File without changes
|