@putout/printer 2.52.0 → 2.53.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,8 @@
1
+ 2023.07.06, v2.53.0
2
+
3
+ feature:
4
+ - c1c667d @putout/printer: ObjectExpression: comma
5
+
1
6
  2023.07.06, v2.52.0
2
7
 
3
8
  feature:
@@ -39,7 +39,7 @@ module.exports.ObjectExpression = (path, {print, maybe, indent, write}, semantic
39
39
  maybe.indent(length > 1 || logical || manyLines);
40
40
  print(property);
41
41
 
42
- if (!logical && (length > 1 || manyLines)) {
42
+ if (length > 1 || manyLines) {
43
43
  print(',');
44
44
  print.newline();
45
45
  }
@@ -65,7 +65,6 @@ module.exports.ObjectExpression = (path, {print, maybe, indent, write}, semantic
65
65
  indent.dec();
66
66
  maybe.indent(manyLines);
67
67
  print('}');
68
- maybe.print.newline(shouldAddNewline(path));
69
68
  maybe.print(parens, ')');
70
69
  };
71
70
 
@@ -92,13 +91,6 @@ const notLastArgInsideCall = (path) => {
92
91
  .at(-1);
93
92
  };
94
93
 
95
- function shouldAddNewline(path) {
96
- if (!path.parentPath.isLogicalExpression())
97
- return false;
98
-
99
- return path.parentPath.parentPath.isSpreadElement();
100
- }
101
-
102
94
  const ONE_LINE = true;
103
95
  const MANY_LINES = false;
104
96
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/printer",
3
- "version": "2.52.0",
3
+ "version": "2.53.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",