@putout/printer 1.92.1 → 1.92.2
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
|
@@ -29,7 +29,9 @@ module.exports.ObjectExpression = (path, {print, maybe, indent, write}) => {
|
|
|
29
29
|
|
|
30
30
|
maybe.print(parens, '(');
|
|
31
31
|
print('{');
|
|
32
|
-
parseComments(path, {
|
|
32
|
+
parseComments(path, {
|
|
33
|
+
write,
|
|
34
|
+
});
|
|
33
35
|
maybe.print.newline(manyLines);
|
|
34
36
|
|
|
35
37
|
for (const property of properties) {
|
|
@@ -138,4 +140,3 @@ function isParens(path) {
|
|
|
138
140
|
|
|
139
141
|
return false;
|
|
140
142
|
}
|
|
141
|
-
|
|
@@ -9,6 +9,7 @@ const {
|
|
|
9
9
|
markAfter,
|
|
10
10
|
isMarkedAfter,
|
|
11
11
|
} = require('../../mark');
|
|
12
|
+
|
|
12
13
|
const {isExportNamespaceSpecifier} = require('@babel/types');
|
|
13
14
|
|
|
14
15
|
const isDeclarationNewline = (path) => isMarkedAfter(path.get('declaration'));
|
|
@@ -110,4 +111,3 @@ module.exports.ExportNamedDeclaration = {
|
|
|
110
111
|
markAfter(path);
|
|
111
112
|
},
|
|
112
113
|
};
|
|
113
|
-
|
|
@@ -30,18 +30,19 @@ module.exports.VariableDeclaration = {
|
|
|
30
30
|
for (const [index, declaration] of declarations.entries()) {
|
|
31
31
|
const id = declaration.get('id');
|
|
32
32
|
const init = declaration.get('init');
|
|
33
|
+
const notLast = index < n;
|
|
33
34
|
|
|
34
35
|
traverse(id);
|
|
35
36
|
|
|
36
37
|
if (exists(init)) {
|
|
37
|
-
const notLast = index < n;
|
|
38
38
|
write.space();
|
|
39
39
|
write('=');
|
|
40
40
|
write.space();
|
|
41
41
|
traverse(init);
|
|
42
|
-
maybe.write(notLast, ',');
|
|
43
|
-
maybe.write.space(notLast);
|
|
44
42
|
}
|
|
43
|
+
|
|
44
|
+
maybe.write(notLast, ',');
|
|
45
|
+
maybe.write.space(notLast);
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
maybe.write(isParentBlock(path), ';');
|
package/package.json
CHANGED