@putout/bundle 3.1.0 → 3.1.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/bundle/putout-iife.js +1 -1
- package/bundle/putout.js +27 -14
- package/bundle/putout.min.js +1 -1
- package/package.json +1 -1
package/bundle/putout.js
CHANGED
|
@@ -68587,9 +68587,9 @@ parens$1.maybeParens = (print) => ({
|
|
|
68587
68587
|
|
|
68588
68588
|
const {exists: exists$e} = is$3;
|
|
68589
68589
|
const {printParams: printParams$c} = params;
|
|
68590
|
-
const {maybeParens: maybeParens$
|
|
68590
|
+
const {maybeParens: maybeParens$5} = parens$1;
|
|
68591
68591
|
|
|
68592
|
-
arrowFunctionExpression.ArrowFunctionExpression = maybeParens$
|
|
68592
|
+
arrowFunctionExpression.ArrowFunctionExpression = maybeParens$5((path, printer, semantics) => {
|
|
68593
68593
|
const {
|
|
68594
68594
|
print,
|
|
68595
68595
|
maybe,
|
|
@@ -68789,9 +68789,9 @@ var functionExpression = {};
|
|
|
68789
68789
|
|
|
68790
68790
|
const {exists: exists$d} = is$3;
|
|
68791
68791
|
const {printParams: printParams$8} = params;
|
|
68792
|
-
const {maybeParens: maybeParens$
|
|
68792
|
+
const {maybeParens: maybeParens$4} = parens$1;
|
|
68793
68793
|
|
|
68794
|
-
functionExpression.FunctionExpression = maybeParens$
|
|
68794
|
+
functionExpression.FunctionExpression = maybeParens$4((path, printer, semantics) => {
|
|
68795
68795
|
const {
|
|
68796
68796
|
print,
|
|
68797
68797
|
maybe,
|
|
@@ -68841,11 +68841,11 @@ var unaryExpressions$1 = {};
|
|
|
68841
68841
|
|
|
68842
68842
|
const {isLast: isLast$b, isNext: isNext$j} = is$3;
|
|
68843
68843
|
|
|
68844
|
-
const {maybeParens: maybeParens$
|
|
68844
|
+
const {maybeParens: maybeParens$3} = parens$1;
|
|
68845
68845
|
|
|
68846
68846
|
const isWord = (a) => /^(delete|typeof|void|throw)$/.test(a);
|
|
68847
68847
|
|
|
68848
|
-
const unaryExpression = maybeParens$
|
|
68848
|
+
const unaryExpression = maybeParens$3((path, printer) => {
|
|
68849
68849
|
const {maybe, traverse} = printer;
|
|
68850
68850
|
const {prefix, operator} = path.node;
|
|
68851
68851
|
const argPath = path.get('argument');
|
|
@@ -69105,7 +69105,7 @@ _class.ClassDeclaration = {
|
|
|
69105
69105
|
};
|
|
69106
69106
|
|
|
69107
69107
|
function classVisitor(path, {print, indent, maybe, traverse}) {
|
|
69108
|
-
const {abstract} = path.node;
|
|
69108
|
+
const {id, abstract} = path.node;
|
|
69109
69109
|
|
|
69110
69110
|
for (const decorator of maybeDecorators$1(path)) {
|
|
69111
69111
|
traverse(decorator);
|
|
@@ -69127,7 +69127,7 @@ function classVisitor(path, {print, indent, maybe, traverse}) {
|
|
|
69127
69127
|
}
|
|
69128
69128
|
|
|
69129
69129
|
if (node.superClass) {
|
|
69130
|
-
maybe.print(
|
|
69130
|
+
maybe.print(id && !node.implements, ' ');
|
|
69131
69131
|
print('extends ');
|
|
69132
69132
|
print('__superClass');
|
|
69133
69133
|
}
|
|
@@ -69287,10 +69287,11 @@ const {
|
|
|
69287
69287
|
|
|
69288
69288
|
const {parseComments: parseComments$3} = comment;
|
|
69289
69289
|
const {likeChain} = memberExpressions$1;
|
|
69290
|
-
const {maybeParens: maybeParens$3} = parens$1;
|
|
69291
69290
|
|
|
69291
|
+
const isBodyOfArrow = (path) => path.parentPath.node.body === path.node;
|
|
69292
69292
|
const isLogical = (path) => path.get('argument').isLogicalExpression();
|
|
69293
69293
|
const isValue = (path) => path.get('properties.0.value').node;
|
|
69294
|
+
const isParentExpression = (path) => path.parentPath.isExpressionStatement();
|
|
69294
69295
|
|
|
69295
69296
|
const isMemberExpressionCallee = ({parentPath}) => {
|
|
69296
69297
|
if (!parentPath.isCallExpression())
|
|
@@ -69304,16 +69305,16 @@ const isMemberExpressionCallee = ({parentPath}) => {
|
|
|
69304
69305
|
return likeChain(callee);
|
|
69305
69306
|
};
|
|
69306
69307
|
|
|
69307
|
-
objectExpression.ObjectExpression =
|
|
69308
|
+
objectExpression.ObjectExpression = (path, {print, maybe, indent, write}, semantics) => {
|
|
69308
69309
|
const {trailingComma} = semantics;
|
|
69309
69310
|
indent.inc();
|
|
69310
69311
|
|
|
69311
69312
|
const properties = path.get('properties');
|
|
69312
69313
|
const {length} = properties;
|
|
69314
|
+
const parens = isParens$4(path);
|
|
69313
69315
|
const manyLines = !isOneLine$1(path);
|
|
69314
69316
|
|
|
69315
|
-
maybe.print(
|
|
69316
|
-
|
|
69317
|
+
maybe.print(parens, '(');
|
|
69317
69318
|
print('{');
|
|
69318
69319
|
parseComments$3(path, {write}, semantics);
|
|
69319
69320
|
maybe.print.newline(manyLines);
|
|
@@ -69355,9 +69356,10 @@ objectExpression.ObjectExpression = maybeParens$3((path, {print, maybe, indent,
|
|
|
69355
69356
|
indent.dec();
|
|
69356
69357
|
maybe.indent(manyLines);
|
|
69357
69358
|
print('}');
|
|
69359
|
+
maybe.print(parens, ')');
|
|
69358
69360
|
|
|
69359
69361
|
maybe.indent.dec(isMemberExpressionCallee(path));
|
|
69360
|
-
}
|
|
69362
|
+
};
|
|
69361
69363
|
|
|
69362
69364
|
const hasNextLeadingComment = (path) => {
|
|
69363
69365
|
const next = path.getNextSibling();
|
|
@@ -69407,6 +69409,13 @@ function isOneLine$1(path) {
|
|
|
69407
69409
|
return !isValue(path);
|
|
69408
69410
|
}
|
|
69409
69411
|
|
|
69412
|
+
function isParens$4(path) {
|
|
69413
|
+
if (isBodyOfArrow(path))
|
|
69414
|
+
return true;
|
|
69415
|
+
|
|
69416
|
+
return isParentExpression(path);
|
|
69417
|
+
}
|
|
69418
|
+
|
|
69410
69419
|
var objectProperty = {};
|
|
69411
69420
|
|
|
69412
69421
|
var concatanate$1 = {};
|
|
@@ -71043,7 +71052,11 @@ var recordExpression = {};
|
|
|
71043
71052
|
|
|
71044
71053
|
const {ObjectExpression: ObjectExpression$1} = objectExpression;
|
|
71045
71054
|
|
|
71046
|
-
recordExpression.RecordExpression =
|
|
71055
|
+
recordExpression.RecordExpression = (path, operations, semantics) => {
|
|
71056
|
+
const {write} = operations;
|
|
71057
|
+
write('#');
|
|
71058
|
+
ObjectExpression$1(path, operations, semantics);
|
|
71059
|
+
};
|
|
71047
71060
|
|
|
71048
71061
|
var tupleExpression = {};
|
|
71049
71062
|
|