@putout/printer 6.16.0 → 7.0.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,18 @@
|
|
|
1
|
+
2023.12.10, v7.0.0
|
|
2
|
+
|
|
3
|
+
feature:
|
|
4
|
+
- d9a3874 @putout/printer: escover v4.0.1
|
|
5
|
+
- 93781cd @putout/printer: @putout/compare v14.0.0
|
|
6
|
+
- e2fe43d @putout/printer: drop support of node < 18
|
|
7
|
+
- b713b09 @putout/printer: madrun v10.0.0
|
|
8
|
+
- 16df5a6 @putout/printer: putout v34.0.0
|
|
9
|
+
|
|
10
|
+
2023.12.08, v6.17.0
|
|
11
|
+
|
|
12
|
+
feature:
|
|
13
|
+
- ff5b2bf @putout/printer: @putout/plugin-minify v6.2.0
|
|
14
|
+
- a5c7341 @putout/printer: Multiline Comments after function params
|
|
15
|
+
|
|
1
16
|
2023.12.03, v6.16.0
|
|
2
17
|
|
|
3
18
|
feature:
|
|
@@ -13,6 +13,17 @@ const {
|
|
|
13
13
|
|
|
14
14
|
const hasBody = (path) => path.node.body;
|
|
15
15
|
|
|
16
|
+
const isFnParam = (path) => {
|
|
17
|
+
const {parentPath} = path;
|
|
18
|
+
|
|
19
|
+
if (!parentPath.isFunction())
|
|
20
|
+
return false;
|
|
21
|
+
|
|
22
|
+
return parentPath
|
|
23
|
+
.get('params')
|
|
24
|
+
.includes(path);
|
|
25
|
+
};
|
|
26
|
+
|
|
16
27
|
function isSameLine(path, loc) {
|
|
17
28
|
return path.node.loc?.start.line === loc.start.line || path.node.loc?.end.line === loc.end.line;
|
|
18
29
|
}
|
|
@@ -95,7 +106,7 @@ module.exports.parseTrailingComments = (path, {write, maybe}, semantics) => {
|
|
|
95
106
|
maybe.write.space(sameLine);
|
|
96
107
|
maybe.indent(!sameLine);
|
|
97
108
|
write(`/*${value}*/`);
|
|
98
|
-
maybe.write.newline(!sameLine || isCoupleLines(path.parentPath));
|
|
109
|
+
maybe.write.newline(!sameLine || !isFnParam(path) && isCoupleLines(path.parentPath));
|
|
99
110
|
}
|
|
100
111
|
}
|
|
101
112
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/printer",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.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",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@putout/babel": "^1.1.1",
|
|
31
|
-
"@putout/compare": "^
|
|
31
|
+
"@putout/compare": "^14.0.0",
|
|
32
32
|
"@putout/operate": "^11.0.0",
|
|
33
33
|
"@putout/operator-json": "^1.2.0",
|
|
34
34
|
"fullstore": "^3.0.0",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
],
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@babel/plugin-codemod-object-assign-to-object-spread": "^7.10.4",
|
|
50
|
-
"@putout/plugin-minify": "^
|
|
50
|
+
"@putout/plugin-minify": "^6.2.0",
|
|
51
51
|
"@putout/plugin-printer": "^3.0.0",
|
|
52
52
|
"@putout/plugin-promises": "^13.0.0",
|
|
53
53
|
"@putout/plugin-react-hook-form": "^4.0.0",
|
|
@@ -55,23 +55,23 @@
|
|
|
55
55
|
"acorn": "^8.8.2",
|
|
56
56
|
"c8": "^8.0.0",
|
|
57
57
|
"check-dts": "^0.7.2",
|
|
58
|
-
"escover": "^
|
|
58
|
+
"escover": "^4.0.1",
|
|
59
59
|
"eslint": "^8.0.1",
|
|
60
60
|
"eslint-plugin-n": "^16.0.0",
|
|
61
61
|
"eslint-plugin-putout": "^21.0.1",
|
|
62
62
|
"estree-to-babel": "^8.0.0",
|
|
63
63
|
"just-kebab-case": "^4.2.0",
|
|
64
|
-
"madrun": "^
|
|
64
|
+
"madrun": "^10.0.0",
|
|
65
65
|
"mock-require": "^3.0.3",
|
|
66
66
|
"montag": "^1.0.0",
|
|
67
67
|
"nodemon": "^3.0.1",
|
|
68
|
-
"putout": "^
|
|
68
|
+
"putout": "^34.0.0",
|
|
69
69
|
"supertape": "^8.0.0",
|
|
70
70
|
"try-catch": "^3.0.0"
|
|
71
71
|
},
|
|
72
72
|
"license": "MIT",
|
|
73
73
|
"engines": {
|
|
74
|
-
"node": ">=
|
|
74
|
+
"node": ">=18"
|
|
75
75
|
},
|
|
76
76
|
"publishConfig": {
|
|
77
77
|
"access": "public"
|