@putout/printer 1.132.0 → 1.133.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.06.05, v1.133.0
2
+
3
+ feature:
4
+ - 2f33c34 @putout/printer: ObjectExpression inside ArrayExpression
5
+
1
6
  2023.06.04, v1.132.0
2
7
 
3
8
  feature:
@@ -9,6 +9,8 @@ const {
9
9
  isIdentifier,
10
10
  isCallExpression,
11
11
  isBooleanLiteral,
12
+ isObjectExpression,
13
+
12
14
  } = require('@babel/types');
13
15
 
14
16
  const {isSimple} = require('@putout/operate');
@@ -211,7 +213,7 @@ function isOneSimple(path) {
211
213
  }
212
214
 
213
215
  function isNewlineBetweenElements(path, {elements}) {
214
- if (elements.length > 3)
216
+ if (elements.length > 3 && !isObjectExpression(elements[0]))
215
217
  return true;
216
218
 
217
219
  if (isOneSimple(path))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/printer",
3
- "version": "1.132.0",
3
+ "version": "1.133.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",