@putout/printer 1.132.0 → 1.133.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
@@ -1,3 +1,13 @@
1
+ 2023.06.05, v1.133.1
2
+
3
+ fix:
4
+ - b159c9a @putout/printer: ImportAttribute: no assertions
5
+
6
+ 2023.06.05, v1.133.0
7
+
8
+ feature:
9
+ - 2f33c34 @putout/printer: ObjectExpression inside ArrayExpression
10
+
1
11
  2023.06.04, v1.132.0
2
12
 
3
13
  feature:
@@ -9,6 +9,7 @@ const {
9
9
  isIdentifier,
10
10
  isCallExpression,
11
11
  isBooleanLiteral,
12
+ isObjectExpression,
12
13
  } = require('@babel/types');
13
14
 
14
15
  const {isSimple} = require('@putout/operate');
@@ -211,7 +212,7 @@ function isOneSimple(path) {
211
212
  }
212
213
 
213
214
  function isNewlineBetweenElements(path, {elements}) {
214
- if (elements.length > 3)
215
+ if (elements.length > 3 && !isObjectExpression(elements[0]))
215
216
  return true;
216
217
 
217
218
  if (isOneSimple(path))
@@ -28,7 +28,7 @@ const isAssertions = (path) => {
28
28
  if (path.node.extra?.deprecatedAssertSyntax)
29
29
  return true;
30
30
 
31
- return path.node.assertions.length;
31
+ return path.node.assertions?.length;
32
32
  };
33
33
 
34
34
  function printAttributes(path, {write, traverse, type, keyword}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/printer",
3
- "version": "1.132.0",
3
+ "version": "1.133.1",
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",