@putout/printer 18.50.2 → 18.50.3

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
+ 2026.11.14, v18.50.3
2
+
3
+ fix:
4
+ - f21574b2 @putout/printer: CallExpression: space before array argument
5
+
1
6
  2026.11.14, v18.50.2
2
7
 
3
8
  fix:
@@ -68,16 +68,25 @@ export const CallExpression = maybeParens((path, printer, semantics) => {
68
68
 
69
69
  export const OptionalCallExpression = CallExpression;
70
70
 
71
- const isSpaceBeforeArg = createTypeChecker([
72
- ['-: parentPath -> !', isMaxArgs],
73
- ['+: -> ArrayExpression'],
74
- ]);
75
-
76
71
  const isFilledArray = createTypeChecker([
77
72
  '-: -> !ArrayExpression',
78
73
  '+: node.elements.length -> +',
79
74
  ]);
80
75
 
76
+ const isFirstArg = (arg) => !arg.__putout_printer_index;
77
+
78
+ const isSpaceBeforeFilledArray = createTypeChecker([
79
+ ['-', isFirstArg],
80
+ ['-: -> !', isFilledArray],
81
+ ['+: parentPath', isMultiline],
82
+ ]);
83
+
84
+ const isSpaceBeforeArg = createTypeChecker([
85
+ ['+', isSpaceBeforeFilledArray],
86
+ ['-: parentPath -> !', isMaxArgs],
87
+ ['+: -> ArrayExpression'],
88
+ ]);
89
+
81
90
  const isBreaklineBeforeArg = createTypeChecker([
82
91
  ['-', isFilledArray],
83
92
  ['+: parentPath', isMaxArgs],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/printer",
3
- "version": "18.50.2",
3
+ "version": "18.50.3",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "Simplest possible opinionated Babel AST printer for 🐊Putout",