@putout/printer 1.130.2 → 1.131.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,9 @@
1
+ 2023.06.03, v1.131.0
2
+
3
+ feature:
4
+ - 2647101 @putout/printer: ArrayExpression: new line when ObjectExpression
5
+ - 9af0bd8 @putout/printer: ImportAttributes: all cases
6
+
1
7
  2023.06.03, v1.130.2
2
8
 
3
9
  feature:
@@ -209,6 +209,9 @@ function isOneSimple(path) {
209
209
  }
210
210
 
211
211
  function isNewlineBetweenElements(path, {elements}) {
212
+ if (elements.length > 3)
213
+ return true;
214
+
212
215
  if (isOneSimple(path))
213
216
  return false;
214
217
 
@@ -5,7 +5,6 @@ const {
5
5
  exists,
6
6
  isNext,
7
7
  isLast,
8
-
9
8
  } = require('../../is');
10
9
 
11
10
  const {
@@ -24,7 +24,12 @@ module.exports.maybePrintAttributes = (path, {write, traverse}) => {
24
24
  });
25
25
  };
26
26
 
27
- const isAssertions = (path) => path.node.assertions.length;
27
+ const isAssertions = (path) => {
28
+ if (path.node.extra?.deprecatedAssertSyntax)
29
+ return true;
30
+
31
+ return path.node.assertions.length;
32
+ };
28
33
 
29
34
  function printAttributes(path, {write, traverse, type, keyword}) {
30
35
  const attributes = path.get(type);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/printer",
3
- "version": "1.130.2",
3
+ "version": "1.131.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",