@putout/printer 13.0.0 → 13.0.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,10 @@
1
+ 2025.02.22, v13.0.1
2
+
3
+ feature:
4
+ - ee27918 @putout/printer: @putout/eslint v4.1.0
5
+ - 7384b14 @putout/printer: eslint-plugin-putout v25.0.1
6
+ - fc42fa2 @putout/printer: ObjectExpression inside ArrayExpression
7
+
1
8
  2025.02.17, v13.0.0
2
9
 
3
10
  fix:
@@ -34,6 +34,7 @@ const {
34
34
  isIdentifier,
35
35
  isFunction,
36
36
  isCallExpression,
37
+ isObjectProperty,
37
38
  } = types;
38
39
 
39
40
  const isNextString = (path) => isStringLiteral(path.getNextSibling());
@@ -133,7 +134,9 @@ module.exports.ArrayExpression = {
133
134
  if (index < n || trailingComma)
134
135
  maybe.print(is, ',');
135
136
 
136
- maybe.print.newline((is || isSpreadBeforeObject(element)) && !isNextObject(element));
137
+ if (!(isObjectExpression(element) && isObjectProperty(path.parentPath)))
138
+ maybe.print.newline((is || isSpreadBeforeObject(element)) && !isNextObject(element));
139
+
137
140
  maybe.print.space(is && isObjectAfterSimple(element));
138
141
 
139
142
  if (!is && index < n) {
@@ -37,6 +37,7 @@ const isLast = (path) => isParentProgram(path) && !isNext(path);
37
37
  module.exports.isNextObject = (a) => a
38
38
  .getNextSibling()
39
39
  .isObjectExpression();
40
+
40
41
  module.exports.isPrevObject = (a) => a
41
42
  .getPrevSibling()
42
43
  .isObjectExpression();
@@ -57,4 +57,3 @@ const escape = (list, {slash, quote}) => {
57
57
 
58
58
  return res.join('');
59
59
  };
60
-
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/printer",
3
- "version": "13.0.0",
3
+ "version": "13.0.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",
@@ -65,7 +65,7 @@
65
65
  }
66
66
  },
67
67
  "devDependencies": {
68
- "@putout/eslint": "^3.5.0",
68
+ "@putout/eslint": "^4.1.0",
69
69
  "@putout/eslint-flat": "^2.0.0",
70
70
  "@putout/plugin-minify": "^9.0.0",
71
71
  "@putout/plugin-printer": "^4.0.0",
@@ -77,7 +77,7 @@
77
77
  "check-dts": "^0.8.0",
78
78
  "escover": "^4.0.1",
79
79
  "eslint": "^9.0.0",
80
- "eslint-plugin-putout": "^24.0.0",
80
+ "eslint-plugin-putout": "^25.0.1",
81
81
  "estree-to-babel": "^10.0.0",
82
82
  "goldstein": "^5.14.0",
83
83
  "just-kebab-case": "^4.2.0",