@putout/printer 1.72.6 → 1.72.7

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
+ 2023.04.26, v1.72.7
2
+
3
+ feature:
4
+ - 7764b71 @putout/printer: improve chaining support of MemberExpression
5
+
1
6
  2023.04.26, v1.72.6
2
7
 
3
8
  feature:
@@ -61,9 +61,6 @@ module.exports.OptionalMemberExpression = (path, {print}) => {
61
61
  function isLooksLikeChain(path) {
62
62
  const {parentPath} = path;
63
63
 
64
- if (parentPath.parentPath.isStatement() && !parentPath.parentPath.isExpressionStatement())
65
- return false;
66
-
67
64
  if (path.find(isIfStatement))
68
65
  return false;
69
66
 
@@ -52,9 +52,7 @@ module.exports.isStringAndIdentifier = ([a, b]) => isStringLiteral(a) && isIdent
52
52
  const isIfOrStatement = (a) => isIfStatement(a) || isStatement(a);
53
53
  const isForOfOrStatement = (a) => isForOfStatement(a) || isStatement(a);
54
54
 
55
- module.exports.isIf = (path) => isIfStatement(path.find(
56
- isIfOrStatement,
57
- ));
55
+ module.exports.isIf = (path) => isIfStatement(path.find(isIfOrStatement));
58
56
 
59
57
  module.exports.isForOf = (path) => {
60
58
  const current = path.find(isForOfOrStatement);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/printer",
3
- "version": "1.72.6",
3
+ "version": "1.72.7",
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 fro 🐊Putout",