@putout/printer 1.92.0 → 1.92.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
|
@@ -12,13 +12,14 @@ const {
|
|
|
12
12
|
} = require('../is');
|
|
13
13
|
|
|
14
14
|
const {isFunction} = require('@babel/types');
|
|
15
|
+
const {parseComments} = require('../comments');
|
|
15
16
|
|
|
16
17
|
const isBodyOfArrow = (path) => path.parentPath.node.body === path.node;
|
|
17
18
|
const isLogical = (path) => path.get('argument').isLogicalExpression();
|
|
18
19
|
const isValue = (path) => path.get('properties.0.value').node;
|
|
19
20
|
const isParentExpression = (path) => path.parentPath.isExpressionStatement();
|
|
20
21
|
|
|
21
|
-
module.exports.ObjectExpression = (path, {print, maybe, indent}) => {
|
|
22
|
+
module.exports.ObjectExpression = (path, {print, maybe, indent, write}) => {
|
|
22
23
|
indent.inc();
|
|
23
24
|
|
|
24
25
|
const properties = path.get('properties');
|
|
@@ -28,6 +29,7 @@ module.exports.ObjectExpression = (path, {print, maybe, indent}) => {
|
|
|
28
29
|
|
|
29
30
|
maybe.print(parens, '(');
|
|
30
31
|
print('{');
|
|
32
|
+
parseComments(path, {write});
|
|
31
33
|
maybe.print.newline(manyLines);
|
|
32
34
|
|
|
33
35
|
for (const property of properties) {
|
|
@@ -136,3 +138,4 @@ function isParens(path) {
|
|
|
136
138
|
|
|
137
139
|
return false;
|
|
138
140
|
}
|
|
141
|
+
|
package/package.json
CHANGED