@putout/printer 8.39.1 → 8.40.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
|
@@ -94,6 +94,7 @@ module.exports.VariableDeclaration = {
|
|
|
94
94
|
store(wasNewline);
|
|
95
95
|
}),
|
|
96
96
|
afterSatisfy: () => [
|
|
97
|
+
isNextIf,
|
|
97
98
|
noNextParentBlock,
|
|
98
99
|
notLastCoupleLines,
|
|
99
100
|
isNextAssign,
|
|
@@ -186,6 +187,11 @@ function isFirst(path) {
|
|
|
186
187
|
return path.node === path.parentPath.node.body?.[0];
|
|
187
188
|
}
|
|
188
189
|
|
|
190
|
+
const isNextIf = (path) => {
|
|
191
|
+
const nextPath = path.getNextSibling();
|
|
192
|
+
return nextPath.isIfStatement();
|
|
193
|
+
};
|
|
194
|
+
|
|
189
195
|
const isNextAssign = (path) => {
|
|
190
196
|
const nextPath = path.getNextSibling();
|
|
191
197
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/printer",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.40.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",
|
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
"generate"
|
|
46
46
|
],
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@babel/plugin-codemod-object-assign-to-object-spread": "^7.10.4",
|
|
49
48
|
"@putout/plugin-minify": "^8.0.0",
|
|
50
49
|
"@putout/plugin-printer": "^3.0.0",
|
|
51
50
|
"@putout/plugin-promises": "^15.0.0",
|
|
@@ -64,7 +63,7 @@
|
|
|
64
63
|
"montag": "^1.0.0",
|
|
65
64
|
"nodemon": "^3.0.1",
|
|
66
65
|
"putout": "^35.0.0",
|
|
67
|
-
"samadhi": "^
|
|
66
|
+
"samadhi": "^2.8.0",
|
|
68
67
|
"supertape": "^10.0.0",
|
|
69
68
|
"try-catch": "^3.0.0",
|
|
70
69
|
"typescript": "^5.3.3"
|