@putout/printer 18.13.0 → 18.14.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
+ 2026.06.05, v18.14.0
2
+
3
+ feature:
4
+ - 84a01426 @putout/printer: MemberExpression: parens: improve support
5
+
1
6
  2026.05.22, v18.13.0
2
7
 
3
8
  feature:
@@ -39,6 +39,7 @@ export const ArrayExpression = {
39
39
  } = semantics;
40
40
 
41
41
  const needIndent = isNeedIndent(path);
42
+
42
43
  const multiline = isMultiLine(path, {
43
44
  maxElementsInOneLine,
44
45
  maxElementLengthInOneLine,
@@ -22,4 +22,3 @@ export const isStringsAndObject = (path) => {
22
22
 
23
23
  return strings.length === elements.length - 1;
24
24
  };
25
-
@@ -355,4 +355,3 @@ export const isIndentBeforeElement = createTypeChecker([
355
355
  ['+: -> SpreadElement'],
356
356
  ['+: -> !ObjectExpression'],
357
357
  ]);
358
-
@@ -9,8 +9,7 @@ const isObjectInsideArrow = createTypeChecker([
9
9
  ]);
10
10
 
11
11
  export const MemberExpression = maybeParens({
12
- checkParens: false,
13
- condition: (path) => isObjectInsideArrow(path),
12
+ condition: isObjectInsideArrow,
14
13
  print: (path, printer) => {
15
14
  const {
16
15
  print,
@@ -1,16 +1,6 @@
1
- import {types} from '@putout/babel';
2
-
3
- const {isMemberExpression} = types;
4
-
5
- export const Decorator = (path, {print, maybe}) => {
6
- const {expression} = path.node;
7
- const isMember = isMemberExpression(expression);
8
-
1
+ export const Decorator = (path, {print}) => {
9
2
  print('@');
10
-
11
- maybe.print(isMember, '(');
12
3
  print('__expression');
13
- maybe.print(isMember, ')');
14
4
  };
15
5
 
16
6
  Decorator.printLeadingCommentLine = (path, printer, semantics, {printComment}) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/printer",
3
- "version": "18.13.0",
3
+ "version": "18.14.0",
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",